Oracle 11g manual Hot Standby-database

Source: Internet
Author: User

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

[email protected]> 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           4[email protected]> alter database begin backup;Database altered.[email protected]> host[[email protected] PROD]$ rm -rf /home/oracle/bak/*[[email protected] PROD]$ cp *.dbf /home/oracle/bak[[email protected] PROD]$ exitexit[email protected]> alter database end backup;Database altered.

Delete all data files

[email protected]> host[[email protected] PROD]$ rm -rf *.dbf[[email protected] PROD]$ lltotal 172652-rw-r----- 1 oracle oinstall  9748480 Jan 24 22:50 control01.ctl-rw-r----- 1 oracle oinstall  

Start Database error

[email protected]> shutdown immediate;Database closed.Database dismounted.ORACLE instance shut down.[email protected]> startupORACLE instance started.Total System Global Area  835104768 bytesFixed Size          2257840 bytesVariable Size         536874064 bytesDatabase Buffers      289406976 bytesRedo Buffers            

Copy hot-prepared data files to the original data file directory

[[email protected] PROD]$ cp /home/oracle/bak/*.dbf ./ ——拷贝数据文件到以前的数据文件目录[[email protected] PROD]$ exitexit[email protected]> select open_mode from v$database;OPEN_MODE--------------------MOUNTED[email protected]> alter database open——尝试打开数据库,报错  2  ;alter database open*ERROR at line 1:ORA-01113: file 1 needs media recoveryORA-01110: data file 1: ‘/u01/app/oracle/oradata/PROD/system01.dbf‘

Recovering a Database

[email protected]> recover database;——恢复数据库Media recovery complete.[email protected]> alter database open;——开库Database altered.[email protected]> select status from v$instance;STATUS------------OPEN

Oracle 11g manual Hot Standby-database

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.