- alter database recover managed standby database cancel;
- create restore point Before_App_Test guarantee flashback database;
- shutdown immediate;
- startup mount exclusive;
- flashback database to timestamp to_timestamp(‘2011-02-18 11:35:00′,’YYYY-MM-DD HH24:MI:SS’);
- alter database activate standby database;
- alter database open;
- Run script on UAT “Payroll_delete” present in V:\Scripts\Qadb_cardswipe (For UAT only)
- alter system set job_queue_processes=0;
- alter user dbas identified by uat;
- grant dba to dbas;
- alter user dbas default role all;
—————Recover back to the original ——————————-
- shutdown immediate;
- startup mount force;
- flashback database to restore point before_app_test;
- alter database convert to physical standby;
- STARTUP MOUNT FORCE;
- alter database recover managed standby database disconnect;
- ALTER SYSTEM SET log_archive_dest_state_3=’ENABLE’
- DROP RESTORE POINT Before_App_Test;
Snapshot Standby
sql> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
Convert the standby to a snapshot standby. The following example queries the V$DATABASE view to show that flashback database is not enabled prior to the conversion operation.
sql> SELECT flashback_on FROM v$database;
FLASHBACK_ON
——————
NO
ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;
ALTER DATABASE OPEN;
SELECT flashback_on FROM v$database;
FLASHBACK_ON
——————
RESTORE POINT ONLY
SQL>
You can now do treat the standby like any read-write database.
To convert it back to the physical standby, losing all the changes made since the conversion to snapshot standby, issue the following commands.
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE CONVERT TO PHYSICAL STANDBY;
SHUTDOWN IMMEDIATE;
STARTUP NOMOUNT;
ALTER DATABASE MOUNT STANDBY DATABASE;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
SELECT flashback_on FROM v$database;
FLASHBACK_ON
——————
NO
No comments:
Post a Comment