Orcaledata warehouse upload data command exp.exe, restore Data Warehouse command imp.exe 1. Backup database mdash; exp
Orcale Data Warehouse upload data command exp.exe, restore Data Warehouse command imp.exe 1. Backup database mdash; exp
The Orcale Data Warehouse command uses exp.exeto restore the Data Warehouse command imp.exe
I. Back up the database -- exp
Format: exp username/password @ database owner = owner file = C: \ xxx. dmp
Eg1: the database TEST is completely exported. Username: test, password: test, Owner: tb_test: exported to D: \ daochu. dmp.
Exp test/test @ TEST owner = tb_test file = d: \ daochu. dmp
Step 1: Go to the bin directory under the Oracle Installation Directory;
Step 2: exp test/test @ TEST owner = tb_test file = d: \ daochu. dmp
Eg2: export data starting with "00" in the field filed1 in the test table in the database. Username: test, password: test
Exp test/test @ TEST file = d: \ daochu. dmp tables = (test) query = "where filed1 like '201312 '"
Note: You can add compress = y to the end of the command to compress the file.
2. Restore the database-imp
Format: imp username/password @ database full = y file = backup file path ignore = y log = log file Path
Eg 1. Restore the D: \ daochu. dmp file to the tb_test database. Set the user name to test, password to test, and log file to D:/log.txt.
Step 1: Go to the bin directory under the oracle Installation Directory;
Step 2: imp system/manager @ tb_test full = y file = "d: \ back. dmp" ignore = y log = d: \ log.txt
Eg2: Import table 1 in d: \ daochu. dmp to the tb_test database.
Imp system/manager @ tb_test file = d: \ daochu. dmp tables = (table1)
NOTE: If there is no previous table record, duplicate data may occur. You can solve this problem by using the following methods:
First, delete the USER (test used by myself): drop user test CASCADE
Next, create a user (test)
Create user test identified by test
Default tablespace test_data
Temporary tablespace test_temp
Quota unlimited on test_data
Account unlock;
Authorize the new user to grant connect, DBA, resource to test;
Finally, run the import data command.