Oracle 11g manual Cold Standby

Source: Internet
Author: User

To see if the database is in non-archive mode

Close the database
Shutdown immediate
Backup control files and data files (no backup log files, recommended backup)

[[email protected] PROD]$ lltotal 2014624-rw-r----- 1 oracle oinstall   9748480 Jan 24 21:49 control01.ctl-rw-r----- 1 oracle oinstall   9748480 Jan 24 21:49 control02.ctl-rw-r----- 1 oracle oinstall 363077632 Jan 24 21:49 example01.dbf-rw-r----- 1 oracle oinstall  52429312 Jan 24 21:48 redo01.log-rw-r----- 1 oracle oinstall  52429312 Jan 24 21:49 redo02.log-rw-r----- 1 oracle oinstall  52429312 Jan 24 21:48 redo03.log-rw-r----- 1 oracle oinstall 576724992 Jan 24 21:49 sysaux01.dbf-rw-r----- 1 oracle oinstall 807411712 Jan 24 21:49 system01.dbf-rw-r----- 1 oracle oinstall  30416896 Jan 24 21:48 temp01.dbf-rw-r----- 1 oracle oinstall 110108672 Jan 24 21:49 undotbs01.dbf-rw-r----- 1 oracle oinstall  

Start the database and create a table to insert the data submission

startup  ——启动数据库[email protected]> create table t4(id number);Table created.[email protected]> insert into t4 values(1);1 row created.[email protected]> commit;Commit complete.[email protected]> select * from t4;    ID----------     

Close the database, delete data files and control files

Start the database to Nomount, stating that the parameter file is not a problem, to mount, cannot find the control file, use the operating system command to copy the control file and mount

[email protected]> Startup Nomount;oracle instance started. Total System Global area 835104768 bytesfixed size 2257840 bytesvariable size 536874064 bytesdatabase Bu Ffers 289406976 Bytesredo buffers 6565888 bytes[email protected]> ALTER DATABASE Mount;alter Datab ASE Mount*error at line 1:ora-00205:error in identifying control file, check alert log for more info[email protected ]> host[[email protected] prod]$ cp/home/oracle/bak/*.ctl/[[email protected] PROD]$ lltotal 172652- RW-R-----1 Oracle oinstall 9748480 Jan 22:01 control01.ctl-rw-r-----1 Oracle oinstall 9748480 Jan 22:01 control0 2.CTL-RW-R-----1 Oracle oinstall 52429312 Jan 21:56 redo01.log-rw-r-----1 Oracle oinstall 52429312 Jan 21:57 Redo0 2.LOG-RW-R-----1 Oracle oinstall 52429312 Jan 21:56 redo03.log[[email protected] prod]$ exit[email  Protected]> ALTER DATABASE mount;--can go to mount, the control file is no problem the database altered. [Email protected]> [email protected]> ALTER DATABASE open;--cannot find the data file, ALTER DATABASE Open*error at line 1:ora-01157:cannot ident Ify/lock data file 1-see DBWR trace fileora-01110:data file 1: '/u01/app/oracle/oradata/prod/system01.dbf ' [email p  Rotected]>

Copy back to data file

[[email protected] prod]$ cp/home/oracle/bak/*.dbf/[[email protected] prod]$ lltotal 2014848-rw-r-----1 Oracle Oinstall 9748480 Jan 22:05 control01.ctl-rw-r-----1 Oracle oinstall 9748480 Jan 22:05 Control02.ctl-rw-r -----1 Oracle Oinstall 363077632 Jan 22:03 example01.dbf-rw-r-----1 Oracle oinstall 52429312 Jan 21:56 Redo01.log -RW-R-----1 Oracle oinstall 52429312 Jan 21:57 redo02.log-rw-r-----1 Oracle oinstall 52429312 Jan 21:56 REDO03.L OG-RW-R-----1 Oracle oinstall 576724992 Jan 22:04 sysaux01.dbf-rw-r-----1 Oracle oinstall 807411712 Jan 22:05 Syst EM01.DBF-RW-R-----1 Oracle oinstall 30416896 Jan 22:05 temp01.dbf-rw-r-----1 Oracle Oinstall 110108672 Jan 24 22:05 UNDOTBS01.DBF-RW-R-----1 Oracle oinstall 26222592 Jan 22:05 users01.dbf[[email protected] prod]$ Exit[email&nbs p;protected]> ALTER DATABASE Open;alter database Open*error at line 1:ora-03113:end-of-file on communication channelpr Ocess id:2951session id:125 Serial Number:3 

Found an error, because I backed up the control files and data files, and then open a new table, resulting in database log files and control file SCN inconsistent, view the alter log

Enter startup Mount execution
Recover database until cancel;
ALTER DATABASE open resetlogs;

startup mount ——进入到mount[email protected]> recover database until cancel;——不完全恢复Media recovery complete.[email protected]> alter database open resetlogs;——重置日志Database altered.[email protected]> select open_mode from v$database;——数据库已经打开OPEN_MODE--------------------READ WRITE[email protected]> select * from t4;——查询t4表,没有数据select * from t4              

Oracle 11g manual Cold Standby

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.