Oracle export remote database and then import local database - command mode

Because the company's system is used in the final design, it is necessary to export the remote database and then import the local database

 

Originally, it is very easy to use the PL/SQL tool to export and import the table, but I don't know why I always use SQL to export and report an error, and it is useless to export executable files with Oracle . . . It's also unfortunate. . .

 

Had to use the command line as a last resort.

 

1. Export dmp file

 

exp user/[email protected]:1521/ETL file=F:\xxx.dmp owner=lyzhjt

Because there are many project databases on our company's 40, we need to take owner export, otherwise we can take full = y export

 

2. Import the dmp file

First log in as the user you want to import in SQLPLUS

imp user/[email protected]:1521/ETL  full=y file=F:\xxx.dmp

 

3. I created a local account by myself. When granting permissions, I did not grant import permissions, so it was impossible to import at first.

 

 

[sql]  view plain copy  
 
  View code snippets on CODE Derive to my code slice
  1. grantcreateuser,dropuser,alteruser ,createanyview ,        
  2.       dropanyview,exp_full_database,imp_full_database,    
  3.       create session to wqq  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326450413&siteId=291194637