Oracle   Home  

 

Oracle Database 9i, 10g, 11g

Oracle Data Warehouse & BI

Oracle Applications EBS 11i, R12

 Oracle Middleware

SQL & PL/SQL

UNIX/ Linux

   Home  >  Oracle Database Administration (DBA)  >  Replication  >  How to create a Physical Standby database with RMAN

 

 

Oracle 10g, 11g Database Administration (DBA): Replication

How to create a Physical Standby database with RMAN 

 

 

1. Install Oracle binaries on the standby host 

 

Oracle binaries (the same patch level) must be installed on the standby host if is not already done. 

 

 

2. Put the primary database in archivelog mode

 

Put the primary database in archivelog mode if is not already done. 

 

SQL> shutdown immediate;

SQL> startup mount;

SQL> alter database archivelog;

SQL> alter database open;

 

 

3. Create the same directory structures

 

Create the same directory structure for the data files, control files, redo log files, archivelog files. 

 

If the data or redo log file directories are different the following line ( adapted to your case) must be added in pfile:

 

db_file_name_convert =("/u01/oradata/PRD","/u02/oradata/PRD")
log_file_name_convert =("/u01/oradata/PRD","/u02/oradata/PRD")

 

 

4. Backup the primary database

 

$ export ORACLE_SID=PRD 

$ rman target=/ 

Note: if you are not sure that rman from your $ORACLE_HOME is used run

$ which rman  

 

RMAN> run { 
    allocate channel c1 type disk; 
    backup format '/u02/backups/PRD/DataFile_t%t_s%s_p%p' database; 
    backup current controlfile for standby format '/u02/backups/PRD/sby_t%t_s%s_p%p';
    sql 'alter system archive log current'; 
    backup format '/u02/backups/PRD/ArhAll_t%t_s%s_p%p' archivelog all;
    release channel c1; 
}

 

 

5. Copy the RMAN files to the standby host 

 

Copy all the RMAN file (created for this backup) to the standby host in the same location (/u02/backups/PRD).

 

 

6. Create the pfile for the standby database

 

If the primary database use a spfile, create a pfile (connected as sys):

SQL> create pfile from spfile;

 

Copy the pfile from the primary database host to the standby database host to $ORACLE_HOME/dbs directory. 

Add in the standby pfile the line: db_unique_name=PRD_sb           (if the database name/ instance name is PRD )

 

 

7. Ensuring SQL*NET connections to primary database

 

 

8. Create the standby database

 

 

More information about  this subject ( How to create a Physical Standby database with RMAN ) you can get from  www.in-oracle.com

 

 

 

Oracle Database 9i, 10g, 11g

Oracle Data Warehouse & BI Oracle Applications EBS 11i, R12  Oracle Middleware

SQL & PL/SQL

UNIX/ Linux

   Home  >  Oracle Database Administration (DBA)  >  Replication  >  How to create a Physical Standby database with RMAN

 

 

Different Romanian Links/ Linkuri romanesti diferite

  1. Invata limba engleza (Learn English language if you are Romanian)

  Doresti un proiect de arhitectura ieftin (pentru zonele Buzau, Bucuresti sau Prahova) ?

Disclaimer: The views expressed on this web site are my own and do not reflect the views of Oracle Corporation. You may use the information from this site only at your risk. Copyright (c) 2009-2011 Paul Catalin Tomoiu. All rights reserved.