Oracle Dual Computer Hot backup method

Source: Internet
Author: User
Tags log modify connect backup
oracle| Backup | Hot backup One, create standby Database requirements
1, Primary and standby database on the host of the Oracle server and * System version must be the same, and have the same patch;
2, primary database must be archive Mode;standby DB must also be archive mode;

Second, create standby database
1, first view primary database archive mode (svrmgr>archive log list) for no archive mode, the database converted to automatic archiving methods, the following method:
First Close primary Database:
Svrmgr>shutdown Immediate
Then start primary Database by Mount:
Svrmgr>connect Internal/password
Svrmgr>startup Mount
Svrmgr>alter Database <dbname> Archivelog
Svrmgr>shutdown
2, modify the parameters in the Init%oracle_sid%.ora file, add:
Log_archive_start = true # If you want automatic archiving
Log_archive_dest=%oracle_home%\database\archive
Log_archive_format =%oracle_sid%%s.%t which log_archive_dest
Refers to the location of archived log files, which can be set according to the actual situation, such as e disk space
Large, can be set to: log_archive_dest=e:\oracle\database\archive
3. Copy the Init%oracle_sid%.ora of primary database and corresponding password files to the directory on Standby database%oracle_home%\database Modify the parameters in the corresponding Init%oracle_sid%.ora on the standby database according to the actual situation:
Log_archive_dest;
4. Create an instance on the host where the standby database is located, with the instance name primary Database, for example:
Oradim80–new–sid sid_name–intpwd Oracle–startmode Auto–pfile=c:\orant\database\init%oracle_sid%.ora;
5. Create controlfile for Standby on primary Database, copy controlfile to Standby database location, * as follows:
Svrmgr>alter Database Create standby Controlfile as <filename>;
6, on the primary database on the online log archive,
Svrmgr>alter System archive Log current;
7, close primary Database,
Svrmgr>shutdown Immediate
8. Copy all data files, log files, archive log files (excluding control files) from primary database to the location of standby database;
9. Start standby Database in Nomount mode:
Svrmgr>startup Nomount
Svrmgr>alter database mount Standby Database[execlusive/parallel]

10, synchronous standby Database:
Svrmgr>recover standby database;
11, restore the primary Database startup state.

III. Maintenance of standby database
1, the primary database generated archive log files regularly to the standby database to determine the location of manual recovery, so that the standby database and primary database to keep in sync.
Svrmgr> set AutoRecovery on;
Svrmgr> Connect Internal/password;
svrmgr> Startup Nomount pfile=<c:\orant\database\initswcw.ora>;
Svrmgr> ALTER DATABASE mount standby database;
svrmgr> Recover standby database;
svrmgr> shutdown
2. When the primary database fails, the standby database is activated: Cancel (cancel) to redo the following * do:
Svrmgr> Connect Internal/password;
svrmgr> Startup Nomount pfile=<c:\orant\database\initswcw.ora>;
Svrmgr> ALTER DATABASE mount standby database;
Svrmgr>alter database activate standby database;
Shutdown standby database;
Svrmgr>shutdown Immediate
Restart standby Database;
Svrmgr>startup


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.