How to restore a database using legacy Oracle tablespace files after oracle11g the operating system

Source: Internet
Author: User
Tags file copy

How to restore a database using legacy Oracle tablespace files after oracle11g the operating system
Recently due to a system reload, when restoring a DMP backup file, the system is not functioning due to data reasons (the table did not export all when exported with the EXP command). According to the information on the Internet and personal situation, make a record, convenient for later use.

Oracle Export Empty Table method:

1. Execute the following statement:

Select table_name from user_tables where num_rows=0;
2. Assuming we have a blank table tbl_1,tbl_2,tbl_3,tbl_4 here, the query results are as follows:

ALTER TABLE Tbl_1 allocate extent;
ALTER TABLE tbl_2 allocate extent;
ALTER TABLE Tbl_3 allocate extent;
ALTER TABLE Tbl_4 allocate extent;
Finally, we will execute the above SQL statement, and then export it.

The following officially begins

Description: Make a backup of the original data

Original Oracle installation directory, D:\tools\oracle11g\Administrator

Back up the Oracle directory, d:\ database backup \oracle11g\administrator

Steps:

First, reinstall the Oracle, the installation directory is the same as the original installation directory, that is D:\tools\oracle11g\Administrator

Second, when creating the database, make sure Oracle_sid is the same as the original database, here Oracle_sid = SD, after installing the database, create good tablespace information, and the same as the original database, if there is a temporary table space, but also to create (and the same as the original)

Third, after the successful creation, will appear under the D:\tools\oracle11g\Administrator\oradata\ with the ORACLE_SID same name folder SD, namely D:\tools\oracle11g\Administrator\ Oradata\sd

Iv. in the services, management tools, Control Panel, stop the following services:

1) Oracleoradb11g_home1tnslistener

2) oracleservicesd

Because I only have these two Oracle services enabled, all Oracle services can be stopped to ensure that the process is working smoothly.

V. Copy the Oracle database files from the backup disk:

1) Complete copy of the Oracle folder under the D:\ database backup \oracle11g\administrator\oradata\ directory to the D:\tools\oracle11g\Administrator\oradata\ directory.

2) Copy the files from the D:\ database backup \oracle11g\administrator\product\11.2.0\dbhome_1\database directory to the D:\tools\oracle11g\Administrator\ Product\11.2.0\dbhome_1\database

3) Copy the files from the D:\ database backup \oracle11g\administrator\product\11.2.0\dbhome_1\network\admin directory to the D:\tools\oracle11g\ Administrator\product\11.2.0\dbhome_1\network\admin, note the change of the host value in the file

Admin folder to see the files, if and now the hostname (IP) is not the same, change it.

VI. Copy control files

Back up the D:\ database \oracle11g\administrator\flash_recovery_area\ SD under the Control02.ctl (this file and user-related) file copy to the new installation of the corresponding directory (you can rename the new to standby.) Trust that you have done the backup before doing the above operation.)

Vii. Restart the Discontinued Oracle service.

OK, your data has been restored.

How to restore a database using legacy Oracle tablespace files after oracle11g the operating system

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.