10 precautions for data guard to deploy the physical standby Database

Source: Internet
Author: User
These 10 points are mainly for DG deployment after 10g r2

① Set the master database to force logging Mode

idle> select force_logging from v$database;idle> alter database force logging;

② Set the master database to archive Mode

idle> archive log list;idle> shutdown immediate;idle> startup mount;idle> alter database archivelog;idle> archive log list;

③ Configure standby redo log

Configure standby redo log


④ Create a key file (if it does not exist)

First, let's take a look at the explanation of the document:

            You must have SYSDBA system privileges for the user accounts that you use to manage the primary and standby database instances            Furthermore, the SYS user must have the same password on all databases in the configuration.
        
            

What if the password is inconsistent?

The example is as follows:

Error 1031 received logging on to the standbyErrors in file /u01/app/oracle/diag/rdbms/pri/orcl/trace/orcl_arcf_5769.trc:ORA-01031: insufficient privilegesPING[ARCf]: Heartbeat failed to connect to standby 'std'. Error is 1031.

Apparently, throw the ORA-01031: insufficient privileges

When you use dbca to create a database, the key file is automatically created under $ ORACLE_HOME/DBS.
If not, you can use the orapwd command line tool. Its file and password are required parameters,
For example (assume that the current directory is $ ORACLE_HOME/DBS ):
Orapwd file = orapworcl Password = Oracle entries = 30 (Linux/Unix naming rules: orapw [Sid])



⑤ Set initialization parameters

List of DG initialization parameters



⑥ Database versions must be consistent

The official document mentions:

You must install the same release of Oracle Database Enterprise Edition for the primary database and all standby databases in your Data Guard configuration

7. Independent control files

From the official website:
The primary database and each standby database must have their own control files.

You can use the following statements to create a control file for the standby database:

Alter database create standby controlfile as '/home/Oracle/dg01.ctl ';

The control file usually needs multiple copies, either manually CP several copies of the above files, or use the command to create several more

Note that if you select to execute the preceding command multiple times to create multiple copies, make sure that the database is in the Mount state during execution.

Otherwise, the SCN numbers of several control files may not match, and the slave database may fail to start to mount normally.

In addition,After the control file is created, go to the standby database to create it (for example, max (sequence # is as large). Make sure that there are no structural changes to the master database.(For example, adding tablespaces)



Uniform storage or file management

From the official website:
If any databases use ASM and/or OMF, all shocould use the same combination


⑨ Start the physical standby database and redo Application

After the configuration of the physical standby database is complete, the Standby database can be started. However, in some cases, the Standby database can be opened in read only mode.

However, in most cases, it should be started to the Mount status.

If you execute startup directly, it will be enabled in read only mode by default.

Oracle determines whether the database is a physical standby database based on the control file. If yes, the read only mode is enabled by default.

Therefore, generally, we only need:

Startup Mount;

After Mount is enabled, the physical standby database starts to receive the redo sent by the primary database. Then, you can run some commands to apply the redo:

For example, start the redo application:

Alter database recover managed standby database disconnect from session;

Or add the using current logfile clause to start the real-time application:

Alter database recover managed standby database using current logfile disconnect from session;

Real-time, lgwr sync or async mode required


⑩ Stop the physical standby Database

Normally, stop the master database before stopping the physical standby database.

If the standby database is stopped directly, the alert alarm, re-authorization, and shutdown of the primary database are light

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.