Showing posts with label RMAN. Show all posts
Showing posts with label RMAN. Show all posts

Thursday, February 20, 2014

ORA-00205: error in identifying control file, check alert log for more info

 

As part of moving the control file from current ASM Diskgroup to new Diskgroup, I did the following;

1. Backup the current controlfile as copy and trace.

2. Backup the current control file

3. Reconfigure the controlfile location using ALTER SYSTEM

4. Restore the controlfile, it will create the controlfiles on the new diskgroup as given in step 3.

SQL> alter database mount;
alter database mount
*

ERROR at line 1:
ORA-00205: error in identifying control file, check alert log for more info


SQL> select * from v$controlfile;

no rows selected

Cause:

Here, I have mistakenly given +DG_PERF_FLASH02 instead of +DG_PERF_FLASH_02

ALTER SYSTEM SET control_files='+DG_PERF_DATA_01','+DG_PERF_FLASH02' SCOPE=spfile sid='*';

It resulted as the control file restore failure

RMAN>
RMAN> shutdown immediate;
2>
3> startup nomount;
4>
5> restore controlfile from '+DG_PERF_DATA_03/testDB/controlfile/current.486.839732817';
6>
7> exit
using target database control file instead of recovery catalog
Oracle instance shut down

connected to target database (not started)
Oracle instance started

Total System Global Area    2137886720 bytes

Fixed Size                     2184304 bytes
Variable Size               1476397968 bytes
Database Buffers             654311424 bytes
Redo Buffers                   4993024 bytes

Starting restore at 20-FEB-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=216 device type=DISK

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 02/20/2014 22:48:35
ORA-19504: failed to create file "+DG_PERF_FLASH02"
ORA-17502: ksfdcre:4 Failed to create file +DG_PERF_FLASH02
ORA-15001: diskgroup "DG_PERF_FLASH02" does not exist or is not mounted
ORA-15001: diskgroup "DG_PERF_FLASH02" does not exist or is not mounted
ORA-19600: input file is control file  (+DG_PERF_DATA_01/testDB/controlfile/current.532.840062915)
ORA-19601: output file is control file  (+DG_PERF_FLASH02)

Recovery Manager complete.

SQL*Plus: Release 11.2.0.3.0 Production on Thu Feb 20 22:48:35 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

ALTER DATABASE MOUNT
*
ERROR at line 1:
ORA-00205: error in identifying control file, check alert log for more info


ALTER DATABASE OPEN
*
ERROR at line 1:
ORA-01507: database not mounted


SQL>

 

Resolution

Fixed the control_files parameter and restored the controlfile from the old ASM diskgroup.

ALTER SYSTEM SET control_files='+DG_PERF_DATA_01','+DG_PERF_FLASH_02' SCOPE=spfile sid='*';

Thursday, March 08, 2012

How to register a database to use RMAN catalog using OEM Grid 11g

 

  1. Login Oracle Enterprise Manager.
  2. Select Target –> Chose the database
  3. Go Availability tab and click "Recovery Catalog Settings" under Backup/Recovery Setup.
  4. Choose "Use Recovery Catalog" option.
  5. Click "Add Recovery Catalog" button to add recovery catalog.
  6. And fill required fields such as host, port,sid, username, etc

 

image

Monday, January 30, 2012

RMAN-06445: cannot connect to recovery catalog after NOCATALOG has been used

 

Error: RMAN-06445: cannot connect to recovery catalog after NOCATALOG has been used

Cause:

1. We can not connect to a catalog, after we started RMAN with the NOCATALOG option.

2. If we executed some command that used control file to show the results, and after this if we try to connect to the catalog.

For example As, 'list backup summary;' and after this, We try 'connect catalog rman/rman@rmandb;', this return the RMAN-06445 error.

Alternatively use rman target / catalog rman/rmanpwd@rmandb;

Wednesday, January 25, 2012

RMAN-08138: WARNING: archived log not deleted - must create more backups

 

Error: RMAN-08138: WARNING: archived log not deleted - must create more backups
        archived log file

Resolution:
1. Connect to Catalog database'
2. CROSSCHECK BACKUP

Crosscheck command determine if files managed by RMAN, such as archived log, datafile copies and backup pieces still exist on disk or tape.

Friday, January 20, 2012

ORA-00257: archiver is stuck. CONNECT INTERNAL only, until freed


ORA-00257: archiver is stuck. CONNECT INTERNAL only, until freed

Cause: The ARCH process received an error while trying to archive a redo log file. If the problem is not resolved soon, the database will stop executing transactions.
The most likely cause of this message is that the destination device is out of space to store the redo log file.

Action: Check the archiver trace file for a detailed description of the problem. Also, verify that the device specified in the initialization parameter ARCHIVE_LOG_DEST is set up properly for archiving.

Friday, January 06, 2012

Query to check the database backup details

 

The query will return the backup status and timings of database backups -

Run the query run in the database, not on the catalog.

Login as sysdba -

This script will report on all backups – full, incremental and archivelog backups -

col STATUS format a9
col hrs format 999.99
select
SESSION_KEY, INPUT_TYPE, STATUS,
to_char(START_TIME,'mm/dd/yy hh24:mi') start_time,
to_char(END_TIME,'mm/dd/yy hh24:mi')   end_time,
elapsed_seconds/3600                   hrs
from V$RMAN_BACKUP_JOB_DETAILS
order by session_key;

Sunday, January 01, 2012

RMAN-06169: could not read file header for datafile nn error reason 4

 

