Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use physical copy to create dataguard in oracle

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to use physical copy to create dataguard in oracle, which has certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article. Let Xiaobian take you to understand it together.

Operations done in the master library

Start to mount

alter system set log_archive_dest_1='location=/home/oracle/oracle/oradata/htis/arch/';

Archive mode. Restart archive mode if non-archiving is required. Opening method:

db_unique_name setting of main library, modification requires restart

If you use Maximum Availability Mode, you need to add standby log, adding the formula:

(Number of log groups per thread +1)* Maximum number of threads, 2 redo groups per instance, then add =(2+1)*1=3

alter database add standby logfile group 4 ('/home/oracle/oracle/oradata/htbase/standby_redo04.log') size 50M;

select group#,member,status from v$logfile;

Add dg parameter

alter system set STANDBY_FILE_MANAGEMENT='auto';

alter system set FAL_CLIENT='htbase';

alter system set FAL_SERVER='htbaseb';

alter system set LOG_ARCHIVE_CONFIG='send, receive, dg_config=(htbase,htbaseb)'; //order in parentheses does not affect

alter system set LOG_ARCHIVE_DEST_2='service=htbaseb VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) LGWR SYNC AFFIRM DB_UNIQUE_NAME=htbaseb';

Creating a standby control file

Alter database create standby controlfile as '/st.ctl';

Create pfile, do not spfile is to facilitate the preparation of library modifications

Copy arch/,diag/,admin/, oraden/directory,st.ctl,listener.ora,tnsnames.ora,pfile, password file to backup repository

Operations done by the library

Modify the following 4 parameters in pfile (other parameters, such as archive path, etc., can also be modified if necessary)

db_unique_name

FAL_CLIENT

FAL_SERVER

LOG_ARCHIVE_DEST_2

Overwrite the control file control01.ctl with st.ctl transferred from the master library, and backup the original control file

Start backup

startup pfile nomount

Alter database mount standby database

ALTER DATABASE recover managed standby database using current logfile disconnect;

View backup status

select process,status from v$managed_standby;

After successful startup without error, check the status in the main library

select dest_name, status,error from v$archive_dest;

If there is no error, it is usually ok

Note: In 11g, logging can be applied in open read only cases, as follows

alter database open read only; ALTER DATABASE recover managed standby database using current logfile disconnect; select open_mode from v$database; OPEN_MODE -------------------- READ ONLY WITH APPLY

Thank you for reading this article carefully. I hope that the article "How to use physical copy to create dataguard in oracle" shared by Xiaobian will be helpful to everyone. At the same time, I hope that everyone will support you a lot and pay attention to the industry information channel. More relevant knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report