[Original] ORACLE _ Data Pump Export Import migration recovery data

Source: Internet
Author: User
Tags create directory

Run the following command on the source database server:

Log On As A system user to execute SQL statements.

C: \ Documents ents and Settings \ Administrator> sqlplus system/Password

SQL * Plus: Release 10.2.0.1.0-production on Thursday March 28 17:16:47 2013
Copyright (c) 1982,200 5, Oracle. All rights reserved.

Connect:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-64bit production with the partitioning, OLAP and Data Mining options

SQL> create directory my_dump as 'e: \ dump ';

The directory has been created.

SQL> quit
Disconnection from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-64bit production with the partitioning, OLAP and Data Mining options

Execute the data pump export in the CMD window:

C: \ Documents ents and Settings \ Administrator> expdp system/password directory = my_dump dumpfile = mydb. dmp schemas = (mydba, xunjian)

Export: Release 10.2.0.1.0-64bit production on Thursday, March, 2013 17:24:37
Copyright (c) 2003,200 5, Oracle. All rights reserved.

Connect to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-64bit production with the partitioning, OLAP and Data Mining options
Start "system". "sys_export_schema_01": System/******** directory = my_dump dumpfile = mydb. dmp schemas = (mydba, xunjian)

 

After that, copy the mydb. dmp file under E: \ dump to the 149 server and place it under E: \ dump. Then, perform the following operations:

Run the following command on the target server:

Log On As A system user to execute SQL statements.

C: \ Documents ents and Settings \ Administrator> sqlplus system/Password

SQL * Plus: Release 10.2.0.1.0-production on Thursday March 28 17:16:47 2013
Copyright (c) 1982,200 5, Oracle. All rights reserved.

Connect:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-64bit production with the partitioning, OLAP and Data Mining options

SQL> create directory my_dump as 'e: \ dump ';
The directory has been created.

SQL> Create tablespace business logging datafile 'e: \ oracle \ product \ 10.2.0 \ oradata \ mydb \ business' size 10240 M autoextend on next 150 m maxsize 32767 M extent management local;

The tablespace has been created.

SQL> quit
Disconnection from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-64bit production with the partitioning, OLAP and Data Mining options

Execute the Data Pump import in the CMD window:

C: \ Documents ents and Settings \ Administrator> impdp system/password directory = my_dump dumpfile = mydb. dmp schemas = (mydba, xunjian)

Export: Release 10.2.0.1.0-64bit production on Thursday, March, 2013 17:24:37
Copyright (c) 2003,200 5, Oracle. All rights reserved.
Connect to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-64bit production with the partitioning, OLAP and Data Mining options
Start "system". "sys_export_schema_01": System/******** directory = my_dump dumpfile = mydb. dmp schemas = (mydba, xunjian)

The physical migration method is applicable to homogeneous databases:
1. Stop the Oracle service on the source server and go to the service console.
2. Stop the Oracle service on the target server and go to the service console.
3. the backup target server's E: \ oracle \ product \ 10.2.0 \ oradata \ mydb is mydb_bak

4. Transfer or copy the E: \ oracle \ product \ 10.2.0 \ oradata \ mydb folder of the source server to the corresponding path E: \ oracle \ product \ 10.2.0 \ oradata \ mydb of the target server

5. Start the Oracle service of the target server on the service console.
6. Run test. bat on the desktop.
7. Enter @ C: \ test. SQL at the prompt.
8. The content of the test. SQL file under c: \ is: Select * From all_tables;
9. If you start querying data, the migration is successful;
10. If it fails, stop the Oracle service of the target server. In the service console
11. Delete mydb and change mydb_bak back to mydb,
12. Start the Oracle service of the target server on the service console.
13. perform data migration in normal exp mode.

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.