Execution environment: it can be executed in sqlplus. EXE or DoS (command line,
When dos can be executed, the \ ora81 \ bin installation directory in Oracle 8i is set to a global path,
The exp. EXE and imp. EXE files in this directory are used for import and export.
Oracle is written in Java. I think the sqlplus. EXE, exp. EXE, and imp. EXE files are packaged class files.
Sqlplus. EXE calls exp. EXE and imp. EXE to complete the import and export functions.
The following describes the Import and Export instances. You can import and export instances to the Import and Export instances, because the import and export operations are very simple.
Data Import:
1. import data from D: \ daochu. dmp to the test database.
IMP system/manager @ test file = D: \ daochu. dmp
The above may be a problem, because some tables already exist, and then it will report an error, the table will not be imported.
Add ignore = Y to the end.
2. Import table 1 in D: \ daochu. dmp
IMP system/manager @ test file = D: \ daochu. dmp tables = (Table1)
The following statement imports the user qhmis backed up by Oracle on disk C to the user qhmis database.
IMP qhmis/qhmis @ qhmis file = 'C: qhmis20060224.dmp 'ignore = n grants = y full = y
data export:
exp qhmis/qhmis @ qhmis file = 'd: \ backup \ qhmis \ qhmis20060526.dmp 'grants = y full = n
1. Export the database test completely. Use the User Name System Password Manager to D: \ daochu.
exp system/manager @ test file = D: \ daochu in DMP. DMP full = Y
2. Export the tables of system users and SYS users in the database
exp system/manager @ test file = D: \ daochu. DMP owner = (system, sys)
3. Export tables Table1 and Table2 in the database
exp system/manager @ test file = D: \ daochu. DMP tables = (Table1, table2)
4. Export the data with the field filed1 in table 1 in the database starting with "00"
exp system/manager @ test file = D: \ daochu. DMP tables = (Table1) query = \ "where filed1 like '000000' \"
This is a common export method. You can use WinZip to compress the DMP file, however, you can add compress = y after the preceding command.