Test the DG Environment

Source: Internet
Author: User

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.



Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.