Resync recovery catalog with controlfile
Oracle :10.2.0.2
os : solaris 5.10
When doing stage refresh with production using RMAN a small pitfall happen.
By mistake i have connected to the stage database and production recovery catalog. This was done after changing the db name for stage database. Recovery catalog has taken this as new incarnation. The stage database opened with resetlogs after refresh. The db id's of both the incarnations are same.
DB_KEY DBID DBINC_KEY NAME CUR
1 3582966461 2 PRD NO
1 3582966461 578463 STG YES
Could anyone help me to resync the recovery catalog with old incarnation with production database.
Help needed ASAP.
Thanks
Hi,
We are following the rename datafile and then switching and opening the db with resetlogs. In this scenario we are only changing the db name not the dbid.
If it is not for a restore test the duplicate command previously mentioned does everything for you. If you want to proceed manually change the DBID manually after the restore.
Any further suggetions to resolve my issue.
The suggested unregister/register failed ? Catalog is just an optional help, losing data from the catalog does not compromise the possibilities of restorations.
Best regards
Phil
Similar Messages
-
PERFORMING FULL RECOVERY WHEN THE RECOVERY CATALOG AND CONTROLFILE ARE LOST
제품 : RMAN
작성날짜 : 2002-05-30
PERFORMING FULL RECOVERY WHEN THE RECOVERY CATALOG AND CONTROLFILE ARE LOST
===========================================================================
PURPOSE
Recovery Catalog와 Controlfile이 손상되었을 때 Oracle9i의 new feature인
Controlfile Autobackup을 이용하여 full recovery를 수행하는 방법을 알아본다
EXPLANATION
Catalog와 Controlfile이 모두 손상되었을 경우 full recovery를 수행할 수 있도록
하기 위해 oracle9i부터 Controlfile Autobackup이라는 New feature를 제공한다.
이 Feature가 활성화되면 RMAN은 자동으로 특정 형식(specific format)으로
controlfile을 backup한다 나중에 RMAN은 Recovery catalog를 access하지 않고도
이 backup을 인식할 수 있다. 이 형식은 "%F"라는 variable을 포함하는데
이 variable은 중요한 정보인 DATABASE ID를 포함하고 있다.
이것은 다음과 같은 CONFIGURE 명령을 사용하여 Turn-on 될 수 있다.
RMAN> configure controlfile autobackup on;
활성화시킨 후에 controlfile autobackup의 format을 변경할 수 있다. 그러나
이것은 반드시 variable "%F"를 포함해야만 한다. 그렇지 않으면 다음과 같은 Error
를 만나게 된다.
RMAN> configure controlfile autobackup format for
2> device type disk to 'c:\backups\%U';
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00579: the following error occurred at 01/31/2002 11:57:21
RMAN-03002: failure during compilation of command
RMAN-03013: command type: configure
RMAN-06492: controlfile autobackup format "c:\backups\%U" must specify a "%F"
format specifier
%F 는 RMAN이 recovery catalog 없이 backup piece를 인식하도록 Key이다.
이 Feature가 활성화 된 후에 RMAN은 BACKUP 명령을 수행할 때마다 controlfile에
대해서 별도의 backup을 수행한다. 이전에는, controlfile 은 오직 system
tablespace가 backup되는 경우에만 자동으로 backup되었다.
Database Backup은 아래와 같은 log를 출력한다.
RMAN> backup database;
Starting backup at 31-JAN-02
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=12 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=C:\ORACLE\ORADATA\PROD\SYSTEM01.DBF
input datafile fno=00002 name=C:\ORACLE\ORADATA\PROD\UNDOTBS01.DBF
input datafile fno=00005 name=C:\ORACLE\ORADATA\PROD\EXAMPLE01.DBF
input datafile fno=00006 name=C:\ORACLE\ORADATA\PROD\INDX01.DBF
input datafile fno=00008 name=C:\ORACLE\ORADATA\PROD\USERS01.DBF
input datafile fno=00003 name=C:\ORACLE\ORADATA\PROD\CWMLITE01.DBF
input datafile fno=00004 name=C:\ORACLE\ORADATA\PROD\DRSYS01.DBF
input datafile fno=00007 name=C:\ORACLE\ORADATA\PROD\TOOLS01.DBF
channel ORA_DISK_1: starting piece 1 at 31-JAN-02
channel ORA_DISK_1: finished piece 1 at 31-JAN-02
piece handle=C:\BACKUPS\01DFKAIH_1_1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:56
Finished backup at 31-JAN-02
Starting Control File Autobackup at 31-JAN-02
piece handle=C:\BACKUPS\C-4159396170-20020131-00 comment=NONE
Finished Control File Autobackup at 31-JAN-02
Note:
Controlfile backup은 backup의 끝에서 수행된다.
그리고 이 backup piece name의 두번째 string은 dbid이다(4159396170)
Current controlfile이 database와 함께 손실되고 Recovery catalog도 손상되어
사용할 수 없게 되었을 때 controlfile autobackup이 controlfile을 restore하기
위해 사용될 수 있다. restore된 controlfile은 db를 mount하고 datafile들을
restore하기 위해 사용될 수 있다.
Controlfile autobackup을 이용하여 full recovery를 수행하기 위해서는 아래와
같은 과정을 수행하면 된다.
1. Target instance를 위한 new init.ora를 생성한다. backup이 있다면 이것을
사용할 수 있다.
2. Startup nomount your new instance.
3. RMAN은 시작하나 어떤 connect statement도 수행하지 않는다.
4. RMAN prompt상에서 DBID를 설정한다. 만약 DBID를 모르면 controlfile autobackup
의 이름으로부터 이것을 알 수 있다.
RMAN> set dbid=4159396170;
5. Dbid를 설정한 후에 nomount로 startup한 target instance에 connect한다.
RMAN> connect target /
6. 만약에 backup이 disk상에 있고 controlfile autobackup을 non-default location
으로 지정하였다면 파일을 다음과 같은 위치로 옮겨 놓는다
ON UNIX : ORACLE_HOME/dbs
ON WINDOWS: ORACLE_HOME/database
RMAN은 controlfile autobackup을 찾기 위해 위 directory를 검색한다.
만약 controlfile autobackup location을 바꾸지 않으면 위 directory안에
backup이 생성되게 된다.
만약에 backup이 tape에 있다면 restore시 channel과 device를 기술하기 위해서
run block을 사용해야 한다. database가 mount되어 있지 않기 때문에
default device와 channel을 설정할 수 없다.
RMAN> run { allocate channel c_1 type 'sbt_tape'
parms "ENV=(NB_ORA_SERV=rm-wgt)";
restore controlfile from autobackup;}
7. Restore the controlfile:
RMAN> restore controlfile from autobackup;
8. Mount the database from the restored controlfile:
RMAN> alter database mount;
9. Restore datafiles:
RMAN> restore database;
10. file들을 restore한 후에 recovery를 수행할 수 있다.
이때 current online redo log가 없고 또한 backup controlfile을 사용하기
때문에 incomplete recovery를 수행해야 한다. 이를 수행하기 위해서는
"UNTIL TIME"을 설정해야 하고 open시에는 resetlogs를 사용해야 한다.
RMAN> set until time=<time stamp>;
RMAN> recover database;
RMAN> alter database open resetlogs;
REFERENCE DOCUMENT
NOTE:174623.1BACKUP Command Behavior
ON
If the backup includes datafile 1, then RMAN does not automatically include the current control file in the datafile backup set. Instead, RMAN writes the control file and server parameter file to a separate autobackup piece.
Note: The autobackup occurs regardless of whether the BACKUP or COPY command explicitly includes the current control file, for example, BACKUP DATABASE INCLUDE CURRENT CONTROLFILE.
OFF
If the backup includes datafile 1, then RMAN automatically includes the current control file and server parameter file in the datafile backup set. RMAN does not create a separate autobackup piece containing the control file and server parameter file.
BUT Dear Mohammed,
It is not working accordingly. what I did is :-
1. I switched off the AUTOBACKUP
2. Then I took whole database backup, that means it included File # 1
3. But according to above it is going to include autobackup of controlfile and spfile in the same backupset .
4. But when I asked it to restore controlfile from autobackup it said NO AUTOBACKUP FOUND.
COULD YOU PLEASE HELP ME ONCE AGAIN DEAR.
If it works accroding to above then it should have my Autobackup.
Regards
Harpreet Singh -
Recommendations for recovery catalog database backup
Hi
We are using IBM Tivoli Storage Manager for our 9i db on AIX 5.2.
I would like us to consider using rman but I am not sure of the best way we would go about backing up the database we would use for our recovery catalog.
This database that hold all the metadata would need to be backed up after every rman backup. The rman backup would go to tape, so I am assuming that the recovery catalog would be backed up on tape also.
What are the common procedures for this in other shops ?Dan A wrote:
Aman. That doc does help, and indeed it does explain
Back up the recovery catalog with the same frequency that you back up the target database.
We would be doing nightly backups, so we would have to back up the catalog with the same frequency.
The doc explains that we would use rman for these backups also, but that it would be in NOCATALOG mode so that the repository is in the control file.
And then what? Just copy this to tape? Seems that with rman there is then a need to do two backups - one of the target db and one of the recovery catalog.
Thanks.I shall suggest to take an export of the underlying schema which is holding the info in the recovery catalog. That's all which is basically required to be safe. In case , everything gets burnt regarding the catalog db,you can immediately create another db, import the user back there and things are in place. This should be a quick and easy way out of the backup of recovery catalog.
Yes if you are going to take backups every night than backup of recovery catalog schema/db nightly will be a good option. Docs are meant to promote people for RMAN so indeed they would talk about it. But its not at all a compulstion to use RMAN for recovery catalog schema's backup. If its a big catalog maintaining lots of database's info than using RMAN with all its features is a good option. If a single db is a part of it than it may not be that much big and export of teh schema alone may serve the purpose too.
HTH
Aman.... -
Switching RMAN from Recovery Catalog DB to target db controlfile
I have a doubt.
Is it possible to make RMAN to use controlfile, from using Recovery Catalog(RC) DB ?
The scenario is like this:
I have a target db and a RC db. The RMAN presently uses RC db for backup and recovery.
Due to some reasons, I want the RMAN to use target db controlfile, instead of RC.
Is there anyway to perform this?
If yes, I need the RMAN to understand and use backup sets, which are taken before switching to controlfile based backup (That is, controlfile should understand backup sets, which have backed-up using RC )
Is there a way to perform these tasks?Hi,
The rman backup information in the controlfile has a limitation due to space constraints in the controlfile.
Oracle uses the parameter "control_file_record_keep_time" which defaults to 7 days to purge rman backup information from the controlfile. (So if you run rman backups the backup information in the controlfile will be automaticly purged.)
If you run rman using a catalog the controlfile will synchronize new informaton to the catalog at the start of every backup but it won't actively purge information from the catalog. So the catalog (next to other features) has the ability to store information longer than the controlfile. (Delete commands will be needed to purge information from the catalog.)
Due to some reasons, I want the RMAN to use target db controlfile, instead of RC.
Is there anyway to perform this?Just skip the connect to the catalog in your script.
If yes, I need the RMAN to understand and use backup sets, which are taken before switching to controlfile based backup > (That is, controlfile should understand backup sets, which have backed-up using RC )This is not easy to answer, your restore might work if the backup information is still available in the controlfile (younger than control_file_record_keep_time). Success is not related to the fact the backup was taken with the controlfile and RC at the same time.
Regards,
Tycho -
Implicit resync of recovery catalog failed
Hi,
Our RMAN delete script is failing with below error
============================
RMAN> set echo on
2> sql 'alter session set optimizer_mode=rule';
3> run
4> {
5> delete obsolete recovery window of 2 days device type DISK;
6> }
7> exit;
echo set on
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql command at 05/24/2010 07:15:06
RMAN-03014: implicit resync of recovery catalog failed
RMAN-03009: failure of partial resync command on default channel at 05/24/2010 07:15:06
ORA-00904: : invalid identifier
=========================================
Please suggest
Regardswhich version of Oracle are you using and why are you setting the optimizer to RULE ?
Coskan Gundogar
Blog: http://coskan.wordpress.com
Twitter: http://www.twitter.com/coskan
Linkedin: http://uk.linkedin.com/in/coskan
--------- -
Backup controlfile recovery catalog
Hello
If I am using recovery catalog do I still need to backup controlfile with rman ?
or, can I restore controlfile using recovery catalog so that I dont need to backup controlfile explicitly?How much effort, scripting, time and disk space does it cost to take controlfile backups ? In any case a Full Backup and/or SYSTEM Tablespace backup and/or ControlfileAutoBackupOn would cause controlfile backups.
What if catalog database is unavailable or corrupted ?
Hemant K Chitale -
RMAN backup fails atlast during resync catalog with ORA-00001
Hi Everyone,
Database version:10.2.0.2.0
single instance database
My Rman backups were running fine but today i got the error , almost at the end of backup
Finished Control File and SPFILE Autobackup
released channel: t1
released channel: t2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03008: error while performing automatic resync of recovery catalog
ORA-00001: unique constraint (RMAN.CKP_P) violated
Recovery Manager complete.
This problem occured 2 days before.I connected to catalog and ran a resync catalog and the backup worked fine for next day.
Now again today iam experiencing the same problem.
Any help would be greatThanks for the reply
SQL> select * from rman.rcver;
VERSION
10.02.00.00
10.02.00.02
when i do the resync catalog manually it works fine.only during the end of backup it throws me the error;
was wondering whether can i disable the primary key constraint on CKP table so that i can avoid the error.
since its a live system im thinking lot before i do anything
Thanks
Edited by: centerB on 14-Apr-2011 06:40
Edited by: centerB on 14-Apr-2011 06:57
Edited by: centerB on 14-Apr-2011 07:03 -
Backup and restore to the other database with Recovery Catalog
Dear All,
i need your help about recovery catalog.
I have 3 databases, 2 databases version are 8.1.7.3 (HostA and HostB) and other database is 9.2.0.6 (as Catalog Database)
I want to backup files from HostA with Catalog Database into tape, then restore the backup files into HostB.
Please suggest me how to do this.
Best Regards,
abipyou can achieve this with the rman duplicate command.
if you have the same directory structure then it is a relatively simple task, if the directory structure is different then you need to use the
'set newname' syntax.
regards
Alan -
Good Morning All,
One of our RMAN backups is failing with the following error message. Any suggestions would be greatly appreciated.
==================================================================================================
Starting backup at 12/30/2008 22:03:47
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 12/30/2008 22:03:47
RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
RMAN>
RMAN> ##BACKUP ARCHIVELOG ALL FORMAT '%d_bkp_al_%t_Set%s_Piece%p' delete input;
2>
3> # DELETE ARCHIVELOG UNTIL TIME 'SYSDATE-7';
4>
5> # check if database can be restored
6> # RESTORE DATABASE VALIDATE;
7>
8> # check if controlfile can be restored
9> ##RESTORE CONTROLFILE to '/backups/admin/custpr/custpr_bkp_cntlfile.ctl' VALIDATE;
10>
11> # check if archivelogs for the past two weeks can be restored
12> # RESTORE ARCHIVELOG FROM TIME 'SYSDATE-7' VALIDATE;
13>
14> # - Verify all backups on backup media are intact
15> # CROSSCHECK BACKUP OF DATABASE;
16>
17> # - Display a list of files that need to be backed up based on the retention
18> # policy. For this case study, files that don't have at least 1 backups
19> # will be reported.
20> REPORT NEED BACKUP;
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 7 days
Report of files whose recovery needs more than 7 days of archived logs
File Days Name
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of report command at 12/30/2008 22:03:48
RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
RMAN>
RMAN> # - delete un-necessary backups. This command deletes backups based on the
2> # retention policy.
3> ######### commented out DELETE OBSOLETE - TSM not configured to delete on 68
4> #########DELETE OBSOLETE;
5>
6> # - get complete list of existing backups
7> LIST BACKUP;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of list command at 12/30/2008 22:03:49
RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
RMAN>
RMAN> #-end of file-
2> **end-of-file**
RMAN>
Edited by: ORA_UMAIR on Dec 31, 2008 7:51 AMThis Oracle Database is 9.2.0.6.0. Here is the complete log file. The RMAN script that I am using ran successfully many times before.
====================================================================================================
Recovery Manager: Release 9.2.0.6.0 - 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
RMAN>
connected to recovery catalog database
RMAN>
connected to target database: CUSTPR (DBID=525071053)
RMAN>
RMAN> #########################################################################
2> # LEVEL 0 BACKUP #
3> #########################################################################
4>
5> # Configure backups to be written to disk.
6> CONFIGURE DEFAULT DEVICE TYPE TO DISK;
old RMAN configuration parameters:
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
new RMAN configuration parameters:
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN>
RMAN> # Set the retention policy to a recovery window of 7 days. This ensures that
2> # RMAN retains all backups needed to recover the database to any point in time
3> # in the last 7 days. You can use the DELETE OBSOLETE command to delete
4> # backups that are no longer required by the retention policy. To exclude a
5> # backup from consideration by the policy, you can use KEEP option with the
6> # BACKUP command.
7> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
old RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN>
RMAN> # Configure RMAN to use two disk channels for backup, restore, recovery, and
2> # maintenance operations.
3> CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
old RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN>
RMAN> # Configure RMAN to write disk backups to the /backup directory.
2> # The format specifier %t is replaced with a 4-byte timestamp, %s with the
3> # backup set number, and %p with the backup piece number.
4> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p';
old RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p';
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p';
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN>
RMAN> # Configure RMAN to back up the control file after each backup.
2> CONFIGURE CONTROLFILE AUTOBACKUP ON;
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN>
RMAN> # Configure RMAN to write controlfile autobackups to the /backup directory.
2> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backups/admin/custpr/%d_bkp_cf%F';
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backups/admin/custpr/%d_bkp_cf%F';
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backups/admin/custpr/%d_bkp_cf%F';
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN>
RMAN> # Enable the backup optimization feature introduced in 9i to make sure that
2> # RMAN won't backup an archivelog or datafile if there already exists a backup
3> # of that file. The FORCE option can be used to override optimization on a
4> # specific BACKUP command.
5> CONFIGURE BACKUP OPTIMIZATION ON;
old RMAN configuration parameters:
CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters:
CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN>
RMAN> # Use the SHOW ALL command to see the current configuration settings.
2> SHOW ALL ;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '%d_bkp_cf%F';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backups/admin/custpr/%d_bkp_cf%F';
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 1;
CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' FORMAT '%d_bkp_df%t_Set%s_Piece%p';
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/orahome2/custprdb/9.2.0/dbs/snapcf_custpr.f'; # default
RMAN>
RMAN> # The following commands are run each day to start the backup cycle.
2> # The steps are:
3> # - Take an incremental level 0 backup of the database. A level 0 backup is
4> # a complete backup of the entire file which can be used as the basis
5> # for a subsequent incremental backup.
6> # - Backup all archivelogs that have not already been backed up.
7> # - Delete on-disk archivelogs older than seven days.
8>
9> BACKUP INCREMENTAL LEVEL 0 FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p'
10> DATABASE maxsetsize 33G
11> PLUS ARCHIVELOG FORMAT '/backups/admin/custpr/%d_bkp_al%t_Set%s_Piece%p'
12> delete all input;
Starting backup at 12/30/2008 22:01:40
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=11 devtype=DISK
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=8008 recid=7910 stamp=674638862
input archive log thread=1 sequence=8009 recid=7911 stamp=674671207
input archive log thread=1 sequence=8010 recid=7912 stamp=674697380
input archive log thread=1 sequence=8011 recid=7913 stamp=674780433
input archive log thread=1 sequence=8012 recid=7914 stamp=674784211
input archive log thread=1 sequence=8013 recid=7915 stamp=674863288
input archive log thread=1 sequence=8014 recid=7916 stamp=674863300
channel ORA_DISK_1: starting piece 1 at 12/30/2008 22:01:41
channel ORA_DISK_1: finished piece 1 at 12/30/2008 22:03:47
piece handle=/backups/admin/custpr/CUSTPR_bkp_al674863300_Set3083_Piece1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:07
channel ORA_DISK_1: deleting archive log(s)
archive log filename=/custpr/arch/arch_custpr_8008.log recid=7910 stamp=674638862
archive log filename=/custpr/arch/arch_custpr_8009.log recid=7911 stamp=674671207
archive log filename=/custpr/arch/arch_custpr_8010.log recid=7912 stamp=674697380
archive log filename=/custpr/arch/arch_custpr_8011.log recid=7913 stamp=674780433
archive log filename=/custpr/arch/arch_custpr_8012.log recid=7914 stamp=674784211
archive log filename=/custpr/arch/arch_custpr_8013.log recid=7915 stamp=674863288
archive log filename=/custpr/arch/arch_custpr_8014.log recid=7916 stamp=674863300
Finished backup at 12/30/2008 22:03:47
Starting backup at 12/30/2008 22:03:47
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 12/30/2008 22:03:47
RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
RMAN>
RMAN> ##BACKUP ARCHIVELOG ALL FORMAT '%d_bkp_al_%t_Set%s_Piece%p' delete input;
2>
3> # DELETE ARCHIVELOG UNTIL TIME 'SYSDATE-7';
4>
5> # check if database can be restored
6> # RESTORE DATABASE VALIDATE;
7>
8> # check if controlfile can be restored
9> ##RESTORE CONTROLFILE to '/backups/admin/custpr/custpr_bkp_cntlfile.ctl' VALIDATE;
10>
11> # check if archivelogs for the past two weeks can be restored
12> # RESTORE ARCHIVELOG FROM TIME 'SYSDATE-7' VALIDATE;
13>
14> # - Verify all backups on backup media are intact
15> # CROSSCHECK BACKUP OF DATABASE;
16>
17> # - Display a list of files that need to be backed up based on the retention
18> # policy. For this case study, files that don't have at least 1 backups
19> # will be reported.
20> REPORT NEED BACKUP;
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 7 days
Report of files whose recovery needs more than 7 days of archived logs
File Days Name
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of report command at 12/30/2008 22:03:48
RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
RMAN>
RMAN> # - delete un-necessary backups. This command deletes backups based on the
2> # retention policy.
3> ######### commented out DELETE OBSOLETE - TSM not configured to delete on 68
4> #########DELETE OBSOLETE;
5>
6> # - get complete list of existing backups
7> LIST BACKUP;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of list command at 12/30/2008 22:03:49
RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
RMAN>
RMAN> #-end of file-
2> **end-of-file**
RMAN>
Recovery Manager complete. -
From no recovery catalog to recovery catalog
sorry for the message to be posted 2nd time due to error in internet connection.
Message was edited by:
Nitesh JainHi Nitesh Jain!
First thing to do ist to register all your database in the RC (RC = Recovery Catalog)
test@localhost> rman target system/oracle@PRODDB1 catalog catowner/password@CATDB
REGISTER DATABASE;
exit;
In this example PRODDB1 is your first production Database and CATDB ist your Catalog database. The REGISTER DATABASE Command registers your DB in the RC. Do this step for all your productiv DBs.
Next thing to do is to resync your controlfile with your RC for all your productiv DBs.
i]test@localhost> rman target system/oracle@PRODDB1 catalog catowner/password@CATDB
RESYNC CATALOG;
exit;
RESYNC CATALOG takes all Information from your controlfiles and puts it into your RC.
This should be all. You can use LIST BACKUP to check whether your Backups are registered in your RC or not. If you have to register Backups manually try the CATALOG START WITH '/path_to_your_backups/' Command. You can read about it in the Onlinedocumentation in the RMAN Reference.
Hope this helps! -
Recovery Catalog showing wrong Archive Destination
Hi All,
I am using Oracle 10g on Solaris 10.
The problem I am facing is this, while taking backup using recover catalog..............
Starting backup at 27-JUL-11
current log archived
released channel: ch00
released channel: ch01
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 07/27/2011 11:16:47
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file /u01/oracle/product/10.2.0/db_1/dbs/arch1_56_757089402.dbf
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3
This is because of the following reason
RMAN> list archivelog all;
List of Archived Log Copies
Key Thrd Seq S Low Time Name
39401 1 1567 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1567_756523261.dbf
39402 1 1568 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1568_756523261.dbf
39403 1 1569 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1569_756523261.dbf
39404 1 1570 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1570_756523261.dbf
39405 1 1571 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1571_756523261.dbf
39406 1 1572 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1572_756523261.dbf
39407 1 1573 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1573_756523261.dbf
39408 1 1574 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1574_756523261.dbf
39409 1 1575 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1575_756523261.dbf
39410 1 1576 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1576_756523261.dbf
39411 1 1577 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1577_756523261.dbf
39412 1 1578 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1578_756523261.dbf
39413 1 1579 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1579_756523261.dbf
39414 1 1580 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1580_756523261.dbf
39415 1 1581 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1581_756523261.dbf
39416 1 1582 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1582_756523261.dbf
39417 1 1583 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1583_756523261.dbf
39418 1 1584 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1584_756523261.dbf
39419 1 1585 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1585_756523261.dbf
39420 1 1586 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1586_756523261.dbf
39421 1 1587 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1587_756523261.dbf
39422 1 1588 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1588_756523261.dbf
39423 1 1589 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1589_756523261.dbf
39424 1 1590 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1590_756523261.dbf
39425 1 1591 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1591_756523261.dbf
39426 1 1592 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1592_756523261.dbf
39427 1 1593 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1593_756523261.dbf
39428 1 1594 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1594_756523261.dbf
39429 1 1595 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1595_756523261.dbf
39430 1 1596 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1596_756523261.dbf
39431 1 1597 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1597_756523261.dbf
39432 1 1598 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1598_756523261.dbf
39433 1 1599 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1599_756523261.dbf
39434 1 1600 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1600_756523261.dbf
39435 1 1601 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1601_756523261.dbf
39436 1 1602 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1602_756523261.dbf
39437 1 1603 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1603_756523261.dbf
39438 1 1604 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1604_756523261.dbf
39439 1 1605 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1605_756523261.dbf
39440 1 1606 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1606_756523261.dbf
39441 1 1607 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1607_756523261.dbf
39442 1 1608 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1608_756523261.dbf
39443 1 1609 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1609_756523261.dbf
39444 1 1610 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1610_756523261.dbf
39445 1 1611 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1611_756523261.dbf
39446 1 1612 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1612_756523261.dbf
39447 1 1613 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1613_756523261.dbf
39448 1 1614 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1614_756523261.dbf
39449 1 1615 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1615_756523261.dbf
39450 1 1616 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1616_756523261.dbf
39451 1 1617 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1617_756523261.dbf
39452 1 1618 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1618_756523261.dbf
39453 1 1619 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1619_756523261.dbf
39454 1 1620 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1620_756523261.dbf
39455 1 1621 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1621_756523261.dbf
39456 1 1622 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1622_756523261.dbf
39457 1 1623 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1623_756523261.dbf
39458 1 1624 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1624_756523261.dbf
39459 1 1625 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1625_756523261.dbf
39460 1 1626 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1626_756523261.dbf
39461 1 1627 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1627_756523261.dbf
39462 1 1628 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1628_756523261.dbf
39463 1 1629 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1629_756523261.dbf
39464 1 1630 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1630_756523261.dbf
39465 1 1631 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1631_756523261.dbf
39466 1 1632 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1632_756523261.dbf
39467 1 1633 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1633_756523261.dbf
39468 1 1634 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1634_756523261.dbf
39469 1 1635 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1635_756523261.dbf
39470 1 1636 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1636_756523261.dbf
39471 1 1637 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1637_756523261.dbf
39682 1 1638 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1638_756523261.dbf
39689 1 1639 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1639_756523261.dbf
40642 1 1640 A 26-JUL-11 /oradb2/Archive/HCSPRD91/1_1640_756523261.dbf
40643 1 1641 A 27-JUL-11 /oradb2/Archive/HCSPRD91/1_1641_756523261.dbf
40644 1 1642 A 27-JUL-11 /oradb2/Archive/HCSPRD91/1_1642_756523261.dbf
40645 1 1643 A 27-JUL-11 /oradb2/Archive/HCSPRD91/1_1643_756523261.dbf
40646 1 1644 A 27-JUL-11 /oradb2/Archive/HCSPRD91/1_1644_756523261.dbf
40647 1 1645 A 27-JUL-11 /oradb2/Archive/HCSPRD91/1_1645_756523261.dbf
40648 1 1646 A 27-JUL-11 /oradb2/Archive/HCSPRD91/1_1646_756523261.dbf
41310 1 1647 A 27-JUL-11 /oradb2/Archive/HCSPRD91/1_1647_756523261.dbf
41317 1 1648 A 27-JUL-11 /oradb2/Archive/HCSPRD91/1_1648_756523261.dbf
41373 1 1649 A 27-JUL-11 /oradb2/Archive/HCSPRD91/1_1649_756523261.dbf
41374 1 1650 A 27-JUL-11 /oradb2/Archive/HCSPRD91/1_1650_756523261.dbf
41375 1 1651 A 27-JUL-11 /oradb2/Archive/HCSPRD91/1_1651_756523261.dbf
41383 1 1652 A 27-JUL-11 /oradb2/Archive/HCSPRD91/1_1652_756523261.dbf
*38725 1 56 A 26-JUL-11 /u01/oracle/product/10.2.0/db_1/dbs/arch1_56_757089402.dbf*
*38946 1 57 A 26-JUL-11 /u01/oracle/product/10.2.0/db_1/dbs/arch1_57_757089402.dbf*
*39000 1 58 A 26-JUL-11 /u01/oracle/product/10.2.0/db_1/dbs/arch1_58_757089402.dbf*
*39022 1 59 A 26-JUL-11 /u01/oracle/product/10.2.0/db_1/dbs/arch1_59_757089402.dbf*
*39243 1 60 A 26-JUL-11 /u01/oracle/product/10.2.0/db_1/dbs/arch1_60_757089402.dbf*
*39297 1 61 A 26-JUL-11 /u01/oracle/product/10.2.0/db_1/dbs/arch1_61_757089402.dbf*
*39703 1 62 A 26-JUL-11 /u01/oracle/product/10.2.0/db_1/dbs/arch1_62_757089402.dbf*
*39704 1 63 A 26-JUL-11 /u01/oracle/product/10.2.0/db_1/dbs/arch1_63_757089402.dbf*
*39705 1 64 A 26-JUL-11 /u01/oracle/product/10.2.0/db_1/dbs/arch1_64_757089402.dbf*
*39933 1 65 A 27-JUL-11 /u01/oracle/product/10.2.0/db_1/dbs/arch1_65_757089402.dbf*
*39991 1 66 A 27-JUL-11 /u01/oracle/product/10.2.0/db_1/dbs/arch1_66_757089402.dbf*
*40023 1 67 A 27-JUL-11 /u01/oracle/product/10.2.0/db_1/dbs/arch1_67_757089402.dbf*
*40024 1 68 A 27-JUL-11 /u01/oracle/product/10.2.0/db_1/dbs/arch1_68_757089402.dbf*
*40025 1 69 A 27-JUL-11 /u01/oracle/product/10.2.0/db_1/dbs/arch1_69_757089402.dbf*
*40254 1 70 A 27-JUL-11 /u01/oracle/product/10.2.0/db_1/dbs/arch1_70_757089402.dbf*
*40308 1 71 A 27-JUL-11 /u01/oracle/product/10.2.0/db_1/dbs/arch1_71_757089402.dbf*
*40345 1 72 A 27-JUL-11 /u01/oracle/product/10.2.0/db_1/dbs/arch1_72_757089402.dbf*
*40570 1 73 A 27-JUL-11 /u01/oracle/product/10.2.0/db_1/dbs/arch1_73_757089402.dbf*
*41329 1 74 A 27-JUL-11 /u01/oracle/product/10.2.0/db_1/dbs/arch1_74_757089402.dbf*
I dont know from where recovery catalog is getting the information in bold.
I have crosschecked and deleted archives and resynced the catalog several times. Immediatly after doing that the backup works fine, but the other day its the same thing all over again.
Can some one tell me from where the catalog is getting this wrong infomation about archivelogs???
By the way here is some more info about my target Database:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /oradb2/Archive/HCSPRD91
Oldest online log sequence 1651
Next log sequence to archive 1653
Current log sequence 1653
NAME TYPE VALUE
archive_lag_target integer 0
log_archive_config string
log_archive_dest string
log_archive_dest_1 string LOCATION=/oradb2/Archive/HCSPR
D91
log_archive_dest_10 string
log_archive_dest_2 string
log_archive_dest_3 string
log_archive_dest_4 string
log_archive_dest_5 string
log_archive_dest_6 string
NAME TYPE VALUE
log_archive_dest_7 string
log_archive_dest_8 string
log_archive_dest_9 string
log_archive_dest_state_1 string enable
log_archive_dest_state_10 string enable
log_archive_dest_state_2 string enable
log_archive_dest_state_3 string enable
log_archive_dest_state_4 string enable
log_archive_dest_state_5 string enable
log_archive_dest_state_6 string enable
log_archive_dest_state_7 string enable
NAME TYPE VALUE
log_archive_dest_state_8 string enable
log_archive_dest_state_9 string enable
log_archive_duplex_dest string
log_archive_format string %t_%s_%r.dbf
log_archive_local_first boolean TRUE
log_archive_max_processes integer 2
log_archive_min_succeed_dest integer 1
log_archive_start boolean FALSE
log_archive_trace integer 0
remote_archive_enable string true
standby_archive_dest string ?/dbs/arch
Regards .....Do you have any other DBs with the same DBID as the one you are backing up? Are they connect to the same RMAN catalog?
Iordan Iotzov
http://iiotzov.wordpress.com/ -
Oracle 10.2.0.4 RMAN Duplicate without a Recovery Catalog
Production Backups are Tuesday - Sunday at 22:00:
RUN {
ALLOCATE CHANNEL c1 DEVICE TYPE DISK;
CROSSCHECK ARCHIVELOG ALL;
CROSSCHECK BACKUP;
DELETE NOPROMPT COPY OF ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-2';
DELETE NOPROMPT BACKUP;
BACKUP DATABASE PLUS ARCHIVELOG;
CROSSCHECK BACKUP;
RELEASE CHANNEL c1;
LIST BACKUPSET;
EOF
I have these files sent over to the development server on Wednesday, RMANbackup (log), backupset and the controlfile:
rcp -rp /backup/$1/flash_recovery/$2/RMANbackup/* kacdb4:/backup/common/flash_recovery/$2/RMANbackup
rcp -rp /backup/$1/flash_recovery/$2/backupset/* kacdb4:/backup/common/flash_recovery/$2/backupset
rcp -rp /backup/$1/flash_recovery/$2/controlfile/* kacdb4:/backup/common/flash_recovery/$2/controlfile
I run the RMAN Duplicate and the database gets created with no problems!
The question is: If I wait unit Thursday, to run the duplicate script, I get the traditional RMAN errors: RMAN-03002, RMAN-03015, RMAN-06026, RMAN-06023:
Starting restore at 20-SEP-12
released channel: aux1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/20/2012 10:05:36
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 6 found to restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
Recovery Manager complete.
Is this because of the 'SYSDATE-2' in the RMAN runlist? Does RMAN connect back to the target and it does not find the logs, because they've been deleted, it aborts the duplicate? I've shipped over the backupset and controlfile of the scn I'm using in the duplicate runlist all is there? If I'm trying to cleanup the archive area, would'nt 'delete expired archivelog all' in my runlist, be better than using the 'SYSDATE-2'?
Or is it because of this database parameter:
control_file_record_keep_time= 7, should I set this to say 14?
Is it one of these RMAN configurations:
Retention Policy to Redundancy 1, should I set this to say 7?
Datafile Backup Copies for Device Type Disk to 1, to say 3, this takes up disk space which is precious
Archivelog Backup Copies for Device Type Disk to 1, to say 3, this takes up disk space too
Archive deletion policy to none change this to the other option?
I've tested this a few times now, and always fails if the dupicate is not done the next day.
If I have to create a development database on a Friday from Tuesday's copy FROM TAPE, I will get the error, because the files are no longer on disk.
What can I do to ensure that I can create an RMAN duplicate any day of the week from Tuesday to Sunday?
Look forward to your answer.
Please let me know if I left any details out that you may need.
Sincerely,
Elizabeth BurnsHi Valentin,
Here is the good duplicate log from Monday 9/24:
oracle:dupdb@kacdb4:/u01/app/oracle/KAC_SCRIPTS/dupdb/logs-> more clone_database_from_common_20120924.log
SQL*Plus: Release 10.2.0.4.0 - Production on Mon Sep 24 18:07:32 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected.
SQL> spool /u01/app/oracle/KAC_SCRIPTS/dupdb/logs/DBShutdown.log
SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> spool off
SQL> exit;
Disconnected from Oracle Database 10g Release 10.2.0.4.0 - 64bit Production
SQL*Plus: Release 10.2.0.4.0 - Production on Mon Sep 24 18:07:41 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
File created.
ORACLE instance started.
Total System Global Area 134217728 bytes
Fixed Size 2054448 bytes
Variable Size 79693520 bytes
Database Buffers 50331648 bytes
Redo Buffers 2138112 bytes
Disconnected from Oracle Database 10g Release 10.2.0.4.0 - 64bit Production
Recovery Manager: Release 10.2.0.4.0 - Production on Mon Sep 24 18:07:43 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: KEDSP (DBID=3370721566)
connected to auxiliary database: DUPDB (not mounted)
RMAN> RUN
2> {
3> ALLOCATE AUXILIARY CHANNEL aux1 DEVICE TYPE DISK;
4>
5> set until scn 211054288;
6> DUPLICATE TARGET DATABASE TO dupdb
7> PFILE=/u01/app/oracle/product/10.2.0/db_1/dbs/initdupdb.ora
8> DB_FILE_NAME_CONVERT=('/usr/local/OLlinks/kedsp/system/','/usr/local/OLlinks/dupdb/system/','/usr/local/OLlinks/kedsp/temp/','/us
r/local/OLlinks/dupdb/temp/','/usr/local/OLlinks/kedsp/data01/','/usr/local/OLlinks/dupdb/data01/','/usr/local/OLlinks/kedsp/index01
/','/usr/
9> local/OLlinks/dupdb/index01/')
10> LOGFILE
11> GROUP 1 (
12> '/usr/local/OLlinks/dupdb/redo01/redo0101.log',
13> '/usr/local/OLlinks/dupdb/redo02/redo0102.log',
14> '/usr/local/OLlinks/dupdb/redo03/redo0103.log'
15> ) SIZE 50M,
16> GROUP 2 (
17> '/usr/local/OLlinks/dupdb/redo01/redo0201.log',
18> '/usr/local/OLlinks/dupdb/redo02/redo0202.log',
19> '/usr/local/OLlinks/dupdb/redo03/redo0203.log'
20> ) SIZE 50M,
21> GROUP 3 (
22> '/usr/local/OLlinks/dupdb/redo01/redo0301.log',
23> '/usr/local/OLlinks/dupdb/redo02/redo0302.log',
24> '/usr/local/OLlinks/dupdb/redo03/redo0303.log'
25> ) SIZE 50M,
26> GROUP 4 (
27> '/usr/local/OLlinks/dupdb/redo01/redo0401.log',
28> '/usr/local/OLlinks/dupdb/redo02/redo0402.log',
29> '/usr/local/OLlinks/dupdb/redo03/redo0403.log'
30> ) SIZE 50M,
31> GROUP 5 (
32> '/usr/local/OLlinks/dupdb/redo01/redo0501.log',
33> '/usr/local/OLlinks/dupdb/redo02/redo0502.log',
34> '/usr/local/OLlinks/dupdb/redo03/redo0503.log'
35> ) SIZE 50M,
36> GROUP 6 (
37> '/usr/local/OLlinks/dupdb/redo01/redo0601.log',
38> '/usr/local/OLlinks/dupdb/redo02/redo0602.log',
39> '/usr/local/OLlinks/dupdb/redo03/redo0603.log'
40> ) SIZE 50M,
41> GROUP 7 (
42> '/usr/local/OLlinks/dupdb/redo01/redo0701.log',
43> '/usr/local/OLlinks/dupdb/redo02/redo0702.log',
44> '/usr/local/OLlinks/dupdb/redo03/redo0703.log'
45> ) SIZE 50M,
46> GROUP 8 (
47> '/usr/local/OLlinks/dupdb/redo01/redo0801.log',
48> '/usr/local/OLlinks/dupdb/redo02/redo0802.log',
49> '/usr/local/OLlinks/dupdb/redo03/redo0803.log'
50> ) SIZE 50M,
51> GROUP 9 (
52> '/usr/local/OLlinks/dupdb/redo01/redo0901.log',
53> '/usr/local/OLlinks/dupdb/redo02/redo0902.log',
54> '/usr/local/OLlinks/dupdb/redo03/redo0903.log'
55> ) SIZE 50M,
56> GROUP 10 (
57> '/usr/local/OLlinks/dupdb/redo01/redo1001.log',
58> '/usr/local/OLlinks/dupdb/redo02/redo1002.log',
59> '/usr/local/OLlinks/dupdb/redo03/redo1003.log'
60> ) SIZE 50M
61> ;
62> }
63>
using target database control file instead of recovery catalog
allocated channel: aux1
channel aux1: sid=242 devtype=DISK
executing command: SET until clause
Starting Duplicate Db at 24-SEP-12
contents of Memory Script:
set until scn 211054288;
set newname for datafile 1 to
"/usr/local/OLlinks/dupdb/system/system01.dbf";
set newname for datafile 2 to
"/usr/local/OLlinks/dupdb/system/undotbs01.dbf";
set newname for datafile 3 to
"/usr/local/OLlinks/dupdb/system/sysaux01.dbf";
set newname for datafile 4 to
"/usr/local/OLlinks/dupdb/system/users01.dbf";
set newname for datafile 5 to
"/usr/local/OLlinks/dupdb/data01/data1.dbf";
set newname for datafile 6 to
"/usr/local/OLlinks/dupdb/index01/index1.dbf";
restore
check readonly
clone database
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 24-SEP-12
channel aux1: starting datafile backupset restore
channel aux1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /usr/local/OLlinks/dupdb/system/system01.dbf
restoring datafile 00002 to /usr/local/OLlinks/dupdb/system/undotbs01.dbf
restoring datafile 00003 to /usr/local/OLlinks/dupdb/system/sysaux01.dbf
restoring datafile 00004 to /usr/local/OLlinks/dupdb/system/users01.dbf
restoring datafile 00005 to /usr/local/OLlinks/dupdb/data01/data1.dbf
restoring datafile 00006 to /usr/local/OLlinks/dupdb/index01/index1.dbf
channel aux1: reading from backup piece /usr/local/OLlinks/kedsp/flash_recovery/KEDSP/backupset/2012_09_24/o1_mf_nnndf_TAG20120924T1
01837_860txxs8_.bkp
channel aux1: restored backup piece 1
piece handle=/usr/local/OLlinks/kedsp/flash_recovery/KEDSP/backupset/2012_09_24/o1_mf_nnndf_TAG20120924T101837_860txxs8_.bkp tag=TAG
20120924T101837
channel aux1: restore complete, elapsed time: 00:00:47
Finished restore at 24-SEP-12
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "DUPDB" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 584
LOGFILE
GROUP 1 ( '/usr/local/OLlinks/dupdb/redo01/redo0101.log', '/usr/local/OLlinks/dupdb/redo02/redo0102.log', '/usr/local/OLlinks/dup
db/redo03/redo0103.log' ) SIZE 50 M ,
GROUP 2 ( '/usr/local/OLlinks/dupdb/redo01/redo0201.log', '/usr/local/OLlinks/dupdb/redo02/redo0202.log', '/usr/local/OLlinks/dup
db/redo03/redo0203.log' ) SIZE 50 M ,
GROUP 3 ( '/usr/local/OLlinks/dupdb/redo01/redo0301.log', '/usr/local/OLlinks/dupdb/redo02/redo0302.log', '/usr/local/OLlinks/dup
db/redo03/redo0303.log' ) SIZE 50 M ,
GROUP 4 ( '/usr/local/OLlinks/dupdb/redo01/redo0401.log', '/usr/local/OLlinks/dupdb/redo02/redo0402.log', '/usr/local/OLlinks/dup
db/redo03/redo0403.log' ) SIZE 50 M ,
GROUP 5 ( '/usr/local/OLlinks/dupdb/redo01/redo0501.log', '/usr/local/OLlinks/dupdb/redo02/redo0502.log', '/usr/local/OLlinks/dup
db/redo03/redo0503.log' ) SIZE 50 M ,
GROUP 6 ( '/usr/local/OLlinks/dupdb/redo01/redo0601.log', '/usr/local/OLlinks/dupdb/redo02/redo0602.log', '/usr/local/OLlinks/dup
db/redo03/redo0603.log' ) SIZE 50 M ,
GROUP 7 ( '/usr/local/OLlinks/dupdb/redo01/redo0701.log', '/usr/local/OLlinks/dupdb/redo02/redo0702.log', '/usr/local/OLlinks/dup
db/redo03/redo0703.log' ) SIZE 50 M ,
GROUP 8 ( '/usr/local/OLlinks/dupdb/redo01/redo0801.log', '/usr/local/OLlinks/dupdb/redo02/redo0802.log', '/usr/local/OLlinks/dup
db/redo03/redo0803.log' ) SIZE 50 M ,
GROUP 9 ( '/usr/local/OLlinks/dupdb/redo01/redo0901.log', '/usr/local/OLlinks/dupdb/redo02/redo0902.log', '/usr/local/OLlinks/dup
db/redo03/redo0903.log' ) SIZE 50 M ,
GROUP 10 ( '/usr/local/OLlinks/dupdb/redo01/redo1001.log', '/usr/local/OLlinks/dupdb/redo02/redo1002.log', '/usr/local/OLlinks/dup
db/redo03/redo1003.log' ) SIZE 50 M
DATAFILE
'/usr/local/OLlinks/dupdb/system/system01.dbf'
CHARACTER SET WE8ISO8859P1
contents of Memory Script:
switch clone datafile all;
executing Memory Script
datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=794858918 filename=/usr/local/OLlinks/dupdb/system/undotbs01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=794858918 filename=/usr/local/OLlinks/dupdb/system/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=794858918 filename=/usr/local/OLlinks/dupdb/system/users01.dbf
datafile 5 switched to datafile copy
input datafile copy recid=4 stamp=794858918 filename=/usr/local/OLlinks/dupdb/data01/data1.dbf
datafile 6 switched to datafile copy
input datafile copy recid=5 stamp=794858918 filename=/usr/local/OLlinks/dupdb/index01/index1.dbf
contents of Memory Script:
set until scn 211054288;
recover
clone database
delete archivelog
executing Memory Script
executing command: SET until clause
Starting recover at 24-SEP-12
starting media recovery
channel aux1: starting archive log restore to default destination
channel aux1: restoring archive log
archive log thread=1 sequence=1403
channel aux1: reading from backup piece /usr/local/OLlinks/kedsp/flash_recovery/KEDSP/backupset/2012_09_24/o1_mf_annnn_TAG20120924T1
01923_860tzfd7_.bkp
channel aux1: restored backup piece 1
piece handle=/usr/local/OLlinks/kedsp/flash_recovery/KEDSP/backupset/2012_09_24/o1_mf_annnn_TAG20120924T101923_860tzfd7_.bkp tag=TAG
20120924T101923
channel aux1: restore complete, elapsed time: 00:00:05
archive log filename=/usr/local/OLlinks/dupdb/flash_recovery/DUPDB/archivelog/2012_09_24/o1_mf_1_1403_861phcc3_.arc thread=1 sequenc
e=1403
channel clone_default: deleting archive log(s)
archive log filename=/usr/local/OLlinks/dupdb/flash_recovery/DUPDB/archivelog/2012_09_24/o1_mf_1_1403_861phcc3_.arc recid=1 stamp=79
4858923
media recovery complete, elapsed time: 00:00:02
Finished recover at 24-SEP-12
contents of Memory Script:
shutdown clone;
startup clone nomount pfile= '/u01/app/oracle/product/10.2.0/db_1/dbs/initdupdb.ora';
executing Memory Script
database dismounted
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 134217728 bytes
Fixed Size 2054448 bytes
Variable Size 79693520 bytes
Database Buffers 50331648 bytes
Redo Buffers 2138112 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "DUPDB" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 584
LOGFILE
GROUP 1 ( '/usr/local/OLlinks/dupdb/redo01/redo0101.log', '/usr/local/OLlinks/dupdb/redo02/redo0102.log', '/usr/local/OLlinks/dup
db/redo03/redo0103.log' ) SIZE 50 M ,
GROUP 2 ( '/usr/local/OLlinks/dupdb/redo01/redo0201.log', '/usr/local/OLlinks/dupdb/redo02/redo0202.log', '/usr/local/OLlinks/dup
db/redo03/redo0203.log' ) SIZE 50 M ,
GROUP 3 ( '/usr/local/OLlinks/dupdb/redo01/redo0301.log', '/usr/local/OLlinks/dupdb/redo02/redo0302.log', '/usr/local/OLlinks/dup
db/redo03/redo0303.log' ) SIZE 50 M ,
GROUP 4 ( '/usr/local/OLlinks/dupdb/redo01/redo0401.log', '/usr/local/OLlinks/dupdb/redo02/redo0402.log', '/usr/local/OLlinks/dup
db/redo03/redo0403.log' ) SIZE 50 M ,
GROUP 5 ( '/usr/local/OLlinks/dupdb/redo01/redo0501.log', '/usr/local/OLlinks/dupdb/redo02/redo0502.log', '/usr/local/OLlinks/dup
db/redo03/redo0503.log' ) SIZE 50 M ,
GROUP 6 ( '/usr/local/OLlinks/dupdb/redo01/redo0601.log', '/usr/local/OLlinks/dupdb/redo02/redo0602.log', '/usr/local/OLlinks/dup
db/redo03/redo0603.log' ) SIZE 50 M ,
GROUP 7 ( '/usr/local/OLlinks/dupdb/redo01/redo0701.log', '/usr/local/OLlinks/dupdb/redo02/redo0702.log', '/usr/local/OLlinks/dup
db/redo03/redo0703.log' ) SIZE 50 M ,
GROUP 8 ( '/usr/local/OLlinks/dupdb/redo01/redo0801.log', '/usr/local/OLlinks/dupdb/redo02/redo0802.log', '/usr/local/OLlinks/dup
db/redo03/redo0803.log' ) SIZE 50 M ,
GROUP 9 ( '/usr/local/OLlinks/dupdb/redo01/redo0901.log', '/usr/local/OLlinks/dupdb/redo02/redo0902.log', '/usr/local/OLlinks/dup
db/redo03/redo0903.log' ) SIZE 50 M ,
GROUP 10 ( '/usr/local/OLlinks/dupdb/redo01/redo1001.log', '/usr/local/OLlinks/dupdb/redo02/redo1002.log', '/usr/local/OLlinks/dup
db/redo03/redo1003.log' ) SIZE 50 M
DATAFILE
'/usr/local/OLlinks/dupdb/system/system01.dbf'
CHARACTER SET WE8ISO8859P1
contents of Memory Script:
set newname for tempfile 1 to
"/usr/local/OLlinks/dupdb/temp/temp01.dbf";
switch clone tempfile all;
catalog clone datafilecopy "/usr/local/OLlinks/dupdb/system/undotbs01.dbf";
catalog clone datafilecopy "/usr/local/OLlinks/dupdb/system/sysaux01.dbf";
catalog clone datafilecopy "/usr/local/OLlinks/dupdb/system/users01.dbf";
catalog clone datafilecopy "/usr/local/OLlinks/dupdb/data01/data1.dbf";
catalog clone datafilecopy "/usr/local/OLlinks/dupdb/index01/index1.dbf";
switch clone datafile all;
executing Memory Script
executing command: SET NEWNAME
renamed temporary file 1 to /usr/local/OLlinks/dupdb/temp/temp01.dbf in control file
cataloged datafile copy
datafile copy filename=/usr/local/OLlinks/dupdb/system/undotbs01.dbf recid=1 stamp=794858932
cataloged datafile copy
datafile copy filename=/usr/local/OLlinks/dupdb/system/sysaux01.dbf recid=2 stamp=794858932
cataloged datafile copy
datafile copy filename=/usr/local/OLlinks/dupdb/system/users01.dbf recid=3 stamp=794858932
cataloged datafile copy
datafile copy filename=/usr/local/OLlinks/dupdb/data01/data1.dbf recid=4 stamp=794858932
cataloged datafile copy
datafile copy filename=/usr/local/OLlinks/dupdb/index01/index1.dbf recid=5 stamp=794858932
datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=794858932 filename=/usr/local/OLlinks/dupdb/system/undotbs01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=794858932 filename=/usr/local/OLlinks/dupdb/system/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=794858932 filename=/usr/local/OLlinks/dupdb/system/users01.dbf
datafile 5 switched to datafile copy
input datafile copy recid=4 stamp=794858932 filename=/usr/local/OLlinks/dupdb/data01/data1.dbf
datafile 6 switched to datafile copy
input datafile copy recid=5 stamp=794858932 filename=/usr/local/OLlinks/dupdb/index01/index1.dbf
contents of Memory Script:
Alter clone database open resetlogs;
executing Memory Script
database opened
Finished Duplicate Db at 24-SEP-12
Recovery Manager complete.
SQL*Plus: Release 10.2.0.4.0 - Production on Mon Sep 24 18:09:39 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected.
User altered.
User altered.
User altered.
User altered.
Database closed.
Database dismounted.
ORACLE instance shut down.
ORACLE instance started.
Total System Global Area 134217728 bytes
Fixed Size 2054448 bytes
Variable Size 79693520 bytes
Database Buffers 50331648 bytes
Redo Buffers 2138112 bytes
Database mounted.
Database altered.
Database altered.
Disconnected from Oracle Database 10g Release 10.2.0.4.0 - 64bit Production
oracle:dupdb@kacdb4:/u01/app/oracle/KAC_SCRIPTS/dupdb/logs->
Here is the duplicate log from this morning:
oracle:dupdb@kacdb4:/u01/app/oracle/KAC_SCRIPTS/dupdb/logs-> more clone_database_from_common_20120926.log
SQL*Plus: Release 10.2.0.4.0 - Production on Wed Sep 26 08:28:31 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected.
SQL> spool /u01/app/oracle/KAC_SCRIPTS/dupdb/logs/DBShutdown.log
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> spool off
SQL> exit;
Disconnected from Oracle Database 10g Release 10.2.0.4.0 - 64bit Production
SQL*Plus: Release 10.2.0.4.0 - Production on Wed Sep 26 08:28:42 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
File created.
ORACLE instance started.
Total System Global Area 134217728 bytes
Fixed Size 2054448 bytes
Variable Size 79693520 bytes
Database Buffers 50331648 bytes
Redo Buffers 2138112 bytes
Disconnected from Oracle Database 10g Release 10.2.0.4.0 - 64bit Production
Recovery Manager: Release 10.2.0.4.0 - Production on Wed Sep 26 08:28:45 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: KEDSP (DBID=3370721566)
connected to auxiliary database: DUPDB (not mounted)
RMAN> RUN
2> {
3> ALLOCATE AUXILIARY CHANNEL aux1 DEVICE TYPE DISK;
4>
5> set until scn 211054288;
6> DUPLICATE TARGET DATABASE TO dupdb
7> PFILE=/u01/app/oracle/product/10.2.0/db_1/dbs/initdupdb.ora
8> DB_FILE_NAME_CONVERT=('/usr/local/OLlinks/kedsp/system/','/usr/local/OLlinks/dupdb/system/','/usr/local/OLlinks/kedsp/temp/','/us
r/local/OLlinks/dupdb/temp/','/usr/local/OLlinks/kedsp/data01/','/usr/local/OLlinks/dupdb/data01/','/usr/local/OLlinks/kedsp/index01
/','/usr/
9> local/OLlinks/dupdb/index01/')
10> LOGFILE
11> GROUP 1 (
12> '/usr/local/OLlinks/dupdb/redo01/redo0101.log',
13> '/usr/local/OLlinks/dupdb/redo02/redo0102.log',
14> '/usr/local/OLlinks/dupdb/redo03/redo0103.log'
15> ) SIZE 50M,
16> GROUP 2 (
17> '/usr/local/OLlinks/dupdb/redo01/redo0201.log',
18> '/usr/local/OLlinks/dupdb/redo02/redo0202.log',
19> '/usr/local/OLlinks/dupdb/redo03/redo0203.log'
20> ) SIZE 50M,
21> GROUP 3 (
22> '/usr/local/OLlinks/dupdb/redo01/redo0301.log',
23> '/usr/local/OLlinks/dupdb/redo02/redo0302.log',
24> '/usr/local/OLlinks/dupdb/redo03/redo0303.log'
25> ) SIZE 50M,
26> GROUP 4 (
27> '/usr/local/OLlinks/dupdb/redo01/redo0401.log',
28> '/usr/local/OLlinks/dupdb/redo02/redo0402.log',
29> '/usr/local/OLlinks/dupdb/redo03/redo0403.log'
30> ) SIZE 50M,
31> GROUP 5 (
32> '/usr/local/OLlinks/dupdb/redo01/redo0501.log',
33> '/usr/local/OLlinks/dupdb/redo02/redo0502.log',
34> '/usr/local/OLlinks/dupdb/redo03/redo0503.log'
35> ) SIZE 50M,
36> GROUP 6 (
37> '/usr/local/OLlinks/dupdb/redo01/redo0601.log',
38> '/usr/local/OLlinks/dupdb/redo02/redo0602.log',
39> '/usr/local/OLlinks/dupdb/redo03/redo0603.log'
40> ) SIZE 50M,
41> GROUP 7 (
42> '/usr/local/OLlinks/dupdb/redo01/redo0701.log',
43> '/usr/local/OLlinks/dupdb/redo02/redo0702.log',
44> '/usr/local/OLlinks/dupdb/redo03/redo0703.log'
45> ) SIZE 50M,
46> GROUP 8 (
47> '/usr/local/OLlinks/dupdb/redo01/redo0801.log',
48> '/usr/local/OLlinks/dupdb/redo02/redo0802.log',
49> '/usr/local/OLlinks/dupdb/redo03/redo0803.log'
50> ) SIZE 50M,
51> GROUP 9 (
52> '/usr/local/OLlinks/dupdb/redo01/redo0901.log',
53> '/usr/local/OLlinks/dupdb/redo02/redo0902.log',
54> '/usr/local/OLlinks/dupdb/redo03/redo0903.log'
55> ) SIZE 50M,
56> GROUP 10 (
57> '/usr/local/OLlinks/dupdb/redo01/redo1001.log',
58> '/usr/local/OLlinks/dupdb/redo02/redo1002.log',
59> '/usr/local/OLlinks/dupdb/redo03/redo1003.log'
60> ) SIZE 50M
61> ;
62> }
63>
using target database control file instead of recovery catalog
allocated channel: aux1
channel aux1: sid=242 devtype=DISK
executing command: SET until clause
Starting Duplicate Db at 26-SEP-12
contents of Memory Script:
set until scn 211054288;
set newname for datafile 1 to
"/usr/local/OLlinks/dupdb/system/system01.dbf";
set newname for datafile 2 to
"/usr/local/OLlinks/dupdb/system/undotbs01.dbf";
set newname for datafile 3 to
"/usr/local/OLlinks/dupdb/system/sysaux01.dbf";
set newname for datafile 4 to
"/usr/local/OLlinks/dupdb/system/users01.dbf";
set newname for datafile 5 to
"/usr/local/OLlinks/dupdb/data01/data1.dbf";
set newname for datafile 6 to
"/usr/local/OLlinks/dupdb/index01/index1.dbf";
restore
check readonly
clone database
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 26-SEP-12
released channel: aux1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/26/2012 08:28:53
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 6 found to restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
Recovery Manager complete.
SQL*Plus: Release 10.2.0.4.0 - Production on Wed Sep 26 08:28:53 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected.
alter user sys identified by "Sco_tch!1"
ERROR at line 1:
ORA-01109: database not open
alter user system identified by "Sco_tch!1"
ERROR at line 1:
ORA-01109: database not open
alter user dbsnmp identified by "Sco_tch!1"
ERROR at line 1:
ORA-01109: database not open
alter user sysman identified by "Sco_tch!1"
ERROR at line 1:
ORA-01109: database not open
ORA-01507: database not mounted
ORACLE instance shut down.
ORACLE instance started.
Total System Global Area 134217728 bytes
Fixed Size 2054448 bytes
Variable Size 79693520 bytes
Database Buffers 50331648 bytes
Redo Buffers 2138112 bytes
ORA-00205: error in identifying control file, check alert log for more info
alter database noarchivelog
ERROR at line 1:
ORA-01507: database not mounted
alter database open
ERROR at line 1:
ORA-01507: database not mounted
Disconnected from Oracle Database 10g Release 10.2.0.4.0 - 64bit Production
oracle:dupdb@kacdb4:/u01/app/oracle/KAC_SCRIPTS/dupdb/logs->
Please let me know if you need anything else.
Sincerely,
Elizabeth -
Tablespace Point in Time Recovery fails with RMAN-06026:
I have cataloged with RMAN the datafiles from Snapshot backup. Still it fails with the following error.
RMAN> RECOVER TABLESPACE TSPC UNTIL TIME "to_date('03-apr-2013 02:18:00','dd-mon-yyyy hh24:mi:ss')" AUXILIARY DESTINATION '/tmp/auxpran';
Starting recover at 03-APR-13
using channel ORA_DISK_1
RMAN-05026: WARNING: presuming following set of tablespaces applies to specified point-in-time
List of tablespaces expected to have UNDO segments
Tablespace SYSTEM
Tablespace UNDOTBS1
Creating automatic instance, with SID='Ebgt'
initialization parameters used for automatic instance:
db_name=ORCL
db_unique_name=Ebgt_tspitr_ORCL
compatible=11.2.0.0.0
db_block_size=8192
db_files=200
sga_target=280M
processes=50
db_create_file_dest=/tmp/auxpran
log_archive_dest_1='location=/tmp/auxpran'
#No auxiliary parameter file used
starting up automatic instance ORCL
Oracle instance started
Total System Global Area 292933632 bytes
Fixed Size 1336092 bytes
Variable Size 100666596 bytes
Database Buffers 184549376 bytes
Redo Buffers 6381568 bytes
Automatic instance created
Running TRANSPORT_SET_CHECK on recovery set tablespaces
TRANSPORT_SET_CHECK completed successfully
contents of Memory Script:
# set requested point in time
set until time "to_date('03-apr-2013 02:18:00','dd-mon-yyyy hh24:mi:ss')";
# restore the controlfile
restore clone controlfile;
# mount the controlfile
sql clone 'alter database mount clone database';
# archive current online log
sql 'alter system archive log current';
# avoid unnecessary autobackups for structural changes during TSPITR
sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';
executing Memory Script
executing command: SET until clause
Starting restore at 03-APR-13
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=19 device type=DISK
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: copied control file copy
input file name=/tmp/auxpran/controlbc.ctl
output file name=/tmp/auxpran/ORCL/controlfile/o1_mf_8opkv8v4_.ctl
Finished restore at 03-APR-13
sql statement: alter database mount clone database
sql statement: alter system archive log current
sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;
contents of Memory Script:
# set requested point in time
set until time "to_date('03-apr-2013 02:18:00','dd-mon-yyyy hh24:mi:ss')";
# set destinations for recovery set and auxiliary set datafiles
set newname for clone datafile 1 to new;
set newname for clone datafile 3 to new;
set newname for clone datafile 2 to new;
set newname for clone tempfile 1 to new;
set newname for datafile 5 to
"+DG_DATA/orcl/datafile/tspc.268.811733685";
# switch all tempfiles
switch clone tempfile all;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile 1, 3, 2, 5;
switch clone datafile all;
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
renamed tempfile 1 to /tmp/auxpran/ORCL/datafile/o1_mf_temp_%u_.tmp in control file
Starting restore at 03-APR-13
using channel ORA_AUX_DISK_1
One or more auxiliary set datafiles could not be removed
Removing automatic instance
shutting down automatic instance
database dismounted
Oracle instance shut down
Automatic instance removed
auxiliary instance file /tmp/auxpran/ORCL/controlfile/o1_mf_8opkv8v4_.ctl deleted
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/03/2013 02:32:55
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
Could anyone please reply ASAP?
Regards,
PranamI had created a snapshot of the database(datafiles and archivelogs) and cataloged them.
CATALOG START WITH "+TBL_DG_DATA/ORCL/DATAFILE/" NOPROMPT;
catalog start with "+DG_ARCH/ORCL/ARCHIVELOG/" NOPROMPT;
The time i gave was after the snapshot was created.
When it failed the first time I created another controlfile using
sql "alter database backup controlfile to ''/tmp/auxpran/controlbc.ctl''";
And ran the recover command after the time after i generated this controlfile. Changed nothing else. TSPITR completed successfully. But it had failed first time. Cannot figure how it ran the second time but failed the first time.
Removing automatic instance
Automatic instance removed
auxiliary instance file /tmp/auxpran/ORCL/datafile/o1_mf_temp_8opndd87_.tmp deleted
auxiliary instance file /tmp/auxpran/ORCL/onlinelog/o1_mf_3_8opnd1o6_.log deleted
auxiliary instance file /tmp/auxpran/ORCL/onlinelog/o1_mf_2_8opncy32_.log deleted
auxiliary instance file /tmp/auxpran/ORCL/onlinelog/o1_mf_1_8opncv7d_.log deleted
auxiliary instance file /tmp/auxpran/ORCL/datafile/o1_mf_sysaux_8opn516p_.dbf deleted
auxiliary instance file /tmp/auxpran/ORCL/datafile/o1_mf_undotbs1_8opn4j14_.dbf deleted
auxiliary instance file /tmp/auxpran/ORCL/datafile/o1_mf_system_8opmyvly_.dbf deleted
auxiliary instance file /tmp/auxpran/ORCL/controlfile/o1_mf_8opmy14q_.ctl deleted
Finished recover at 03-APR-13 -
RMAN-20001: target database not found in recovery catalog
I am practicing loss off all control files. I have rman catalog backups which are set to autobackup controlfile. So far I did this.
RMAN> startup nomount;
Oracle instance started
Total System Global Area 209715200 bytes
Fixed Size 1272864 bytes
Variable Size 155190240 bytes
Database Buffers 50331648 bytes
Redo Buffers 2920448 bytes
RMAN> restore controlfile from autobackup;
Starting restore at 08-SEP-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
recovery area destination: /u02/flash_recovery
database name (or database unique name) used for search: TEST
channel ORA_DISK_1: autobackup found in the recovery area
channel ORA_DISK_1: autobackup found: /u02/flash_recovery/TEST/autobackup/2009_12_09/o1_mf_s_705171034_5l0kgv4o_.bkp
channel ORA_DISK_1: control file restore from autobackup complete
output filename=/u02/control_files/TEST/control02.ctl
output filename=/u03/oradata/TEST/control03.ctl
Finished restore at 08-SEP-10
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 09/08/2010 14:54:50
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog
I am assuming this has something to do with DBID but ... I don't have it and I don't know how to find it.Hi BelMan,
Here is output
BS Key Type LV Size Device Type Elapsed Time Completion Time
56869 Full 11.20M DISK 00:00:00 08-SEP-10
BP Key: 56871 Status: AVAILABLE Compressed: NO Tag: TAG20100908T135312
Piece Name: /u01/oracle/product/10.2.0/db_1/dbs/cf_c-549414289-20100908-00
Control File Included: Ckp SCN: 125665520 Ckp time: 08-SEP-10
BS Key Type LV Size Device Type Elapsed Time Completion Time
56993 Full 11.20M DISK 00:00:00 08-SEP-10
BP Key: 56995 Status: AVAILABLE Compressed: NO Tag: TAG20100908T142547
Piece Name: /u01/oracle/product/10.2.0/db_1/dbs/cf_c-549414289-20100908-01
Control File Included: Ckp SCN: 125668490 Ckp time: 08-SEP-10 -
Config recovery catalog database
dear all.
i had read several documents about "create recovery catalog", but all of that start with statement
CREATE TABLESPACE
...and continue with CREATE USER, etc.
I want to create a NEW database for recovery catalog, this database what characteristics must to have ?? Anyone have a link or document where explain me how to create a database (only i need database creation) for recovery catalog.???
thanks
The version is ORacle 10gr2hi,
the recovery catalog is just a normal database with a schema called rman or whatever you choose.
it should ideally be on a separate server to your target database. The RMAN database as with any other database should have multiplexed control files and redo files.
schema creation assumming windows O/S
-- Create tablepsace to hold repository
CREATE TABLESPACE "RMAN"
DATAFILE 'C:\ORACLE\ORADATA\W2K1\RMAN01.DBF' SIZE 6208K REUSE
AUTOEXTEND ON NEXT 64K MAXSIZE 32767M
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO;
-- Create rman schema owner
CREATE USER rman IDENTIFIED BY rman
TEMPORARY TABLESPACE temp
DEFAULT TABLESPACE rman
QUOTA UNLIMITED ON rman;
GRANT connect, resource, recovery_catalog_owner TO rman;
then create the recovery catalog
C:>rman catalog=rman/rman@w2k1
Recovery Manager: Release 9.2.0.1.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to recovery catalog database
recovery catalog is not installed
RMAN> create catalog tablespace "RMAN";
recovery catalog created
RMAN> exit
Recovery Manager complete.
C:>
then register your database
C:>rman catalog=rman/rman@w2k1 target=sys/password@w2k2
Recovery Manager: Release 9.2.0.1.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: W2K2 (DBID=1371963417)
connected to recovery catalog database
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
RMAN>
let us know how you get on.
rgds
alan
Maybe you are looking for
-
How to remove horizontal lines from black and white prints in LR 5?
hello, i have LR 5 on my iMac running Mavericks OS...i am very happy with it except for when i print from the print module when the pictures are black and white...color seems to be fine...but, the problem is that there are vertical lines space evenly
-
Can you change the theme color in iMovie for example from its current color of blue to red?
Can you change the color of a theme in iMovie ?- example: the sports theme is set to be blue and I would like it red.
-
Problems playing SVG animations
Dear Apple It was extremely nice news that you have added the SVG support to Safari 3.0. We would be more than happy to add Apple iPod and iPhone users to our community the fans of "The Spoon" animations. However, when testing my SVG animations with
-
SP is undefined in sharepoint hosted app client Webpart
Hello All, For a client web part in sharepoint hosted app, I am getting the following error "SP is undefined". My code is bel0w <script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js"> </script> <script type="te
-
KT4 Ultra-BSR multipler & CPU volts on XP2400 dont work!
Well after several atempts and clearing the cmos several times the multipler dosnt work on XP2400 and when you go to change the cpu voltage from auto it comes up with strange symbols not a voltage to select! so iam stuck at 141fsb and CPU voltage set