Backup standby database

We have 11grac implemented on windows with a physical standby on DR site, please advise how I can take backup of the phyiscal standby database?

I have done cold backups of the RAC standby databases in ASM from another database on the same box that is open using the DBMS_FILE_TRANSFER.COPY_FILE unility. I do the following steps 1) Use the following script to create a cold backups script when the standby is in mount mode. 2) Shutdown the standby. 3) Run the result script in another database that is in open mode (the DBMS_FILE_TRANSFER.COPY_FILE will only run in an open database). 4) restart the standby application of archive logs after the cold backup is done.
-- script to create cold backup of RAC ASM Standby
set pages 0
set feedback off
set lines 300
col dummy noprint
set wrap off
-- for gzip's to work
col name for a50
select name from v$datafile;
select 'cd /stg/oracle/backups/cold_backup' from dual
select 'CREATE OR REPLACE DIRECTORY asm_files AS '''||'&substr_ASM_PREFIX_OF_FILENAME'||''' ;' from dual
-- grants not needed if running from sys
select 'GRANT WRITE ON DIRECTORY asm_files TO "ENWEBP1";' from dual
select 'CREATE OR REPLACE DIRECTORY DSK_FILES AS ''/stg/oracle/backups/cold_backup'';' from dual
select 'GRANT WRITE ON DIRECTORY dsk_files TO "ENWEBP1";' from dual
select substr(name,length(name)-instr(reverse(name),'/',1)+2,100)||'.A' dummy,'exec DBMS_FILE_TRANSFER.COPY_FILE ( ''asm_files'' , '''
||substr(name,length(name)-instr(reverse(name),'/',1)+2,100)
||''' , ''dsk_files'' , '''||substr(name,length(name)-instr(reverse(name),'/',1)+2,100)||''' );' cmd
from v$datafile
where upper(substr(name,1,length('&substr_ASM_PREFIX_OF_FILENAME')))=upper('&substr_ASM_PREFIX_OF_FILENAME')
union
select substr(name,length(name)-instr(reverse(name),'/',1)+2,100)||'.B' dummy,'host gzip '
||substr(name,length(name)-instr(reverse(name),'/',1)+2,100) cmd from v$datafile
where upper(substr(name,1,length('&substr_ASM_PREFIX_OF_FILENAME')))=upper('&substr_ASM_PREFIX_OF_FILENAME')
order by dummy
select name||'.A' dummy,'CREATE OR REPLACE DIRECTORY asm_files AS '''||substr(name,1,length(name)-instr(reverse(name),'/',1))||''' ;'
from v$controlfile
union
select name||'.b' dummy,'exec DBMS_FILE_TRANSFER.COPY_FILE ( ''asm_files'' , '''||substr(name,length(name)-instr(reverse(name),'/',1)+2,100)
||''' , ''dsk_files'' , '''||substr(name,length(name)-instr(reverse(name),'/',1)+2,100)||''' );'
from v$controlfile order by dummy
set pages 100
set feedback on
If I do happen to restore, I 1) Shutdown the standby 2) Erase datafiles and controlfiles (I keep the redo logs but that last script later (see below) will drop and recreate them with the clear command so you can also remove the redo logs if you wish). 3) Use the following script to create a restore script.
-- Script to create cold restore of RAC standby database in ASM
set pages 0
set feedback off
set lines 300
col dummy noprint
set wrap off
-- for gzip's to work
col name for a50
select name from v$datafile;
select 'cd /stg/oracle/backups/cold_backup' from dual
select 'rm '||name from v$datafile order by name
select 'CREATE OR REPLACE DIRECTORY asm_files AS '''||'&substr_ASM_PREFIX_OF_FILENAME'||''' ;' from dual
-- grants not needed if running from sys
select 'GRANT WRITE ON DIRECTORY asm_files TO "ENWEBP1";' from dual
select 'CREATE OR REPLACE DIRECTORY DSK_FILES AS ''/stg/oracle/backups/cold_backup'';' from dual
select 'GRANT WRITE ON DIRECTORY dsk_files TO "ENWEBP1";' from dual
select substr(name,length(name)-instr(reverse(name),'/',1)+2,100)||'.A' dummy,'host gunzip '
||substr(name,length(name)-instr(reverse(name),'/',1)+2,100)||'.gz' cmd from v$datafile
where upper(substr(name,1,length('&substr_ASM_PREFIX_OF_FILENAME')))=upper('&substr_ASM_PREFIX_OF_FILENAME')
union
select substr(name,length(name)-instr(reverse(name),'/',1)+2,100)||'.B' dummy,'exec DBMS_FILE_TRANSFER.COPY_FILE ( ''dsk_files'' , '''
||substr(name,length(name)-instr(reverse(name),'/',1)+2,100)
||''' , ''asm_files'' , '''||substr(name,length(name)-instr(reverse(name),'/',1)+2,100)||''' );' cmd
from v$datafile
where upper(substr(name,1,length('&substr_ASM_PREFIX_OF_FILENAME')))=upper('&substr_ASM_PREFIX_OF_FILENAME')
union
select substr(name,length(name)-instr(reverse(name),'/',1)+2,100)||'.C' dummy,'host gzip '
||substr(name,length(name)-instr(reverse(name),'/',1)+2,100) cmd from v$datafile
where upper(substr(name,1,length('&substr_ASM_PREFIX_OF_FILENAME')))=upper('&substr_ASM_PREFIX_OF_FILENAME')
order by dummy
select name||'.A' dummy,'CREATE OR REPLACE DIRECTORY asm_files AS '''||substr(name,1,length(name)-instr(reverse(name),'/',1))||''' ;'
from v$controlfile
union
select name||'.b' dummy,'exec DBMS_FILE_TRANSFER.COPY_FILE ( ''dsk_files'' , '''||substr(name,length(name)-instr(reverse(name),'/',1)+2,100)
||''' , ''asm_files'' , '''||substr(name,length(name)-instr(reverse(name),'/',1)+2,100)||''' );'
from v$controlfile order by dummy
set pages 100
set feedback on
and finally I run 4) clear redo logs with the following script:
set pages 0
set feedback off
select 'alter database recover managed standby database cancel;' from dual;
select 'alter database clear logfile group '||group#||';' from v$log order by group#;
set feedback on
set pages 100
and 5) Open database and restart replication
For Example:
ENWEBP1 > @cr8_COLD_BACKUP_dbms_FILE_TRANSFER_COPY_FILE_from_ASM_to_FS.sql
Enter value for substr_asm_prefix_of_filename: +DATA1/nwebp/datafile
Enter value for substr_asm_prefix_of_filename: +DATA1/nwebp/datafile
Enter value for substr_asm_prefix_of_filename: +DATA1/nwebp/datafile
Enter value for substr_asm_prefix_of_filename: +DATA1/nwebp/datafile
Enter value for substr_asm_prefix_of_filename: +DATA1/nwebp/datafile
cd /stg/oracle/backups/cold_backup
CREATE OR REPLACE DIRECTORY asm_files AS '+DATA1/nwebp/datafile' ;
GRANT WRITE ON DIRECTORY asm_files TO "ENWEBP1";
CREATE OR REPLACE DIRECTORY DSK_FILES AS '/stg/oracle/backups/cold_backup';
GRANT WRITE ON DIRECTORY dsk_files TO "ENWEBP1";
Enter value for substr_asm_prefix_of_filename: +DATA1/nwebp/datafile
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'asm_files' , 'content_data.290.623955671' , 'dsk_files' , 'content_data.290.623955671' );
host gzip content_data.290.623955671
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'asm_files' , 'gsis_data.284.623955547' , 'dsk_files' , 'gsis_data.284.623955547' );
host gzip gsis_data.284.623955547
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'asm_files' , 'site_data.288.623955617' , 'dsk_files' , 'site_data.288.623955617' );
host gzip site_data.288.623955617
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'asm_files' , 'sysaux.264.621275031' , 'dsk_files' , 'sysaux.264.621275031' );
host gzip sysaux.264.621275031
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'asm_files' , 'system.262.621275025' , 'dsk_files' , 'system.262.621275025' );
host gzip system.262.621275025
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'asm_files' , 'undotbs1.263.621275031' , 'dsk_files' , 'undotbs1.263.621275031' );
host gzip undotbs1.263.621275031
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'asm_files' , 'undotbs2.266.621275035' , 'dsk_files' , 'undotbs2.266.621275035' );
host gzip undotbs2.266.621275035
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'asm_files' , 'undotbs3.267.621275037' , 'dsk_files' , 'undotbs3.267.621275037' );
host gzip undotbs3.267.621275037
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'asm_files' , 'users.268.621275039' , 'dsk_files' , 'users.268.621275039' );
host gzip users.268.621275039
CREATE OR REPLACE DIRECTORY asm_files AS '+DATA1/nwebp' ;
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'asm_files' , 'control01.ctl' , 'dsk_files' , 'control01.ctl' );
CREATE OR REPLACE DIRECTORY asm_files AS '+DATA1/nwebp' ;
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'asm_files' , 'control02.ctl' , 'dsk_files' , 'control02.ctl' );
CREATE OR REPLACE DIRECTORY asm_files AS '+DATA1/nwebp' ;
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'asm_files' , 'control03.ctl' , 'dsk_files' , 'control03.ctl' );
ENWEBP1 > @cr8_COLD_RESTORE_dbms_FILE_TRANSFER_COPY_FILE_from_FS_to_ASM.sql
Enter value for substr_asm_prefix_of_filename: +DATA1/nwebp/datafile
CREATE OR REPLACE DIRECTORY asm_files AS '+DATA1/nwebp/datafile' ;
GRANT WRITE ON DIRECTORY asm_files TO "ENWEBP1";
CREATE OR REPLACE DIRECTORY DSK_FILES AS '/stg/oracle/backups/cold_backup';
GRANT WRITE ON DIRECTORY dsk_files TO "ENWEBP1";
Enter value for substr_asm_prefix_of_filename: +DATA1/nwebp/datafile
Enter value for substr_asm_prefix_of_filename: +DATA1/nwebp/datafile
Enter value for substr_asm_prefix_of_filename: +DATA1/nwebp/datafile
Enter value for substr_asm_prefix_of_filename: +DATA1/nwebp/datafile
Enter value for substr_asm_prefix_of_filename: +DATA1/nwebp/datafile
Enter value for substr_asm_prefix_of_filename: +DATA1/nwebp/datafile
cd /stg/oracle/backups/cold_backup
rm +DATA1/nwebp/datafile/content_data.290.623955671
rm +DATA1/nwebp/datafile/gsis_data.284.623955547
rm +DATA1/nwebp/datafile/site_data.288.623955617
rm +DATA1/nwebp/datafile/sysaux.264.621275031
rm +DATA1/nwebp/datafile/system.262.621275025
rm +DATA1/nwebp/datafile/undotbs1.263.621275031
rm +DATA1/nwebp/datafile/undotbs2.266.621275035
rm +DATA1/nwebp/datafile/undotbs3.267.621275037
rm +DATA1/nwebp/datafile/users.268.621275039
rm +DATA3/nwebp/datafile/content_index01.dbf
rm +DATA3/nwebp/datafile/gsis_index01.dbf
rm +DATA3/nwebp/datafile/polls_data01.dbf
rm +DATA3/nwebp/datafile/polls_index01.dbf
rm +DATA3/nwebp/datafile/profile_data01.dbf
rm +DATA3/nwebp/datafile/profile_index01.dbf
rm +DATA3/nwebp/datafile/site_index01.dbf
CREATE OR REPLACE DIRECTORY asm_files AS '+DATA1/nwebp/datafile' ;
GRANT WRITE ON DIRECTORY asm_files TO "ENWEBP1";
CREATE OR REPLACE DIRECTORY DSK_FILES AS '/stg/oracle/backups/cold_backup';
GRANT WRITE ON DIRECTORY dsk_files TO "ENWEBP1";
host gunzip content_data.290.623955671.gz
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'dsk_files' , 'content_data.290.623955671' , 'asm_files' , 'content_data.290.623955671' );
host gzip content_data.290.623955671
host gunzip gsis_data.284.623955547.gz
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'dsk_files' , 'gsis_data.284.623955547' , 'asm_files' , 'gsis_data.284.623955547' );
host gzip gsis_data.284.623955547
host gunzip site_data.288.623955617.gz
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'dsk_files' , 'site_data.288.623955617' , 'asm_files' , 'site_data.288.623955617' );
host gzip site_data.288.623955617
host gunzip sysaux.264.621275031.gz
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'dsk_files' , 'sysaux.264.621275031' , 'asm_files' , 'sysaux.264.621275031' );
host gzip sysaux.264.621275031
host gunzip system.262.621275025.gz
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'dsk_files' , 'system.262.621275025' , 'asm_files' , 'system.262.621275025' );
host gzip system.262.621275025
host gunzip undotbs1.263.621275031.gz
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'dsk_files' , 'undotbs1.263.621275031' , 'asm_files' , 'undotbs1.263.621275031' );
host gzip undotbs1.263.621275031
host gunzip undotbs2.266.621275035.gz
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'dsk_files' , 'undotbs2.266.621275035' , 'asm_files' , 'undotbs2.266.621275035' );
host gzip undotbs2.266.621275035
host gunzip undotbs3.267.621275037.gz
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'dsk_files' , 'undotbs3.267.621275037' , 'asm_files' , 'undotbs3.267.621275037' );
host gzip undotbs3.267.621275037
host gunzip users.268.621275039.gz
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'dsk_files' , 'users.268.621275039' , 'asm_files' , 'users.268.621275039' );
host gzip users.268.621275039
CREATE OR REPLACE DIRECTORY asm_files AS '+DATA1/nwebp' ;
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'dsk_files' , 'control01.ctl' , 'asm_files' , 'control01.ctl' );
CREATE OR REPLACE DIRECTORY asm_files AS '+DATA1/nwebp' ;
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'dsk_files' , 'control02.ctl' , 'asm_files' , 'control02.ctl' );
CREATE OR REPLACE DIRECTORY asm_files AS '+DATA1/nwebp' ;
exec DBMS_FILE_TRANSFER.COPY_FILE ( 'dsk_files' , 'control03.ctl' , 'asm_files' , 'control03.ctl' );
ENWEBP1 > @RMAN_Cr8_Clear_Standby_logs.sql
alter database recover managed standby database cancel;
alter database clear logfile group 1;
alter database clear logfile group 2;
alter database clear logfile group 3;
alter database clear logfile group 4;
alter database clear logfile group 5;
alter database clear logfile group 6;
alter database clear logfile group 7;
alter database clear logfile group 8;
alter database clear logfile group 9;
alter database clear logfile group 10;
alter database clear logfile group 11;
alter database clear logfile group 12;
alter database clear logfile group 13;
alter database clear logfile group 14;
alter database clear logfile group 15;
Alan

Similar Messages

  • Standby database from RMAN backup

    I have been assigned to create a standby database from our RMAN backups in a different machine, as this is my first attempt at recovering, I am struggling a bit. I would appreciate if someone can throw any light on what dumb mistakeI am doing here. I ahve absolutely no control over the back up script which is done by my vendor, but can do anything in the reocvery portion. I did try going through the documentaiton and other help available for the last 2 days.
    Database : Oracle 10G R2
    OS : Windows Server 2003
    My backup script is
    configure channel device type disk format 'J:\RMAN\RMAN_df_%U' maxpiecesize 2048M;
    SQL "ALTER SYSTEM SWITCH LOGFILE";
    SQL "ALTER SYSTEM SWITCH LOGFILE";
    backup database;
    SQL "ALTER SYSTEM SWITCH LOGFILE";
    SQL "ALTER SYSTEM SWITCH LOGFILE";
    backup current controlfile for standby FORMAT='J:\RMAN\RMAN_sc_%U';
    For recovery of a standby database,
    I have copied the the back up pieces and the archive logs to the standby server where I have just created an instance with the same name as production db.
    set ORACLE_SID=NGINPROD
    set dbid 820336652
    STARTUP NOMOUNT
    RESTORE STANDBY CONTROLFILE FROM 'I:\TEMP\RMAN_Backup\RMAN\RMAN_SC_2UMIUJM1_1_1';
    CATALOG BACKUPPIECE 'I:\TEMP\RMAN_Backup\RMAN\RMAN_DF_2RMIUIE4_1_1',
    'I:\TEMP\RMAN_Backup\RMAN\RMAN_DF_2RMIUIE4_2_1',
    'I:\TEMP\RMAN_Backup\RMAN\RMAN_DF_2RMIUIE4_3_1',
    'I:\TEMP\RMAN_Backup\RMAN\RMAN_DF_2RMIUIE4_4_1',
    'I:\TEMP\RMAN_Backup\RMAN\RMAN_DF_2RMIUIE4_5_1',
    'I:\TEMP\RMAN_Backup\RMAN\RMAN_DF_2RMIUIE4_6_1',
    'I:\TEMP\RMAN_Backup\RMAN\RMAN_DF_2RMIUIE4_7_1',
    'I:\TEMP\RMAN_Backup\RMAN\RMAN_DF_2SMIUJ88_1_1',
    'I:\TEMP\RMAN_Backup\RMAN\RMAN_DF_2SMIUJ88_2_1',
    'I:\TEMP\RMAN_Backup\RMAN\RMAN_DF_2SMIUJ88_3_1',
    'I:\TEMP\RMAN_Backup\RMAN\RMAN_DF_2SMIUJ88_4_1',
    'I:\TEMP\RMAN_Backup\RMAN\RMAN_DF_2TMIUJLN_1_1',
    'I:\TEMP\RMAN_Backup\RMAN\RMAN_SC_2UMIUJM1_1_1';
    RESTORE DATABASE;
    Till this step I do not encounter any issues, but when i try to recover the database I am hit with the below error.
    RMAN> recover database;
    Starting recover at 16-AUG-11
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=156 devtype=DISK
    starting media recovery
    unable to find archive log
    archive log thread=1 sequence=253340
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 08/16/2011 09:31:57
    RMAN-06054: media recovery requesting unknown log: thread 1 seq 253340 lowscn 4696173517
    ------------------------------------------------------------------------------------------------------------------------------------------------

    Here's the standard dcoumentation on the procedure :
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/rcmbackp.htm#i636377
    Appendix "F Creating a Standby Database with Recovery Manager" of the "Oracle® Data Guard Concepts and Administration" guide.
    I don't see ArchiveLog backups being done by the vendor's script. How do you backup the ArchiveLogs ?
    In your post you state that you have copied the ArchiveLogs. Are they copied to the same log_archive_dest location ? RMAN needs to be "aware" of them. You can use the "CATALOG" command in RMAN to register them into the controlfile.
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta011.htm#sthref230
    A Standby Database uses a Standby Controlfile which is created from the Primary (with the "ALTER DATABASE CREATE STANDBY CONTROLFILE AS 'locaion';" command) and then copied over to the Standby server.
    Hemant K Chitale

  • BRARCHIVE backup for high volume offline redo log files on Standby Database

    Hi All,
    We are through with all of Standby database activity, also started applying the offline redo log files on the Standby site.
    The throughput is not utilizing the actual available bandwith.
    So we are not able to copy the offline redo files on time, as the offline redo files are piling up on the Production side.
    My query is how we can parallely copy the offline redo log files on the DR site (ie. 4-5 redo files at a time).
    Kindly guide for the same.
    Regards,
    Shaibaz

    hi,
    I have one doubt.
    On other server (r3qas) the Umask settings are as followed
    User     UMASK value
    <sid>adm          077              
    ora<SID>           077
    root                   077
    Running SAP System :   SAP R3 4.6C
    Running DBMS          :  Oracle 9.0
    Operating System      :- HP_UX
    On this system The new offline redo log files are created with 600 permissions. There is not a problem here, while taking the backup. I checked last "r3qas-archive" backups. There, i have not found any single error related to permissions, or any others (something like, Cannot open /oracle/RQ1/../.........dbf).
    If everything is working fine, with this umask setting on this server, then, what's going wrong with the BW Quality server, which have the same umask settings (also others) for all the concerned users, as mentioned above.
    Regards,
    Bhavik Shroff

  • Backuping up a standby database in a Data Guard environment!

    Hello everyone,
    I have set a Data Guard in Oralce 10.2.0 between 2 databases for testing purposes. Each database is located on a different server. I want to schedule an incremental backup of the standby database to do an incremental level_1 backup everyday. I am following this paper:
    [Using Recovery Manager with Oracle Data Guard in Oracle Database 10g|http://www.oracle.com/technetwork/database/features/availability/rman-dataguard-10g-wp-1-129486.pdf]
    but it's really unclear, for me, how this command sequence is constructed:
    RECOVER COPY OF DATABASE WITH TAG ‘OSS’;
    BACKUP DEVICE TYPE DISK INCREMENTAL LEVEL 1 FOR
    RECOVER OF COPY WITH TAG ‘OSS’ DATABASE;
    BACKUP ARCHIVELOG ALL NOT BACKED UP TO SBT;
    BACKUP BACKUPSET ALL;How can I recover a copy of database that wasn't backed up before? When I did that in RMAN, I got the following output:
    Starting recover at 03-APR-11
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=159 devtype=DISK
    no copy of datafile 1 found to recover
    no copy of datafile 2 found to recover
    no copy of datafile 3 found to recover
    no copy of datafile 4 found to recover
    no copy of datafile 5 found to recover
    Finished recover at 03-APR-11Could anyone please help me understanding this sequence of commands in a simple way to get a better idea of how to backup a standby database?
    Thanks in advance...

    On the first day, there is no backup to recover. It is only on the third day's run that this command will really be successful.
    The white paper does explain this.
    Hemant K Chitale

  • Create standby database using restore backup

    Hi,
    I am creating a standby database 11g using  manual process of restoring a backup , but to no avail. I can not even restore the backup successfully.
    This is the steps I followed (courtesy of ORACLE-BASE) ORACLE-BASE - Data Guard Physical Standby Setup in Oracle Database 11g Release 2
    I am confused about these steps:
    Copy the files from the primary to the standby server.
    Copy Standby controlfile to all locations.
    $ scp oracle@ol5-112-dga1:/tmp/db11g_stby.ctl /u01/app/oracle/oradata/DB11G/control01.ctl
    $ cp /u01/app/oracle/oradata/DB11G/control01.ctl /u01/app/oracle/fast_recovery_area/DB11G/control02.ctl
    My question is, for the 2nd copy, do I need to shutdown the primary db? since control01.ctl is being updated all the time?
    Can I not used the standby ctl (db11g_stbg.ctl) and copy it to /u01/app/oracle/fast_recovery_area/DB11G/control02.ctl instead?
    Your assistance is highly appreciated.

    f55237a7-2c38-4db3-a7a3-1d77256f0730 wrote:
    Hi,
    I am creating a standby database 11g using  manual process of restoring a backup , but to no avail. I can not even restore the backup successfully.
    This is the steps I followed (courtesy of ORACLE-BASE) ORACLE-BASE - Data Guard Physical Standby Setup in Oracle Database 11g Release 2
    I am confused about these steps:
    Copy the files from the primary to the standby server.
    Copy Standby controlfile to all locations.
    $ scp oracle@ol5-112-dga1:/tmp/db11g_stby.ctl /u01/app/oracle/oradata/DB11G/control01.ctl
    $ cp /u01/app/oracle/oradata/DB11G/control01.ctl /u01/app/oracle/fast_recovery_area/DB11G/control02.ctl
    My question is, for the 2nd copy, do I need to shutdown the primary db? since control01.ctl is being updated all the time?
    Can I not used the standby ctl (db11g_stbg.ctl) and copy it to /u01/app/oracle/fast_recovery_area/DB11G/control02.ctl instead?
    Your assistance is highly appreciated.
    Hi,
    You are created standby  control file on primary and copied to standby  side:
    $ scp oracle@ol5-112-dga1:/tmp/db11g_stby.ctl /u01/app/oracle/oradata/DB11G/control01.ctl
    And now, in paramter files, you have CONTROL_FILES parameter as below :
    control_files='/u01/app/oracle/oradata/DB11G/control01.ctl', '/u01/app/oracle/fast_recovery_area/DB11G/control02.ctl'
    it means you must copy controlfile IN standby side to second control file. Control  files must be same.
    $ cp /u01/app/oracle/oradata/DB11G/control01.ctl /u01/app/oracle/fast_recovery_area/DB11G/control02.ctl
    My question is, for the 2nd copy, do I need to shutdown the primary db? since control01.ctl is being updated all the time?
    You not need shutdown priamry database, becuase you  copied standby control file to standby side, and all operations goin in standby side.
    Can I not used the standby ctl (db11g_stbg.ctl) and copy it to /u01/app/oracle/fast_recovery_area/DB11G/control02.ctl instead?
    Yes, you can use (db11g_stbg.ctl)  standby controlfile
    Regard
    Mahir M. Quluzade

  • Build standby database using cold backup on a different file system & host

    Hi gurus,
    The database version is 11.2.0.3. OS is HP UX Itanium 11.31
    I am building a standby database using cold backup of primary. The primary mount points are (/p003/oracle, /p004/oracle) on HOST1 and the standby file system on HOST2 are (/s003/oracle,/s004/oracle). I am not using Data Guard to apply logs as we have a script that mounts the log location periodically to standby server and apply the logs to make it current. I am using cold backup as the database is small like 200G and can be taken down. Could someone help me with the steps to build standby using cold backup for a different file location in standby ?? My concern is I can copy the data files from /p003 to /s003. How will I build the controlfile ?
    If it was same File system on both HOST 1 and HOST2 I can copy the cold backup to the standby server, build a standby control file on primary and copy and replace the standby control file and everything was set.
    Thanks
    Cherrish Vaidiyan

    Hello;
    I have a note on this using a cold copy of the current files instead of a copy backup :
    http://www.visi.com/~mseberg/data_guard_on_oracle_10_step_by_step.html
    I will post SCP SQL in a moment.
    Best Regards
    mseberg
    set heading off
    set feedback off
    set pagesize 100
    set linesize 400
    select 'scp '||a.name ||' server_name:' || a.name as newname from v$datafile a;
    select 'scp '||a.name ||' server_name:' || a.name as newname from v$controlfile a;
    select 'scp '||a.member ||' server_name:' || a.member as newname from v$logfile a;Edited by: mseberg on May 25, 2013 10:35 AM

  • Do I need to use standby database in begin backup mode to take the backup?

    Hi All,
    I have a 10g(10.2.0.4) primary database with standby on a solaris platform. I need to create another standby database for the same primary.
    I have stopped the recovery on existing standby database and started copying(os copy) the files from existing standby to 2nd standby server. However I haven't kept the existing standby database(mounted) in begin backup mode. Is it okay?
    Thanks,
    Arun

    Backup mode for a mounted database?
    orclz>
    orclz> startup mount
    ORACLE instance started.
    Total System Global Area  788529152 bytes
    Fixed Size                  3050600 bytes
    Variable Size            373293976 bytes
    Database Buffers          406847488 bytes
    Redo Buffers                5337088 bytes
    Database mounted.
    orclz>
    orclz> alter database begin backup;
    alter database begin backup
    ERROR at line 1:
    ORA-01109: database not open
    orclz>

  • Backup of a standby database

    Good afternoon,
    I'm using a physical standby database v 10g and I would like to know if it can be backed up with RMAN and if there is a reason to do that.
    When I try to registrer that database, I got this message
    RMAN-08040: full resync skipped, control file is not current or backup
    Is this because the dbid is the same as for the production database
    Thanks for your help
    Fabrice

    Hi,
    You should be able to backup the standby database. The error should be because you have already registered the database in the same catalog. You should be able to register your database in a different catalog.
    Yes... Backing up a stand by database is also an option/feature provided by Oracle. You can take backups of standby instead of live database as this can reduce the stress on the live system.
    Please refer to Standby database concepts for more information.
    HTH.
    Regards,
    Badri.

  • What are the steps applying incremental backups to standby database 11g

    Hi All,
    I have built 11g none ASM standby database from ASM RAC Database. Now I want to apply incremental backup to the standby database from primary but not sure how to do it. I tried following and I had an error “ORA-01103: database name 'ins-prim' in control file is not 'ins-sec'”
    1- I have configured standby database with RMAN backup.
    2- After finishing installation, I took a incremental backup from primary server(ins-prim) and moved incremental backup and control file to the standby (ins-sec) database
    3- I stared standby database nomount mode
    4- restore controlfile from “incremental backup location in standby database”
    5- alter database mount; and got this error
    “ORA-01103: database name 'ins-prim' in control file is not 'ins-sec'”
    What are the steps applying incremental backups to standby database with 11g?
    Thank you

    I build the database from backup and changed from ASM to none ASM and changed location of data files and logfiles. I think this changes makes the standby database as logical one.
    You can a have a physical standby with different locations for everything (redo/controlfiles/datafiles), ASM and no ASM etc. I have a such a configuration in production (10gR2)
    I build the database from backup
    Are you sure you have a standby ? Ins-sec receives the archivelog files from the primary ? How did you proceed to build this database ? I suspect you don't have a standby at all ! If you have duplicated the database ins-sec and ins-pri are independent databases and you won't be able to apply an incremental backup (your script was not correct but it is another story)

  • Rman backup with  standby database

    Hi All,
    I am looking for some suggestions for rman backup with standby  database with datagaurd but no active DG. I wanted to do a rman tablespace backup. but I am stuck at  sql 'alter system archive log current' in rman  with standby as target. which gives following errors  with or without noswitch clause
    RMAN> sql 'alter system archive log current noswitch';
    sql statement: alter system archive log current noswitch
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of sql command on default channel at 10/05/2013 18:15:12
    RMAN-11003: failure during parse/execution of SQL statement: alter system archive log current noswitch
    ORA-01109: database not open
    Recovery Manager: Release 11.2.0.1.0
    Oracle databaes  Release 11.2.0.1.0 64 bit
    OS:RHEL 6 x86-64 bit
    Secondly, do I need to cancel manged recovery while taking rman backups on standby.
    I scanned thru MOS but could find solutions for rman with active DG.
    Thanks in advance

    726d07e6-b870-431f-8c22-a499c3ec4e0c wrote:
    Hi All,
    I am looking for some suggestions for rman backup with standby  database with datagaurd but no active DG. I wanted to do a rman tablespace backup. but I am stuck at  sql 'alter system archive log current' in rman  with standby as target. which gives following errors  with or without noswitch clause
    RMAN> sql 'alter system archive log current noswitch';
    sql statement: alter system archive log current noswitch
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of sql command on default channel at 10/05/2013 18:15:12
    RMAN-11003: failure during parse/execution of SQL statement: alter system archive log current noswitch
    ORA-01109: database not open
    Recovery Manager: Release 11.2.0.1.0
    Oracle databaes  Release 11.2.0.1.0 64 bit
    OS:RHEL 6 x86-64 bit
    Secondly, do I need to cancel manged recovery while taking rman backups on standby.
    I scanned thru MOS but could find solutions for rman with active DG.
    Thanks in advance
    "I scanned thru MOS but could find solutions for rman with active DG."
    Howto make a consistent RMAN backup in an Standby database in Active DataGuard mode (Doc ID 1419923.1)

  • Physical standby database backup

    HI,
    Is it necessary to take a physical standby Db backup.our standby db is in manual mode and it is opened for read only mode.we are taking backups of priamary database,I am taking care of DR site.So i would like to know should i go for a RMAN to take a standby database or as wer are taking a backup of primarty db so there is no need to take backup of standby db.
    If our primary db is failed then we can swithciover to standby to primary but if we are not having a backup of standby db then can we recover the standby db from primary db backup.
    another question is that while taking logical backup of the primary db from the client side i.e remote location ,backup is failed bcoz our ary Db version is
    SQL> select * from v$version;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    PL/SQL Release 9.2.0.6.0 - Production
    CORE    9.2.0.6.0       Production
    TNS for Solaris: Version 9.2.0.6.0 - Production
    NLSRTL Version 9.2.0.6.0 - Productionbut our oracle client version is 9.2.0.1 and the backup was terminated after gerating an error *"ORA-03113 exp-00056 getting an error while exporting "*
    Pls suggest me.....

    Hi!
    There is no need to take a backup of your standby DB. A standby DB is only a clone of your primary DB so if your standby DB crashes you can take a backup of your primary DB and build a new standby DB.
    Your problem with logical backup. The Oracle clientsoftware should allways have the same version as your DB. Avoid situations where client and server have different version. If it is possible upgrade your clientsoftware.
    Hope this helps!

  • RMAN backup on the physical standby database.

    Hello,
    11.2.0.3 EE database. Is it a requirement to open the database in read only mode in order to take a hot backup?
    SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
    SQL> ALTER DATABASE OPEN READ ONLY;
    I've initiated a rman backup without opening the db in read only and the following output is so far:
    RMAN> backup format '/dbstor2/LTS/LTS_rman/%d_set%s_piece%p_%T_%U' check logical database plus archivelog;
    Starting backup at 15-OCT-12
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=603 device type=DISK
    specification does not match any archived log in the repository
    backup cancelled because there are no files to backup
    I plan on taking this backup and using it to refresh our Dev and QA dbs. Do you see any issues with taking a backup without opening the db in ready only mode?
    -SteveV

    No we are not using Active Dataguard. An issue I am investigating is why can't I perform an archivelog backup from the standby?
    RMAN> backup archivelog all format '/dbstor2/LTS/LTS_rman/arc.rman.bak';
    Starting backup at 15-OCT-12
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=603 device type=DISK
    specification does not match any archived log in the repository
    backup cancelled because there are no files to backup
    Finished backup at 15-OCT-12

  • Oracle EBS R12 - 11.2.0.2 - Logical Standby Database & RMAN backups

    Hi all,
    I have Oracle EBusiness Suite R12 running on 11.2.0.2. Our organization used to have most of the business in North America, South America and Europe; but now we are also in Australia, China and Indonesia. Previously running large reporting batch jobs and RMAN backups at night time in USA was feasible but now that is beginning to show up as performance issue for some countries.
    I was thinking would it make sense to have a Active Data Guard logical standby database on a separate server in the same US based data center where we have our main servers and use that logical standy database for reporting and RMAN backups. I am especially concerned about RMAN backups. Would I be able to make RMAN backups from the logical standy database and somehow use those to recover our primary database if some issue happens?
    Any thoughts/suggestions?
    Thanks all,

    Active Data Guard only deals with physical standbys. If you are using a logical standby you can always open the database without using Active Data Guard option.
    http://docs.oracle.com/cd/E11882_01/server.112/e25608/rman.htm#sthref846 says that:
    >
    Backups of logical standby databases are not usable at the primary database.

  • How to restore a database from backup taken in standby database

    Its our  environment standard to run backup in standby database.
    Now we have to perform refresh production database to UAT database.
    I have performed normal refresh/duplicate.  Is there any additional procedures need to be followed to perform refresh from standby database backup

    RMAN Restoration to New Server with Different Directory and New Database Name
    In this case, I have an existing production database with RMAN Level 0 backup:
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'C:\flash_recovery_area\galaxy\backupsets\autobackup\SAMSUNG-ctl_%F';
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'C:\flash_recovery_area\galaxy\backupsets\level0\level0-%d-%T-%U' MAXPIECESIZE 4G;
    DELETE NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE - 7';
    SHOW ALL;
    REPORT SCHEMA;
    LIST BACKUP OF DATABASE;
    REPORT NEED BACKUP;
    REPORT UNRECOVERABLE;
    LIST EXPIRED BACKUP BY FILE;
    LIST ARCHIVELOG ALL;
    REPORT OBSOLETE;
    CROSSCHECK BACKUP DEVICE TYPE DISK;
    CROSSCHECK COPY OF ARCHIVELOG ALL;
    DELETE NOPROMPT EXPIRED BACKUP DEVICE TYPE DISK;
    DELETE NOPROMPT OBSOLETE DEVICE TYPE DISK;
    RUN {
    sql 'alter system archive log current';
    BACKUP INCREMENTAL LEVEL 0 DATABASE PLUS ARCHIVELOG DELETE INPUT;
    LIST BACKUP OF DATABASE;
    REPORT NEED BACKUP;
    REPORT UNRECOVERABLE;
    LIST EXPIRED BACKUP BY FILE;
    LIST ARCHIVELOG ALL;
    REPORT OBSOLETE;
    CROSSCHECK BACKUP DEVICE TYPE DISK;
    CROSSCHECK COPY OF ARCHIVELOG ALL;
    DELETE NOPROMPT EXPIRED BACKUP DEVICE TYPE DISK;
    DELETE NOPROMPT OBSOLETE DEVICE TYPE DISK;
    The backupsets will be restored into a new server with different file structure. The database will also be different. In the new server, I have created a blank database (SID or CUSTOM database with the name DBGRID). This is easier so I won't have to create any directories, user ORADIM or create new PWFile.
    This document assumes that a blank (starter) database has been created in the new server. The RDBMS version is the same as the source database.
    In this example, the source database name is GALAXY and the target database name is DBGRID.
    Let me know if you have any feedback or comments. All I want is to share these steps with you and make it better so we can help other DBA's as well.
    Steps start here
    -->
    ORIGINAL DATABASE: GALAXY
    DUPLICATE DATABASE: DBGRID
    FROM THE SOURCE DATABASE (GALAXY)
    1. Backup the database using RMAN incremental backups.
    2. Check the RMAN logs generated and look for the result of the command:
    C:\Users\Administrator>set ORACLE_SID=GALAXY
    C:\Users\Administrator>rman target /
    Recovery Manager: Release 11.2.0.1.0 - Production on Wed Aug 1 06:55:08 2012
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    connected to target database: GALAXY (DBID=3578870300)
    RMAN> report schema;
    using target database control file instead of recovery catalog
    Report of database schema for database with db_unique_name GALAXY
    List of Permanent Datafiles
    ===========================
    File Size(MB) Tablespace RB segs Datafile Name
    1    680      SYSTEM *** C:\ORACLE\ORADATA\GALAXY\SYSTEM01.DBF
    2    510      SYSAUX *** C:\ORACLE\ORADATA\GALAXY\SYSAUX01.DBF
    3    140      UNDOTBS1 *** C:\ORACLE\ORADATA\GALAXY\UNDOTBS01.DBF
    4    5        USERS *** C:\ORACLE\ORADATA\GALAXY\USERS01.DBF
    5    106      EXAMPLE *** C:\ORACLE\ORADATA\GALAXY\EXAMPLE01.DBF
    6    2048     ALLINDEX *** C:\ORACLE\ORADATA\GALAXY\ALLINDEX01.DBF
    List of Temporary Files
    =======================
    File Size(MB) Tablespace Maxsize(MB) Tempfile Name
    1    29       TEMP 32767 C:\ORACLE\ORADATA\GALAXY\TEMP01.DBF
    This command shows all the physical database files that will be backed-up by the current RMAN job.
    List the online redolog files:
    SQL> select * from v$logfile;
    GROUP# STATUS  TYPE    MEMBER IS_
    3         ONLINE C:\ORACLE\ORADATA\GALAXY\REDO03A.LOG     NO
    3         ONLINE C:\ORACLE\ORADATA\GALAXY\REDO03B.LOG     NO
    2         ONLINE C:\ORACLE\ORADATA\GALAXY\REDO02A.LOG     NO
    2         ONLINE C:\ORACLE\ORADATA\GALAXY\REDO02B.LOG     NO
    1         ONLINE C:\ORACLE\ORADATA\GALAXY\REDO01A.LOG     NO
    1         ONLINE C:\ORACLE\ORADATA\GALAXY\REDO01B.LOG     NO
    6 rows selected.
    3. Since the target server has different structure, it is easier to use a pfile to startup the database rather than restoring the spfile from backup.
    C:\Users\Administrator>set ORACLE_SID=GALAXY
    C:\Users\Administrator>sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 1 06:56:14 2012
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> create pfile='C:\TEMP\initGALAXYrman.ora' from spfile;
    File created.
    4. Edit the pfile to have the following parameters:
    (These parameters has been edited to fit the target database requirements)
    galaxy entries has been changed to dbgrid. Directories has been corrected as well.
    dbgrid.__db_cache_size=192937984
    dbgrid.__java_pool_size=4194304
    dbgrid.__large_pool_size=4194304
    dbgrid.__oracle_base='D:\app\Administrator'#ORACLE_BASE set from environment
    dbgrid.__pga_aggregate_target=281018368
    dbgrid.__sga_target=524288000
    dbgrid.__shared_io_pool_size=0
    dbgrid.__shared_pool_size=301989888
    dbgrid.__streams_pool_size=4194304
    *.audit_file_dest='D:\app\Administrator\admin\DBGRID\adump'
    *.audit_trail='db'
    *.compatible='11.2.0.0.0'
    *.control_files='D:\oradata\DBGRID\control01.ctl','D:\oradata\DBGRID\control02.ctl'
    *.db_block_size=8192
    *.db_domain=''
    Leave as it is for now --> *.db_name='GALAXY'
    *.db_recovery_file_dest='D:\fra\backupsets\duplicate'
    *.DB_RECOVERY_FILE_DEST_SIZE=4G
    *.diagnostic_dest='D:\app\Administrator'
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=DBGRIDXDB)'
    *.job_queue_processes=1000
    *.log_archive_dest_1='location=D:\fra\backupsets\archs'
    *.log_buffer=10485760
    *.memory_target=805306368
    *.open_cursors=300
    *.processes=800
    *.remote_login_passwordfile='EXCLUSIVE'
    *.session_cached_cursors=300
    *.sessions=885
    *.undo_tablespace='UNDOTBS1'
    Make sure that all the directory values in this edited pfile are existing in the target server.
    5. Copy all the RMAN backup pieces generated in the source database. Transfer the edited pfile as well. Make sure that all directories presented in the pfile exists in the target server.
    In this example, RMAN backupsets are located at:
    Backupsets:
    Level0 and Level1 = D:\fra\backupsets\duplicate\level0 , D:\fra\backupsets\duplicate\level1
    Controlfile and Spfile Autobackup = D:\fra\backupsets\duplicate\autobackup
    Edited pfile initGALAXYrman= C:\TEMP\initDBGRIDnew.ora
    FROM THE TARGET DATABASE (DBGRID)
    6. Connect to RMAN and perform database duplication using RMAN backup restoration
    C:\Users\Administrator>rman target /
    Recovery Manager: Release 11.2.0.1.0 - Production on Wed Aug 1 07:26:45 2012
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    connected to target database (not started)
    RMAN> set dbid = 3578870300; --> THIS IS THE DBID OF THE SOURCE DATABASE!
    executing command: SET DBID
    RMAN> startup nomount pfile='C:\TEMP\initDBGRIDnew.ora'; -->restore the edited pfile
    Oracle instance started
    Total System Global Area     535662592 bytes
    Fixed Size 1375792 bytes
    Variable Size 327156176 bytes
    Database Buffers 192937984 bytes
    Redo Buffers 14192640 bytes
    RMAN> restore controlfile from 'D:\fra\backupsets\duplicate\autobackup\SAMSUNG-CTL_C-3578870300-20120801-00'; -->restore the correct controlfile
    Starting restore at 01-AUG-12
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=19 device type=DISK
    channel ORA_DISK_1: restoring control file
    channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
    output file name=D:\ORADATA\DBGRID\CONTROL01.CTL
    output file name=D:\ORADATA\DBGRID\CONTROL02.CTL
    Finished restore at 01-AUG-12
    RMAN> alter database mount; -->mount the database
    database mounted
    released channel: ORA_DISK_1
    RMAN> catalog start with "D:\fra\backupsets\duplicate";
    --> catalog the location of the backup pieces to make it known to the control file
    Starting implicit crosscheck backup at 01-AUG-12
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=19 device type=DISK
    Crosschecked 3 objects
    Finished implicit crosscheck backup at 01-AUG-12
    Starting implicit crosscheck copy at 01-AUG-12
    using channel ORA_DISK_1
    Finished implicit crosscheck copy at 01-AUG-12
    searching for all files in the recovery area
    cataloging files...
    no files cataloged
    searching for all files that match the pattern D:\fra\backupsets\duplicate
    List of Files Unknown to the Database
    =====================================
    File Name: D:\FRA\BACKUPSETS\duplicate\autobackup\SAMSUNG-CTL_C-3578870300-20120801-00
    File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-01NHGTGV_1_1
    File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-02NHGTIA_1_1
    File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-03NHGTMT_1_1
    Do you really want to catalog the above files (enter YES or NO)? YES
    cataloging files...
    cataloging done
    List of Cataloged Files
    =======================
    File Name: D:\FRA\BACKUPSETS\duplicate\autobackup\SAMSUNG-CTL_C-3578870300-20120801-00
    File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-01NHGTGV_1_1
    File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-02NHGTIA_1_1
    File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-03NHGTMT_1_1
    RMAN> list backup summary; -->check your backup they are now known
    List of Backups
    ===============
    Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
    1 B  A  A DISK 01-AUG-12       1       2 NO         TAG20120801T011054
    2 B  0  A DISK 01-AUG-12       1       2 NO         TAG20120801T011137
    3 B  A  A DISK 01-AUG-12       1       2 NO         TAG20120801T011405
    RMAN> list archivelog all; -->list you archivelog for point in time recovery
    List of Archived Log Copies for database with db_unique_name GALAXY
    =====================================================================
    Key Thrd Seq     S Low Time
    26 1    29      A 01-AUG-12
    Name: D:\FRA\BACKUPSETS\ARCHS\ARC0000000029_0785167457.0001
    Perform database restoration and recovery. The sequence number is Seq+1 for complete recovery, so that will be 29 + 1 = 30. You can also do recovery via SCN or time based recovery.
    Remember in the previous step: RMAN> REPORT SCHEMA;
    Each datafile has a corresponding datafile number.
    Follow the format to convert them into their respective new restoration directory in the target server.
    SET NEWNAME has the format:
    SET NEWNAME FOR DATAFILE [FILE NUMBER IN THE REPORT SCHEMA COMMAND] TO
    ‘[NEW LOCATION AND FILENAME OF THE DATAFILES]’;
    RMAN> run {
    2> SET UNTIL SEQUENCE 30 THREAD 1;
    3> set newname for datafile 1 to 'D:\oradbgrid\oradata\SYSTEM01.DBF';
    4> set newname for datafile 2 to 'D:\oradbgrid\oradata\SYSAUX01.DBF';
    5> set newname for datafile 3 to 'D:\oradbgrid\oradata\UNDOTBS01.DBF';
    6> set newname for datafile 4 to 'D:\oradbgrid\oradata\USERS01.DBF';
    7> set newname for datafile 5 to 'D:\oradbgrid\oradata\EXAMPLE01.DBF';
    8> set newname for datafile 6 to 'D:\oradbgrid\oradata\ALLINDEX01.DBF';
    9> restore database;
    10> switch datafile all;
    11> recover database;
    12> }
    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 01-AUG-12
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=19 device type=DISK
    channel ORA_DISK_1: starting datafile backup set restore
    channel ORA_DISK_1: specifying datafile(s) to restore from backup set
    channel ORA_DISK_1: restoring datafile 00001 to D:\oradbgrid\oradata\SYSTEM01.DBF
    channel ORA_DISK_1: restoring datafile 00002 to D:\oradbgrid\oradata\SYSAUX01.DBF
    channel ORA_DISK_1: restoring datafile 00003 to D:\oradbgrid\oradata\UNDOTBS01.DBF
    channel ORA_DISK_1: restoring datafile 00004 to D:\oradbgrid\oradata\USERS01.DBF
    channel ORA_DISK_1: restoring datafile 00005 to D:\oradbgrid\oradata\EXAMPLE01.DBF
    channel ORA_DISK_1: restoring datafile 00006 to D:\oradbgrid\oradata\ALLINDEX01.DBF
    channel ORA_DISK_1: reading from backup piece D:\FRA\BACKUPSETS\DUPLICATE\LEVEL0\LEVEL0-GALAXY-20120801-02NHGTIA_1_1
    channel ORA_DISK_1: piece handle=D:\FRA\BACKUPSETS\DUPLICATE\LEVEL0\LEVEL0-GALAXY-20120801-02NHGTIA_1_1 tag=TAG20120801T011137
    channel ORA_DISK_1: restored backup piece 1
    channel ORA_DISK_1: restore complete, elapsed time: 00:02:06
    Finished restore at 01-AUG-12
    Starting recover at 01-AUG-12
    using channel ORA_DISK_1
    starting media recovery
    archived log for thread 1 with sequence 29 is already on disk as file D:\FRA\BACKUPSETS\ARCHS\ARC0000000029_0785167457.0001
    archived log file name=D:\FRA\BACKUPSETS\ARCHS\ARC0000000029_0785167457.0001 thread=1 sequence=29
    media recovery complete, elapsed time: 00:00:01
    Finished recover at 01-AUG-12
    Log in to SQL*Plus to recreate the redolog files.
    Format:
    ALTER DATABASE RENAME FILE ‘[OLD REDOLOG LOCATION]’ TO ‘[NEW REDOLOG LOCATION]’;
    C:\Users\Administrator>sqlplus "/ as sysdba"
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 1 08:54:27 2012
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select instance_name, status from v$instance;
    INSTANCE_NAME STATUS
    dbgrid MOUNTED
    SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO03A.LOG' TO 'C:\oracle\oradata\dbgrid\REDO03A.LOG';
    Database altered.
    SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO03B.LOG' TO 'C:\oracle\oradata\dbgrid\REDO03B.LOG';
    Database altered.
    SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO02A.LOG' TO 'C:\oracle\oradata\dbgrid\REDO02A.LOG';
    Database altered.
    SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO02B.LOG' TO 'C:\oracle\oradata\dbgrid\REDO02B.LOG';
    Database altered.
    SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO01A.LOG' TO 'C:\oracle\oradata\dbgrid\REDO01A.LOG';
    Database altered.
    SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO01B.LOG' TO 'C:\oracle\oradata\dbgrid\REDO01B.LOG';
    Database altered.
    Open the database in resetlogs option. Create spfile from the edited pfile then bounce the database.
    RMAN> alter database open resetlogs;
    database opened
    SQL> create spfile from pfile='C:\TEMP\initDBGRIDnew.ora';
    File created.
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup
    ORACLE instance started.
    Total System Global Area  535662592 bytes
    Fixed Size 1375792 bytes
    Variable Size 327156176 bytes
    Database Buffers 192937984 bytes
    Redo Buffers 14192640 bytes
    Database mounted.
    Database opened.
    SQL> select instance_name, status from v$instance;
    INSTANCE_NAME STATUS
    dbgrid OPEN
    Create a new TEMP tablespace, make this as the new default temporary tablespace. Drop the old TEMP tablespace. Restart the database.
    SQL> CREATE TEMPORARY TABLESPACE TEMP01 TEMPFILE 'D:\oradbgrid\oradata\TEMP0101.dbf' SIZE 200M;
    Tablespace created.
    SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP01;
    Database altered.
    SQL> drop tablespace TEMP including contents and datafiles;
    Tablespace dropped.
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup mount;
    ORACLE instance sta

  • Is Fast Incremental Backups  possible on standby databases for 10.2.0.5?

    Hi,
    Can anyone help to clarify if it is possible to have Fast Incremental Backups on 10.2.0.5 standby .  The information in MOS (Doc ID 262853.1) stated:
    Note :  Fast Incremental Backups were not possible on standby databases till 10g
    but from 11g Fast Incremental Backups are available on standby databases also.
    It sounds ambiguous.
    Thanks
    Jun

    The answer is No, due bug 6130588.
    Is Block Change Tracking Enabled On Physical Standby Supported By Rman (Doc ID 468576.1)

Maybe you are looking for

  • How to set up a RSS channel via portal

    Hi, I know this question is very simple to some but I am a newbie. But I know that we need to use the xml channel to create a rss channel. I am trying to use the swforum rss channel as my example. But where do I find the info for the xslFileName and

  • Adobe Media Encoder - Encoding Very Unreliable and Freezes regularly

    Hello All Would really appreciate this being addressed very soon as it is having a huge negative effect on our workflow currently. Basically we have 4 films all no more than 30mins in length that we need to encoded for BluRay and DVD having edited th

  • Color 1.5 and Matrox MXO2 Mini

    Hey all. Just got the MXO2 Mini from Matrox which is really amazing. I use Apple, Adobe and Avid products so when Avid announced that this would be the device they will be compatible with I jumped on getting one. It works amazingly well in every prod

  • Anyone shed some light on this???

    Hi there, I have a class that returns a value based on a calculation with in the class 2 of the variables are called from a database, which is working however when I try to output the result on a jsp page ie. calling the property 'rating' I am told i

  • Duplicate item does not validate it

    Hello when I use F3 key to duplicate a lookup item (has invisible foreign key item) the duplicated item does not fire When-Validate-Item trigger to brings it invisible foreign key, How to solve this problem?