Action at AT Primary
Took RMAN backup and copy folder at similar location at
standby server
RMAN Script
run
{
CONFIGURE
CONTROLFILE AUTOBACKUP ON;
CONFIGURE
CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'F:\TEST_BKP\autobackup_control_file%F';
allocate
channel bkp1 device type disk;
allocate
channel bkp2 device type disk;
BACKUP AS
COMPRESSED BACKUPSET DATABASE FORMAT 'F:\TEST_BKP\databasefiles_%d_%u_%s_%T';
BACKUP AS
COMPRESSED BACKUPSET ARCHIVELOG ALL FORMAT 'F:\TEST_BKP\archivelogs_%d_%u_%s_%T';
BACKUP AS
COMPRESSED BACKUPSET CURRENT CONTROLFILE FORMAT 'F:\TEST_BKP\controlfile_%d_%u_%s_%T';
release channel
bkp1;
release channel
bkp2;
}
SQL> create pfile='f:\init.ora' from spfile;
SQL> alter database create standby controlfile as
'F:\std_control01.ctl';
Copy above both files to standby database server and change
parameter as per standby database like unique_name, fal_client/server etc and
created directory structure accordingly at standby server.
And multiplex control file at different location and changed
name control01.ctl, control02.ctl and control03.ctl.
At Standby
1.
SQL>startup nomount pfile=<pfile path>;
2.
SQL> alter database mount standby database;
3.
Shut immediate
4.
Startup nomount
5.
rman target sys/<Password>@test AUXILIARY sys/<Password>@drtest
6.
RMAN> duplicate target database for standby
dorecover nofilenamecheck;
(No matter file structure is same or different it will
work)
7.
Checking log gap status
SQL> alter database mount standby database;
SQL> select l.log_applied , a.log_archived from
(select
max(sequence#) Log_Applied from
v$log_history ) l ,
(select
max(sequence#) log_archived from
v$archived_log ) a
/
8.
Started managed recovery mode
SQL> alter database recover managed standby database
disconnect from session;
9.
Registering archive logs after copying from Primary
when it was not shipping automatically
SQL> alter database register logfile
'F:\oracle_archives\rtprd\ARCH_TEST_1_11672_869162225.ARC';
10.
Stopped managed recovery mode
SQL> alter database recover managed standby database
cancel;
11.
Started managed recovery mode
SQL> alter database recover managed standby database
disconnect from session;
12.
Checking database status
SQL> select name, open_mode, database_role from
v$database;
13.
Bounce database
Sql> Startup nomount
Sql>alter database mount standby
database;
Now log shipping and apply will be started automatically.
Comments
Post a Comment