Standby Database Creation

Steps to create the physical standby database:
1. Take the backup of production database
2. Create standby controlfile
3. Copy the backup, standy controfile and init.ora files to standby box
4. Create necessary directories
5. Edit the init.ora file
6. Mount the database
7. Restore the database
8. Start the recovery

1. Take the backup of production database
rman> run {
allocate channel c1 type disk format ‘/backup/%d_rman_bkp_%T_p%p_s%s’ maxpiecesize 1800M;
allocate channel c2 type disk format ‘/backup/%d_rman_bkp_%T_p%p_s%s’ maxpiecesize 1800M;
allocate channel c3 type disk format ‘/backup/%d_rman_bkp_%T_p%p_s%s’ maxpiecesize 1800M;
allocate channel c4 type disk format ‘/backup/%d_rman_bkp_%T_p%p_s%s’ maxpiecesize 1800M;
backup as compressed backupset databse plus archivelog;
}

2. Create standby controlfile
sql> alter database create controlfile as ‘/backup/standby_controlfile.ctl’;

3. Copy the backup, controfile and init.ora files to standby box
use ftp or scp to copy the files

4. Create necessary directories
$ mkdir adump bdump cdump udump datafiles controlfiles redofiles archive

5. Edit the init.ora file
a. Change controfile path
b. Change the paths of all dump_dest parametes
c. Change the LOG_ARCHIVE_DEST path
d. Add below 3 parametes
DB_FILE_NAME_CONVERT=’/old_path1/’,’/new_path1/’ ,’/old_path2/’,’/new_path2/’
LOG_FILE_NAME_CONVERT=’/old_path/’,’/new_path/’
STANDBY_FILE_MANAGEMENT=’AUTO’

6. Mount the database
sql> startup mount pfile=’init.ora’

7. Restore the database
rman> run {
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
restore database;
}

8. Start the recovery
sql> alter database recover manged standby database disconnect;

Advertisements
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: