cmd Import Export Oracle database
first open the cmd small window, enter the following command
2017-08-17 Supplement: Delete your own Oracle database a few days ago, find exp and IMP Import Export command, cannot use, it seems, if you do not install Oracle database locally, then these two commands should not be used. For the time being, I am not sure about the specific problems, but I will update them if I find them. first, export database steps:
1. For example, your database is like this .
ip:222.11.21.12
port:1522
Sid/service Name: Oracle
username:znxd
password:znxd_1
2. The statement commands for exporting data to the Oracle database above should be as follows:
Exp znxd/znxd_1@222.11.21.12:1522/oracle file= ' d:/testdb.dmp '
Where file contains the location you want to export, and the exported format is DMP.
3. In other cases, the database password may have special characters, such as the following:
ip:222.11.21.12
port:1522
Sid/service Name: Oracle
username:znxd
password:znxd_1@com.cn
This is a bit disgusting. Because the direct output of the above Export command, there will be two loops, this time need to write down this
Exp znxd/"" "znxd_1@com.cn" "" @222.11.21.12:1522/oracle file= ' d:/testdb.dmp '
you need to add three pairs of double quotes on both sides of the password so that you can perform successfully.
Second, the Import database steps:
1. The imported commands begin with IMP, and there is no change behind the full=y.
IMP username/password @ remote IP: Port/instance file= database file location: \ file name. DMP Full=y
2. When importing, it is sometimes possible for users with DBA authority to import such error prompts as data similar. Indicates that the currently imported user name does not have DBA authority, as long as the user is assigned DBA authority. After you log on with the system user, enter SQL on the SQL panel, and then execute
Grant DBA to Znxd
when you are done, reopen the new CMD window to execute the import command.
3. Of course, the errors encountered by the import will also often prompt the user 1 of the data into the user 2 of the data execution is not successful specifically I forgot, roughly. At this time, I remember it is necessary to import the command in front of the full=y, plus two fromuser= users 1 touser= users 2, it should be so, if not, please Baidu under others. I forgot about this step. Don't get hurt by me, find someone else's confirmation.