Logical Standby Database Setup (configuration)

Source: Internet
Author: User

Description
The Logical standby database is converted through the physical standby database.
This Logical standby is converted by physical standby, which was previously created.
Physical standby construction can refer to the following links: http://www.cnblogs.com/zhenxing/p/5260693.html

Data types supported by logical DG
Before converting from physical DG to logical DG, you need to determine the type of data supported by the logical DG and which DDL operations are supported, refer to the following links: Http://docs.oracle.com/cd/B28359_01/server.111/b28294/data_ Support.htm#chddccig

What you need to do to convert the key
The main library    creates the main library as a logical repository when the online log archive path (effective as a repository)    executes the data dictionary generation statements required to build Logminer: The    log application that stops the logical repository    creates an online log archive path when it is created as a logical repository ( Accept archived logs from the main library)    switch the database into a logical repository and set the new db_name    restart database to mount mode    to open the database resetlogs to    enable the real-time log app

System description Main Library:
Ip:172.25.21.111linux:rhel6.4db:oracle 11.2.0.4sid:siebuat

Standby Library:
Ip:172.25.21.222linux:rhel6.4db:oracle 11.2.0.4SID:UATLDG

Specific steps

--------------------------------The main library--------------------------------
1. The online log archive path when the main library is created as a logical repository (takes effect as a standby)
Alter set log_archive_dest_3='location=/oracle/ldg_archivelog valid_for= (standby_ Logfiles,standby_role) db_unique_name=siebuat'

--Ensure that the Ldg_archivelog directory exists

2. Execute the data dictionary generation statement needed to build Logminer
EXECUTE Dbms_logstdby. BUILD;

-- ------------------------------Prepare the library--------------------------------

1. Stop the log application of the physical standby library

ALTER DATABASE DATABASE CANCEL;
2. Create an online log archive path that is used as a logical repository (to accept archived logs sent from the main library)
Alter set log_archive_dest_3='location=/oracle/ldg_archivelog valid_for= (standby_ Logfiles,standby_role) db_unique_name=uatldg'--the archive log receive path for the main library alterset log_archive_ Dest_1='location=/oracle/archivelog valid_for= (online_logfiles,all_roles) db_unique_name= UATLDG'-Local archive storage path
3. View data current status, role information
SELECT Switchover_status,       Database_role,       Open_mode,       protection_mode,       protection_level  from v$DATABASE ;

4, switch the database into a logical repository and set up a new db_name
Alter Database  to UATLDG; --Here I directly set the new DB name to UATLDG, which is the same as the main library before conversion siebuat

5. Restart the database to mount mode
SHUTDOWN IMMEDIATE; STARTUP MOUNT;

--View the database status again, converted to a logical repository
SELECT switchover_status,       database_role,       open_mode,       protection_mode,       protection_level  from V$database;
6. Open the database in Resetlogs mode
ALTER DATABASE OPEN Resetlogs;
7. Enable real-time log app
Alter database Start logical standby apply immediate;--real-time
ALTER DATABASE start logical standby apply;--not real time

ALTER DATABASE stop logical standby apply;--cancel log app
8. Test data synchronization is successful
1 , create a new table or modify a record under the main library Scott user 2, check whether the repository is synchronized successfully, if the synchronization is unsuccessful, you need to view alert logs and related views to see if there is a problem with the configuration.

9. Precautions
/*

Do not use the internal account logic of the database when the test data is in normal sync the DG does not transmit the user's own data under the system by default, such as creating a test table under the SYS user, which is not synchronized to the logical repository. You can use the following statements to see which users are internal users

*/ SELECT from WHERE = ' INTERNAL SCHEMA ';
10. Reference Documents

http://docs.oracle.com/cd/B28359_01/server.111/b28294/create_ls.htm#g105412

Http://www.cnblogs.com/zhenxing/p/5260693.html

Logical Standby Database Setup (configuration)

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.