Export and import oracle database

Oracle data import and export commonly used in two ways:

1 through plsql - dmp for import and export file> export / import -> tool;

2. Use command imp / exp performed oracle import and export data.

 

The first way: using PLSQL export / into the database: Open plsql, find toolbar

Export Table: access the Export page, select the folder, enter the name of the exported file, click Save; Click the Export button to pop export data profiles; can find this in your chosen path dmp files, backup operation is complete

Import Table: Go to import the home page, select the folder, select Import files, and users can click Import

 

The second way: Enter the command Import / Export:

Click the Start button, type cmd in the operation, carriage return;

   Enter at Export command: exp username / password @ database name file = f: \ xx.dmp owner = user name, press Enter;

   Enter what Import command: imp username / password @ database name file = f: \ xx.dmp owner = user name, press Enter;

  After a successful export will be prompted to look, you can find the database backup files in the selected path.

 

Example:

Data export:

 The database TEST 1 full export , user name, password manager system to export to the D: \ daochu.dmp in

   exp system/manager@TEST file=d:\daochu.dmp full=y

 Table 2 export system user and the user's database sys

   exp system/manager@TEST file=d:\daochu.dmp owner=(system,sys)

 3 database table table1, table2 Export

   exp system/manager@TEST file=d:\daochu.dmp tables=(table1,table2)

 4 filed1 the field in the database table table1 export data "00" starts

   exp system/manager@TEST file=d:\daochu.dmp tables=(table1) query=\" where filed1 like  '00%'\"

 

Data import:

 1 D: \ daochu.dmp the data into the TEST database.

   imp system / manager @ TEST file = d: \ daochu.dmp

   The above may be a problem, because some tables already exist, then it will error, the table will not be imported. Followed by the ignore = y on it.

 2 d: \ daochu.dmp introduced in table table1

 imp system/manager@TEST  file=d:\daochu.dmp  tables=(table1)

 

=========================================== gorgeous dividing line === ============================================

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/houchen/p/11080432.html
Recommended