Build logical standby database by DG and build logic by dg

Source: Internet
Author: User

Build logical standby database by DG and build logic by dg

The logical standby database is built on the basis of the physical standby database. Therefore, you must first set up the physical standby database.

The slave database performs the following operations:

[Oracle @ localhost ~] $Sqlplus/as sysdba

SQL * Plus: Release 11.2.0.3.0 Production onFri Nov 7 15:03:30 2014

Copyright (c) 1982,201 1, Oracle. All rights reserved.

Connected:

Oracle Database 11g Enterprise EditionRelease 11.2.0.3.0-64bit Production

With the Partitioning, Oracle LabelSecurity, OLAP, Data Mining,

Oracle Database Vault and Real ApplicationTesting options


SQL>Alter database recover managed standby database cancel;

 

Database altered.


SQL> exit

Disconnected from Oracle Database 11 gEnterprise Edition Release 11.2.0.3.0-64bit Production

With the Partitioning, Oracle LabelSecurity, OLAP, Data Mining,

Oracle Database Vault and Real ApplicationTesting options

 

Master database:

[Oracle @ localhost ~] $Sqlplus/as sysdba

SQL * Plus: Release 11.2.0.3.0 Production onFri Nov 7 15:04:46 2014

Copyright (c) 1982,201 1, Oracle. All rights reserved.

Connected:

Oracle Database 11g Enterprise EditionRelease 11.2.0.3.0-64bit Production

With the Partitioning, Oracle LabelSecurity, OLAP, Data Mining,

Oracle Database Vault and Real ApplicationTesting options

 

SQL>Alter database force logging; --- force logging

 

Database altered.

 

SQL>Alter database add supplemental log data; ---- add additional logs

 

Database altered.

 

SQL>Exec dbms_logstdby.build; --- script

 

PL/SQL procedure successfully completed.

 

SQL>

 

Slave Database

[Oracle @ localhost ~] $Sqlplus/as sysdba

SQL * Plus: Release 11.2.0.3.0 Production onFri Nov 7 15:11:37 2014

Copyright (c) 1982,201 1, Oracle. All rights reserved.

Connected:

Oracle Database 11g Enterprise EditionRelease 11.2.0.3.0-64bit Production

With the Partitioning, Oracle LabelSecurity, OLAP, Data Mining,

Oracle Database Vault and Real ApplicationTesting options

 

SQL>Alter database recover to logical standby jadl11g;

 

Database altered.

 

SQL>Shutdown immediate ---- ensure consistency to close the database

ORA-01507: database not mounted

 

 

ORACLE instance shut down.

SQL>Startup mount

ORACLE instance started.

 

Total System Global Area 626327552 bytes

Fixed Size 2230952 bytes

Variable Size 268436824 bytes

Database Buffers 352321536 bytes

Redo Buffers 3338240 bytes

Database mounted.

SQL>Alter database open resetlogs ;*********

 

Database altered.

 

SQL>Alter database start logical standby apply;

 

Database altered.

 

Log on to DGMGRL:

DGMGRL>Createconfiguration dgc as primary database is pjadl11g connect identifier ispjadl11g;

Configuration "dgc" created withprimary database "pjadl11g"

DGMGRL>Add database sjadl11g as connect identifier issjadl11g maintained as logical;

Database "sjadl11g" added

DGMGRL>Enable configuration

Enabled.

DGMGRL>Show configuration

Configuration-dgc

Protection Mode: MaxPerformance

Databases:

Pjadl11g-Primary database

Sjadl11g-Logical standby database

Fast-Start Failover: DISABLED

Configuration Status:

SUCCESS

Now the logical standby database has been set up !!!!!!!

DGMGRL>Show configuration verbose;

 

Configuration-dgc

Protection Mode: MaxPerformance

Databases:

Pjadl11g-Primary database

Sjadl11g-Logical standby database

Properties:

FastStartFailoverThreshold = '30'

OperationTimeout = '30'

FastStartFailoverLagLimit = '30'

CommunicationTimeout = '000000'

FastStartFailoverAutoReinstate = 'true'

FastStartFailoverPmyShutdown = 'true'

BystandersFollowRoleChange = 'all'

Fast-Start Failover: DISABLED

Configuration Status:

SUCCESS

DGMGRL>Show database verbose sjadl11g;

Database-sjadl11g

Role: LOGICAL STANDBY

Intended State: APPLY-ON

Transport Lag: 0 seconds

Apply Lag: 0 seconds

Instance (s ):

Jadl11g

Properties:

DGConnectIdentifier = 'sjadl11g'

ObserverConnectIdentifier =''

LogXptMode = 'async'

DelayMins = '0'

Binding = 'optional'

MaxFailure = '0'

MaxConnections = '1'

ReopenSecs = '000000'

NetTimeout = '30'

RedoCompression = 'disable'

LogShipping = 'on'

PreferredApplyInstance =''

ApplyInstanceTimeout = '0'

LsbyASkipTxnCfgPr = '0, 0, 0'

LsbyDSkipTxnCfgPr = '0, 0, 0'

LsbyASkipCfgPr =''

LsbyDSkipCfgPr =''

LsbyASkipErrorCfgPr =''

LsbyDSkipErrorCfgPr =''

LsbyMaxEventsRecorded = '0'

LsbyPreserveCommitOrder =''

LsbyRecordSkipErrors =''

LsbyRecordSkipDdl =''

LsbyRecordAppliedDdl =''

ArchiveLagTarget = '0'

LogArchiveMaxProcesses = '4'

LogArchiveMinSucceedDest = '1'

FastStartFailoverTarget =''

InconsistentProperties = '(monitor )'

InconsistentLogXptProps = '(monitor )'

SendQEntries = '(monitor )'

LogXptStatus = '(monitor )'

RecvQEntries = '(monitor )'

LsbyParameters = '(monitor )'

LsbySkipTxnTable = '(monitor )'

LsbySkipTable = '(monitor )'

LsbyFailedTxnInfo = '(monitor )'

SidName = 'jadl11g'

StaticConnectIdentifier = '(DESCRIPTION = (ADDRESS = (PROTOCOL = tc = localhost. localdomain) (PORT = 1521) (CONNECT_DATA = (SERVICE_NAME = sjadl11g_D INSTANCE_NAME = jadl11g) (SERVER = DEDICATED )))'

StandbyArchiveLocation = 'use _ DB_RECOVERY_FILE_DEST'

AlternateLocation =''

LogArchiveTrace = '0'

LogArchiveFormat = '% t _ % s _ % r. dbf'

LsbyMaxSga = '0'

LsbyMaxServers = '0'

TopWaitEvents = '(monitor )'

 

Database Status:

SUCCESS

 

DGMGRL>Edit database sjadl11g set propertylogxptmode = 'sync'; --- modify parameters

Property "logxptmode" updated

Related Article

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.