Detailed process of restarting the Oracle 11G worker uard production environment, 11 gworker uard

Source: Internet
Author: User

Detailed process of restarting the Oracle 11G worker uard production environment, 11 gworker uard
Scenario: restart the database, do not restart the linux system, so you do not need to consider listening programs,
# Linux input lsnrctl start
1. Close the database
1.1 shut down the master database
Shutdown immediate;


SQL> SHUTDOWN IMMEDIATE;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>


1.2 close the slave Database
Alter database recover managed standby database cancel;
Shutdown immediate;


SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

Database altered.


SQL> SHUTDOWN IMMEDIATE;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>


2. Start the database,
When enabled, enable the standby database to start the standby database listening, and then enable the primary database
2.1 start the slave Database
# Startup mount;
# Alter database recover managed standby database;
# Alter database open;
# You do not need to set the archive here. The Archive setting takes effect permanently. Just start startup.
STARTUP;
SQL> STARTUP;
ORACLE instance started.


Total System Global Area 5344731136 bytes
Fixed Size 2213136 bytes
Variable Size 3489663728 bytes
Database Buffers 1811939328 bytes
Redo Buffers 40914944 bytes
Database mounted.
Database opened.
SQL>


2.2 start the master database
STARTUP;
SQL> STARTUP;
ORACLE instance started.


Total System Global Area 1.1358E + 10 bytes
Fixed Size 2216744 bytes
Variable Size 8589937880 bytes
Database Buffers 2751463424 bytes
Redo Buffers 13946880 bytes
Database mounted.
Database opened.
SQL>


/* Replace the following process. The database is originally archived, so it will be restarted after it is closed. The database is also archived.
Startup mount;
Alter database archivelog;
Alter database open ;*/


2.3 start the standby Database Application
Alter database recover managed standby database;
This command is a dead command and will be stuck here all the time, but archive logs are already synced in the background, unless manually disabled.

Alter database open; -- the slave DATABASE does not have to be in the OPEN state. You just need to start the archive and be applied. This command does not need to be executed.


2.4 check to check whether the archive is applied in a timely manner
First, check the archiving log synchronization of the slave database.
SQL> SELECT NAME, applied FROM v $ archived_log;
......
NAME
--------------------------------------------------------------------------------
APPLIED
---------
/Data/oracle/oradgdata/standby_archive/41520866_821708334.dbf
YES
/Data/oracle/oradgdata/standby_archive/201720867_821708334.dbf
YES
/Data/oracle/oradgdata/standby_archive/41520868_821708334.dbf
YES


NAME
--------------------------------------------------------------------------------
APPLIED
---------
/Data/oracle/oradgdata/standby_archive/41520869_821708334.dbf
YES


2800 rows selected.
SQL>
If all the logs are YES, the archived logs are synchronized.


Run check on the master database:
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination/oracle/app/oracle/flash_recovery_area/archivelog
Oldest online log sequence 20869
Next log sequence to archive 20871
Current log sequence 20871
SQL>


Execute check in the slave Database
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination/data/oracle/oradgdata/standby_archive
Oldest online log sequence 20869
Next log sequence to archive 0
Current log sequence 20871
SQL>


The Current log sequence of the master database and slave database is 20871, and the latest archive log applied on the slave database is YES, which indicates that the data synchronization of the master database and slave database is consistent.
Restarting uard is complete. Here, the SQL command window for executing 2.3 is forcibly closed.
The next time we execute the Step 2.3, we can add disconnect from session to the end. This is what we can accept to disconnect the session after the command is executed, you can use this connection to execute other commands.

Source Address:Http://blog.itpub.net/26230597/viewspace-1214816/
Instructor Bu's oracle 11g middleware uard training video

Private Message, hope to accept

What is the difference between oracle distributed uard and oracle active distributed uard?

Dataguard is a database disaster tolerance model. It refers to a database device that runs in a remote place outside of a normal production environment (with its own independent database magnetic array ), if data changes occur in the production environment, the changed data operations are synchronized from the production environment in real time through dataguard to ensure data consistency in the production environment and disaster recovery environment. If the production environment database is paralyzed, the disaster recovery environment is taken over.
Data Guard can open the database in read-only mode, but the process of Media rediscovery using logs for Data Synchronization stops. If the physical backup database is in the Recovery process, the database cannot open the query, that is to say, the log application and read-only open are mutually exclusive.
The Active Data Guard feature released in Oracle 11g solves this conflict. When using logs to restore Data, you can open the database in read-only mode, users can perform query and report operations on the standby database, which is similar to the functions of the Logical Data Guard standby database (query function). However, data Synchronization is more efficient and requires less hardware resources. In this way, the hardware resources of the physical backup database can be used to a greater extent.

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.