Migrate the database from Oracle 11g to Oracle 10g

Source: Internet
Author: User

As we all know, it is not easy to migrate a database from a higher version of Oracle to a lower version of oracle. If you directly use the SQL developer tool, you may not be able to complete the migration successfully (errors may occur more or less in the middle ).

Exp and IMP are applicable to Oracle data copy and backup of the same version. If Oracle data copies of different versions are used, exp is used for data backup from a higher version to a lower version, IMP may not be able to completely restore data. We can use the expdp and impdp tools provided by Oracle to help us implement them easily. We use the Oracle 11g migration database PMS to Oracle 10g as an example.

Export a backup from oracle11g:

expdp USERID='sys/sysadmin@orcl as sysdba' schemas=PMS dumpfile=pms_emp.dmp directory=DATA_PUMP_DIR version=10.2.0.1.0

Schemas is the source database solution, dumpfile is the backup file name, directory is the backup file storage directory, data_pump_dir is the default Oracle storage directory, the default is ORACLE_HOME \ admin \ orcl \ dpdump directory, the version is the target database version.

Import (Restore) backup from Oracle10g:

Restore to the same solution (schema = PMS ):

impdp userid='sys/sysadmin@orcl as sysdba' schemas=PMS directory=DATA_PUMP_DIR dumpfile=PMS_EMP.DMP logfile=export.logversion=10.2.0.1.0

Restore to different solutions (schema = pms_chris ):

impdp userid='sys/sysadmin@orcl as sysdba' directory=DATA_PUMP_DIR dumpfile=PMS_EMP.DMP logfile=export.logversion=10.2.0.1.0 REMAP_SCHEMA=PMS:PMS_CHRIS

Logfile is the log name generated when the backup is exported. The rest are explained in the same way.

In this way, database migration is generally complete in database restoration, and it is not prone to strange errors.

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.