ADDING DATAFILE TO
STANDBY
1.Add datafile on the primary database as usual.
1.Add datafile on the primary database as usual.
SQL> ALTER TABLESPACE ADD DATAFILE ‘/dbdata/p1erp/datafile_name’ SIZE integer M;
2.Check if the standby database is in mount state else wait
till the database comes to that state.
( Note: Every day at 12:00 AM (CST) the P2ERP instance will
go to the mount state)
3. Bring down the P2ERP instance
SQL> SHUTDOWN IMMEDIATE;
(Before you copy the control file to standby)
4.Start the instance in nomount state
SQL> STARTUP NOMOUNT:
5. Create a standby control file on primary(P1ERP).
5. Create a standby control file on primary(P1ERP).
SQL> ALTER DATABASE CREATE STANDBY CONTROLFILE AS ‘/path/file_name’;
6. Backup the existing controlfile for P2ERP instance
Location:
/dbdata/p1erp/control01.ctl
/dbdata/p1erp/control02.ctl
/dbredo/p1erp/control03.ctl
7. Copy the Standby controlfile to standby database
server(S2-TORCL)
scp login_name@s3-poracle:/dbdata/p1erp/stbyctl1.dbf
/dbdata/p1erp/control01.ctl
cp /dbdata/p1erp/control01.ctl /dbdata/p1erp/control02.ctl
cp /dbdata/p1erp/control01.ctl /dbredo/p1erp/control03.ctl
cp /dbdata/p1erp/control01.ctl /dbdata/p1erp/control02.ctl
cp /dbdata/p1erp/control01.ctl /dbredo/p1erp/control03.ctl
8. Mount the standby database
SQL> ALTER DATABASE MOUNT STANDBY
DATABASE;
(Note: please check space availability)
9.Create the datafile on the standby database. For example,
issue:
SQL> ALTER DATABASE CREATE DATAFILE '/dbdata/p1erp/filename'
AS '/dbdata/p1erp/filename';
10.Place the standby database in managed recovery mode:
SQL> RECOVER MANAGED STANDBY DATABASE DISCONNECT;
Check if the archive logs on both instances are in sync
SQL> ALTER DATABASE CREATE DATAFILE '/dbdata/p1erp/filename'
AS '/dbdata/p1erp/filename';
10.Place the standby database in managed recovery mode:
SQL> RECOVER MANAGED STANDBY DATABASE DISCONNECT;
Check if the archive logs on both instances are in sync
!!!!!!! Mission accomplished !!!!!!!!
No comments:
Post a Comment