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 manually Hot standby Database in oracle 11g

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

Share

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

This article mainly introduces how to manually hot standby database in oracle 11g, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.

Check whether the database is in archive mode, turn on the database hot backup mode, and copy the operating system database data files to the backup directory

SYS@PROD > archive log listDatabase log mode Archive ModeAutomatic archival EnabledArchive destination / u01/app/oracle/product/11.2.0/dbhome_1/dbs/archOldest online log sequence 2Next log sequence to archive 4Current log sequence 4SYS@PROD > alter database begin backup;Database altered.SYS@PROD > host [oracle@enmoedu1 PROD] $rm-rf / home/oracle/bak/* [oracle@enmoedu1 PROD] $cp * .dbf / home/oracle/bak [oracle@enmoedu1 PROD] $exitexitSYS@PROD > alter database end backup Database altered.

Delete all data files

SYS@PROD > host [oracle@enmoedu1 PROD] $rm-rf * .dbf [oracle@enmoedu1 PROD] $lltotal 172652When RWMI r-1 oracle oinstall 9748480 Jan 24 22:50 control01.ctl-rw-r- 1 oracle oinstall 9748480 Jan 24 22:50 control02.ctl-rw-r- 1 oracle oinstall 52429312 Jan 24 22:50 redo01.log-rw-r- 1 oracle oinstall 52429312 Jan 24 22:41 redo02.log-rw-r- 1 Oracle oinstall 52429312 Jan 24 22:41 redo03.log [oracle@enmoedu1 PROD] $

Start the database error report

SYS@PROD > shutdown immediate;Database closed.Database dismounted.ORACLE instance shut down.SYS@PROD > startupORACLE instance started.Total System Global Area 835104768 bytesFixed Size 2257840 bytesVariable Size 536874064 bytesDatabase Buffers 289406976 bytesRedo Buffers 6565888 bytesDatabase mounted.ORA-01157: cannot identify/lock data file 1-see DBWR trace fileORA-01110: data file 1:'/ u01/app/oracle/oradata/PROD/system01.dbf'SYS@PROD >

Copy the hot standby data file to the original data file directory

[oracle@enmoedu1 PROD] $cp / home/oracle/bak/*.dbf. /-- copy the data file to the previous data file directory [oracle@enmoedu1 PROD] $exitexitSYS@PROD > select open_mode from vested database Alter database open*ERROR at line 1:ORA-01113: file 1 needs media recoveryORA-01110: data file 1:'/ u01 apprenticeship oradata

Restore the database

SYS@PROD > recover database;-- recovery database Media recovery complete.SYS@PROD > alter database open;-- open database Database altered.SYS@PROD > select status from v$instance STATUS-OPEN thank you for reading this article carefully. I hope the article "how to manually Hot standby Database in oracle 11g" shared by the editor will be helpful to you. At the same time, I also hope that you will support and follow the industry information channel. More related 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