RMAN-06169: could not read file header for datafile nn error reason 4
RMAN-06169: could not read file header for datafile nn error reason 4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 10/20/2011 07:41:54
RMAN-06056: could not access datafile nn

The reason code of 4 meant for DBWR could not find the file. After investigating found that the new data file added on locally for a RAC database. That data file not available on other node cause this backup failure.

To resolve this, the locally create data file moved to ASM.

Friday, October 14, 2011

Moving Data files Between ASM Disk Groups

 

Method 1: Using RMAN

Step 1: Start RMAN and connect to the target database.

$ rman target /

Step 2: Generate a report that shows the names of the datafiles.

RMAN> REPORT SCHEMA;

Step 3:  Back up the datafile to the new ASM disk group.

RMAN> BACKUP AS COPY DATAFILE '+DG_DEVSYS_mydb1_FLASH_01/mydb1/datafile/data01.290.709985421' FORMAT '+DG_DEVSYS_mydb1_DATA_01';

Step 4:  Bring the Datafile Offline
alter database datafile '+DG_DEVSYS_mydb1_FLASH_01/mydb1/datafile/data01.290.709985421' offline

Step 5: Point the control file to the newly created copy of the datafile

RMAN> SWITCH DATAFILE '+DG_DEVSYS_mydb1_FLASH_01/mydb1/datafile/data01.290.709985421' TO COPY;

Step 6:  Recover the renamed datafile
RMAN> recover datafile '+DG_DEVSYS_mydb1_DATA_01/mydb1/datafile/data01.272.764459767';

Step 7. Bring the datafile online.
alter database datafile '+DG_DEVSYS_mydb1_DATA_01/mydb1/datafile/data01.272.764459767' online

Step 8. Delete the old datafile
RMAN>DELETE DATAFILECOPY “DG_DEVSYS_mydb1_FLASH_01/mydb1/datafile/data01.290.709985421”

Reference: http://download.oracle.com/docs/cd/B28359_01/backup.111/b28270/rcmasmmi.htm

Method 2: Using ASMCMD CP ( Copy ) Command

Step 1: Start RMAN and connect to the target database.

$ rman target /

Step 2: Generate a report that shows the names of the datafiles.

RMAN> REPORT SCHEMA;

Step 3:  Bring the Datafile Offline
alter database datafile '+DG_DEVSYS_mydb1_FLASH_01/mydb1/datafile/data01.290.709985421' offline

Step 4:  Connect to ASMCMD and use CP to copy files
$ asmcmd –p

ASMCMD [+] > cp +DG_DEVSYS_mydb1_FLASH_01/mydb1/datafile/data01.290.709985421 +DG_DEVSYS_mydb1_DATA_01

Step 5:  After copied datafile, then rename file in database.  With ASM(OMF) this delete old datafile.

alter database rename file '+DG_DEVSYS_mydb1_FLASH_01/mydb1/datafile/data01.290.709985421'  to '+DG_DEVSYS_mydb1_DATA_01/mydb1/datafile/data01.272.764459767'

Step 6:  Recover the renamed datafile
RMAN> recover datafile '+DG_DEVSYS_mydb1_DATA_01/mydb1/datafile/data01.272.764459767';

Step 7. Bring the datafile online.
alter database datafile '+DG_DEVSYS_mydb1_DATA_01/mydb1/datafile/data01.272.764459767' online

Step 8: Verify the file name
RMAN> REPORT SCHEMA


Method 3:  Using RMAN Copy

Step 1:  Restrict the Session
ALTER SYSTEM enable restricted session;

Step 2:   Bring the Datafile Offline

alter database datafile '+DG_DEVSYS_mydb1_FLASH_01/mydb1/datafile/data01.290.709985421' offline

Step 3: Start RMAN and connect to the target database.

$ rman target /

Step 4:  RMAN Copy datafile
RMAN> copy datafile '+DG_DEVSYS_mydb1_FLASH_01/mydb1/datafile/data01.290.709985421' to '+DG_DEVSYS_mydb1_DATA_01';

Step 5:  After copied datafile, then rename file in database.  With ASM(OMF) this delete old datafile.

alter database rename file '+DG_DEVSYS_mydb1_FLASH_01/mydb1/datafile/data01.290.709985421'  to '+DG_DEVSYS_mydb1_DATA_01/mydb1/datafile/data01.272.764459767'

Step 6:  Recover the renamed datafile
RMAN> recover datafile '+DG_DEVSYS_mydb1_DATA_01/mydb1/datafile/data01.272.764459767';

Step 7. Bring the datafile online.
alter database datafile '+DG_DEVSYS_mydb1_DATA_01/mydb1/datafile/data01.272.764459767' online


Step 8: Verify the file name
RMAN> REPORT SCHEMA

Step 9: Disable the Restricted Session

ALTER SYSTEM disable restricted session;

Monday, May 16, 2011

ORA-19511: Error received from media manager layer

 

RMAN Backup Failed with

Error Message:
ORA-19506: failed to create sequential file, name="<SYS00S_1846:751266012:1:33>.df", parms=""
ORA-27028: skgfqcre: sbtbackup returned error
ORA-19511: Error received from media manager layer, error text:
   Vendor specific error: OB2_StartObjectBackup() failed ERR(-17)

Cause:
The root cause of the backup failures was that the VLS ran out of tapes. 

Resolution:
Free up tapes from expired backups or add new tapes. 
Reboot the VLS to get the backups working again.