Oracle recovers data with DBF

Source: Internet
Author: User
Tags file copy

1, install the Oracle 10g database and create the same instance of the database you want to recover (note: It is best to install a new database, and install the database as much as possible with the version of the database to be restored, and the instance must be consistent);

2, log in as SYSDBA: To backup the control files;

Sqlplus/nolog; (no semicolon can be added here, otherwise the black screen window will flash through)

Conn/as sysdba; login

2, backup the control files to the trace file of the UDMP directory ALTER database backup Controlfile totrace;


Locate the installation directory for Oracle:. \oracle\product\10.2.0\db_1\admin\ the Instance Name \udump folder (where 10.1 of the file path is E:\ORACLE\PRODUCT\10.1.0\ADMIN\ORCL, Here you can search under Oracle's folders. TRC for lookup ), in descending order of modified time, find the nearest trace file. Backup good.

3,shutdownimmediate Stop the database instance;

4, Backup: The instance folder in the \oracle\product\10.2.0\oradata directory (for example: ORCL), and then delete the instance folder ( must be all deleted) The instance folder to be recovered is placed in this location, not just the DBF to be restored directly replace the original ORCL , otherwise the following error is reported when creating the control file , and all files in the Oradata directory of the database to be recovered are copied to this directory.


5, Enter and execute startupNomountwith SYSDBA. Boot the database to the Nomount state.

6, from Step 2 back up the trace file copy createcontrolfile part of the statement to reconstruct the control file:

Note: 1, change to ARCHIVELOG; 2, increase your DBF file, add only *_data. Dbf,*_temp. DBF cannot be added here


Here should be based on the actual situation and add table space file records, such as the following bold section is a new record.

CREATE controlfile Reuse DATABASE "ORCL"noresetlogs ARCHIVELOG

MAXLOGFILES16

Maxlogmembers 3

MAXDATAFILES100

MAXINSTANCES8

Maxloghistory 454

LOGFILE

GROUP 1 ' D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\REDO01. LOG ' SIZE 10M,

GROUP 2 ' D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\REDO02. LOG ' SIZE 10M,

GROUP 3 ' D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\REDO03. LOG ' SIZE 10M

--STANDBY LOGFILE

DataFile

' D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\SYSTEM01. DBF ',

' D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\UNDOTBS01. DBF ',

' D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\SYSAUX01. DBF ',

' D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\USERS01. DBF ',

' D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\EXAMPLE01. DBF ',

' D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\YC_DATA. DBF ',

' D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\PE_DATA. DBF ',

' D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\HS. ORA '

CHARACTER SET ZHS16GBK

;

7,recoverdatabase;

(This place is a mistake for the time being.) )

8ALTERDATABASE OPEN;

Restore complete, log in to the database for testing.

Oracle recovers data with DBF

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.