Creating and updating duplicate databases with rman 11g agame dating
To find the current DB_NAME and ORACLE_SID: =========================================== Query the views v$database and v$thread. For example, search through disks and do a grep ORACLE_SID * 4.V$DATABASE gives DB_NAME V$THREAD gives ORACLE_SID If ORACLE_SID = DB_SID and db_name = DBNAME: To find the current value of ORACLE_SID: SVRMGR select name from v$database; NAME --------- DBNAME Modifying a database to run under a new ORACLE_SID: =================================================== 1. Change locations to the "dbs" directory % cd $ORACLE_HOME/dbs and rename the following files: o (or use pfile to point to the init file.) o control file(s).
For a backup-based duplicate, or a manual restore, take a backup of the primary database. $ scp [email protected]:/tmp/db11g_/u01/app/oracle/oradata/DB11G/control01$ cp /u01/app/oracle/oradata/DB11G/control01/u01/app/oracle/fast_recovery_area/DB11G/control02$ # Archivelogs and backups $ scp -r [email protected]:/u01/app/oracle/fast_recovery_area/DB11G/archivelog /u01/app/oracle/fast_recovery_area/DB11G $ scp -r [email protected]:/u01/app/oracle/fast_recovery_area/DB11G/backupset /u01/app/oracle/fast_recovery_area/DB11G $ # Parameter file.
And lastly, where can I find out the SID of my database? We can have more then 1 database on the same oracle home so we need a way to id them. I know you are on unix, so here are the steps for changing it (or the database name) under Unix - they are different on NT.
How to find the sid -- "select instance from v$thread" will do that.
In addition to the previous setting, it is recommended to make sure the primary is ready to switch roles to become a standby.
For that to work properly we need to set the following parameters.