Cmd: How to import and export oracle remote and local databases. cmd: How to import and export oracle

Source: Internet
Author: User

Cmd: How to import and export oracle remote and local databases. cmd: How to import and export oracle

Cmd Import and Export oracle Database

Open the cmd window and enter the following command

Supplement: I deleted my oracle database a few days ago and found that the import and export commands of exp and imp are unavailable. It seems that if you have not installed the oracle database locally, these two commands should be unavailable. I am not sure about the problem. If I find it, it will be updated in time.

1. Database Export Steps:

Exp username/password @ remote IP: Port/instance file = storage location: \ file name. dmp

1. For example, your database is like this.

Ip: 222.11.21.12port: 1522sid/service name: oracleusername: znxdpassword: znxd_1

2. The command for exporting data from the oracle database above should be as follows:

exp znxd/znxd_1@222.11.21.12:1522/oracle file='d:/testDb.dmp'

The file is the location to be exported and the exported format is dmp.

3. In addition, the database password may contain special characters, such as the following:

Ip: 222.11.21.12port: 1522sid/service name: oracleusername: znxdpassword: znxd_1@com.cn

This is a bit disgusting. This is because when you directly enter the Export command above, there will be two circles. At this time, you need to write the following below:

exp znxd/"""znxd_1@com.cn"""@222.11.21.12:1522/oracle file='d:/testDb.dmp'

Three pairs of double quotation marks must be added to both sides of the password, so that the execution can be successful.

Ii. Database Import steps:

1. The import command starts with imp and is followed by full = y.

Imp username/password @ remote IP: Port/instance file = database file location: \ file name. dmp full = y

2. Sometimes an error message similar to the one that only users with dba permission can import data is displayed during import. This indicates that the currently imported user name does not have the dba permission. You only need to grant the user the dba permission. After logging on with the system user, enter the following SQL on the SQL panel, and then execute

grant dba to znxd

After the command is executed, open the new cmd window and run the import command again.

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.