How To Open Physical Standby For Read Write Testing and Flashback
来源:互联网 发布:java static方法 编辑:程序博客网 时间:2024/06/10 18:17
Reference:
How To Open Physical Standby For Read Write Testing and Flashback MOS Note ID 805438.1
Step 1 - In Standby database
A ) Set up a flash recovery area.
If Flash Recovery Area ( FRA ) is not configured in the standby then enable it and make sure to give enough space for to FRA
SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST='/u01/oracle/flashback';
B ) Cancel Redo Apply and create a guaranteed restore point.
SQL> CREATE RESTORE POINT Standby_flashback_testing GUARANTEE FLASHBACK DATABASE;
To Confirim the details of restore point and its scn and time stamp run
NAME SCN TIME
-------------------------------------------------- ------------- ------------------------------
STANDBY_FLASHBACK_TESTING 22607810 12-APR-09 01.10.21.000000000 P
Step 2 - In Primary Database
A) On the primary database, switch logs so the SCN of the restore point will be archived on the physical standby database. When using standby redo log files, this step is essential to ensure the database can be properly flashed back to the restore point.
B ) Defer log archive destinations pointing to the standby that will be activated.
Step 3 - In Standby database
A ) Activate the physical standby database:
Once its done you can check the controlfile status will be changed from Standby to Current
CONTROL
-------
CURRENT
B) Then open the database.
SQL> ALTER DATABASE OPEN;
Step 4 - In Standby database
Once the standby database has been activated, you can run reporting tools or perform other testing and activities for days or even weeks, independent of the primary database
For example :
Table created.
SQL> insert into testing values ( 'testing for flashback on standby database');
1 row created.
SQL> commit;
Commit complete.
Step 5 - In standby database
A ) Revert the active standby database back to Physical standby database
A1. Mount the database.
A2. Flashback the database to restore point.
ORACLE instance started.
Total System Global Area 289406976 bytes
Fixed Size 1290208 bytes
Variable Size 159383584 bytes
Database Buffers 125829120 bytes
Redo Buffers 2904064 bytes
Database mounted.
SQL> FLASHBACK DATABASE TO RESTORE POINT Standby_flashback_testing ;
You can confirm the same by checking the controlfile status. It will be now backup controlfile
CONTROL
--------------
BACKUP
B ) Convert to Standby database
SQL> STARTUP MOUNT FORCE;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
SQL> select controlfile_type from v$database;
--------------
STANDBY
Step 6 - In standby database
A ) Put the standby database in managed recovery mode.Let archive gap resolution fetch all missing archived redo log files and allow Redo Apply to apply the gap.
Step 7 - In Primary database
A ) Re-enable archiving to the physical standby database:
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ENABLE;
Step 8 - In Standby database
A ) Open the database in Read only mode and ensure that all the transaction done in active mode are no more
SQL> ALTER DATABASE OPEN READ ONLY;
SQL> select * from testing;
select * from testing
*
ERROR at line 1:
ORA-00942: table or view does not exist
B ) Drop the restore point
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
SQL> DROP RESTORE POINT Standby_flashback_testing ;
Caution:
While the database is activated, it is not receiving redo data from the primary database and cannot provide disaster protection. It is recommended that there be at least two physical standby databases participating in the configuration so that the primary database remains protected against data loss.
- How To Open Physical Standby For Read Write Testing and Flashback
- "physical standby"置于read/write状态
- How to use java Properties API -- read and write
- How To Read and Write XML Documents with GDataXML
- How To Read and Write XML Documents with GDataXML
- How To Read and Write XML Documents with GDataXML
- How to read and write JSON files in Java(Gson)
- Script to Collect Data Guard Physical and Active Standby Diagnostic Info for 10g and above(+RAC)
- How to open/read/write a local file from an applet
- 使用flashback database 特性将dataguard 的standby 库激活为read write的实现方法
- How to create a logical standby database based on a physical standby database
- How To Read and Write BLOB Data by Using ADO.NET with Visual C# .NET
- How To Read and Write BLOB Data by Using ADO.NET with Visual C# .NET
- How to mount partition with ntfs file system and read write access
- How To Read and Write XML Documents with GDataXML(使用GData读写XML文档)
- How to mount partition with ntfs file system and read write access
- Opening Files for Read and Write
- read from and write to file
- Python_主成分分析
- 系统优化-----sysctl.conf文件内核设置参数详解
- java堆栈内存解释
- Linux命令之"less"
- Mac苹果电脑 安装virtualBox
- How To Open Physical Standby For Read Write Testing and Flashback
- 欢迎使用CSDN-markdown编辑器
- [jaVA学习2]InputStreamReader练习读取中文文档
- 一种新的直线段检测算法---LSD:a Line Segment Detector
- Problem C: [noip2016十连测第五场]travel (贪心)
- 利用crontab定时启动任务
- Symfony环境搭建
- 通过实例理解AOP
- AndroidStudio上遇到的一些问题(2)