Oracle cold backup operation manual

Source: Internet
Author: User


Oracle cold backup operation manual 1 There are three standard backup and recovery modes for Oracle cold backup: Backup Recovery (physical) and Import/Export (logical ), backup recovery can be divided into non-archive mode (Nonarchivelog-style) and Archivelog-style based on the working mode of the database. Generally, we call non-archive mode cold backup, the archive mode is called Hot Backup. The relationship between them is as follows: www.2cto.com cold backup refers to restoring the Oracle server back in non-archive mode. You can also recover data from server A to server B. 2. The oracle11g backup is used as an example. 2.1 use the coldbak script for backup. Procedure: a) write the following script and save it *. SQL: SQL code -- connect database connect sys/your set password as sysdba; -- shutdown database shutdown immediate; -- Copy Data file Host xcopy d: \ Oracle \ product \ 11.2.0 \ oradata \ orcl \*. dbf d: \ DbBakup; -- Copy Control file Host xcopy d: \ Oracle \ product \ 11.2.0 \ oradata \ orcl \*. ctl d: \ DbBakup; -- Copy Log file Host xcopy d: \ Oracle \ product \ 11.2.0 \ oradata \ orcl \*. log d: \ DbBakup; -- startup database startup Www.2cto.com back up the data in the oracle oradata folder using the above script. Note: copy the above Code to notepad and save it as *. SQL is a cold backup script. The control file (*. ctl), data file (*. dbf), and log file (*. log) paths are modified according to their own paths. "D: \ DbBakup" is the backup path and can be modified by yourself. To back up all the data files, some dbf may not be in a directory. You need to check all the data file paths in EM. B) Enter cmd in the running process. C) Enter sqlplus/nolog In the cmd interface to enter SQL * plus. D). Connect to the database conn sys/your set password as sysdba as dba. E). Perform the cold backup operation. @ Cold backup angular path. 2.2 Use manual backup 1) Stop all Oracle-related services in Oracle. 2) back up the oradata folder in the oracle installation directory. 3 local recovery 1. Enter cmd in the run. 2. Enter sqlplus/nolog In the cmd interface to enter SQL * plus. 3. Connect to the database conn sys/your set password as sysdba as a dba. SQL> conn sys // The password you set as sysdba 4. Enter shutdown immediate. SQL code SQL> shutdown immediate; 5. manually copy the backup files to the corresponding oracle directory. 6. In the command window, enter startup at SQL> cursor. SQL code SQL> startup; 4 remote recovery Note: copy the backup file to another machine (ensure that the same version of oracle is installed on the backup machine and the installation directory is the same, and have the same service name SID ). Normal recovery steps: 1. Enter cmd during running. 2. Enter sqlplus/nolog In the cmd interface to enter SQL * plus. 3. Connect to the database conn sys/your set password as sysdba as a dba. SQL> conn sys // The password you set as sysdba 4. Enter shutdown immediate. Www.2cto.com SQL code SQL> shutdown immediate; 5. manually copy the backup file to the corresponding oracle directory. 6. In the command window, enter startup at SQL> cursor. SQL code SQL> startup; Note: if you cannot log on to EM, restart the oracle service. The above is the normal local recovery process. If you only perform the preceding steps for remote recovery, the host connection string of the database is the host name of the backup machine. Therefore, apart from normal recovery steps, we need to re-build EM during Remote recovery. Re-build EM: We recommend that you disable the EM service. 1. Delete em a. Enter emca-repos drop B in the cmd command window. Enter your own database information in the following information. 2. create em a. Enter emca-repos create B in the cmd command window. Enter your own database information in the following information. 3. Configure em a. Enter emca-config dbcontrol db B in the cmd command window. Enter your own database information in the following information. Www.2cto.com ------------ other considerations: 1) reset the control file: SQL code SQL> conn sys as sysdba SQL> startup nomount SQL> alter system set control_files = 'd: \ ORACLE \ ORADATA \ ORA10 \ CONTROL02.CTL 'scope = spfile; SQL> alter database mount SQL> alter database open 2) reset the service name Java code SQL> show parameter db_name; name type value ------------------------------------ ----------- -------------------------------- db_name string default SQL> alter system set db_name = new service NAME scope = spfile; System altered. SQL> alter database mount; alter database mount * ERROR at line 1: ORA-01103: database name 'orcl 'in controlfile is not 'default' www.2cto.com SQL> shutdown immediate ORA-01507: database not mounted ORACLE instance shut down. SQL> startup ORACLE instance started. total System Global Area 88080384 bytes Fixed Size 777812 bytes Variable Size 87040428 bytes Database Buffers 0 bytes Redo Buffers 262144 bytes Database mounted. database opened.

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.