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 enable oracle standby Reserve Library Log Application automatically when Linux operating system starts

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

Share

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

In this issue, Xiaobian will bring you about how to automatically enable oracle standby backup log application when Linux operating system starts. The article is rich in content and analyzes and narrates from a professional perspective. After reading this article, I hope you can gain something.

1. Enable DG_BROKER_START

ALTER SYSTEM SET DG_BROKER_START=TRUE SCOPE=BOTH;

2. Create a shell file: Here's what it looks like

[oracle@proddb02 ~]$ cat /home/oracle/DBA/startdg.sh

#!/ bin/sh

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1

export ORACLE_SID= service name

export PATH=$PATH:$ORACLE_HOME/bin

dgmgrl / "startup"

sqlplus / as sysdba @/home/oracle/DBA/start_redo_apply.sql

[oracle@proddb02 ~]$ cat /home/oracle/DBA/start_redo_apply.sql

alter database recover managed standby database using current logfile disconnect;

3. Add scripts to/etc/rc.local using root

[oracle@proddb02 ~]$ cat /etc/rc.local

#!/ bin/sh

#

# This script will be executed *after* all the other init scripts.

# You can put your own initialization stuff in here if you don't

# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

su - oracle -lc "/u01/app/oracle/product/11.2.0/db_1/bin/lsnrctl start"

su - oracle -lc "/home/oracle/DBA/startdg.sh"

The above is how to automatically enable oracle standby backup log application when the Linux operating system is started. If there is a similar doubt, please refer to the above analysis for understanding. If you want to know more about it, please pay attention to the industry information channel.

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