Powered By Blogger

Thursday, March 22, 2012

Simple RMAN Script for Creating Standby database

RMAN Script for creating standby database:

run {
   allocate channel prmy1 type disk;
    allocate channel prmy2 type disk;
    allocate channel prmy3 type disk;
    allocate channel prmy4 type disk;
    allocate auxiliary channel stby type disk;
    duplicate target database for standby from active database
    spfile
        parameter_value_convert 'orcl','orclsby1'
        set db_unique_name='orclsby1'
        set db_file_name_convert='/orcl/','/orclsby1/'
        set log_file_name_convert='/orcl/','/orclsby1/'
        set control_files='/u01/app/oracle/oradata/orclsby1.ctl'
        set log_archive_max_processes='5'
        set fal_client='orclsby1'
        set fal_server='orcl'
        set standby_file_management='AUTO'
        set log_archive_config='dg_config=(orcl,orclsby1)'
        set log_archive_dest_1='service=orcl ASYNC
valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=orcl';
     }

Adding standby redologs in standby database:

alter database add standby logfile
('/u01/app/oracle/oradata/orcl/srl01.log',
'/u01/app/oracle/oradata/orcl/srl02.log',
'/u01/app/oracle/oradata/orcl/srl03.log',
'/u01/app/oracle/oradata/orcl/srl04.log')
size 52428800
/
Regards,
Navaneeth

No comments:

Post a Comment