Test the DG Environment
Environment
Name |
Master Database |
Slave Database |
Host Name |
Bjsrv |
Shsrv |
Software Version |
RedHat performanise5.5, Oracle 11g 11.2.0.1 |
RedHat performanise5.5, Oracle 11g 11.2.0.1 |
1. Test process description [Supplement]: Change scott Password
SQL>Conn/as sysdba
SQL>Alter user scott identified by tiger;
SQL>Connscott/scott
SQL>Select * from tab;
SQL>Createtable emp1 as select * from emp;
SQL>Select * from tab;
On the slave database:
Log on to scott and prompt that the password is incorrect. (the password has been changed in the master database. If it is real-time synchronization, you can use it to log on to the slave database, but it is not successful. This verifies that the default setting of the master database and slave database is not the real-time synchronization mode)
By default, DG only performs recover on archived logs.
To achieve real-time synchronization, you need to start "real-time applications" (because synchronization is only available after recover), which will be introduced in subsequent courses.
SQL>Altersystem switch logfile ;.
// Switch the master database again. Archive logs (including password modification information) provided to the slave database for recover)
The slave database tries to log on to scott with the new password again.
SQL> conn scott/tiger // login successful
SQL> select * from tab; // The operation query table information on the slave database is displayed successfully.
Verify that the build of DG is successful.
2. query master database information
Query on the master database
SQL>Select name, dbid, database_role, protection_mode fromv $ database;
Database Name: TESTDB12
Database ID: 2811829300
Master database role: master database
Protection Mode: maximum performance
Slave Database
Query on the slave Database
SQL>Select name, dbid, database_role, protection_mode fromv $ database;
Database Name: TESTDB12
Database ID: 2811829300
Master database role: Physical standby Database
Protection Mode: maximum performance
Data File Information:
SQL>Select name from v $ datafile;
Log File Information:
SQL>Select member from v $ logfile;
***************** *********
Statement:
Original works, from "Deep Blue blog" blog, allow reprint, reprint please be sure to indicate the source (http://blog.csdn.net/huangyanlong ).
The author has the right to pursue legal liability for copyright issues.