See "Environment variables" in path, adding D:oracleora92bin to global variables (if your Oracle is installed in D disk).
Four modes of 2.1.1 Exp:
1, the table mode, used to export a table.
2, user mode, used to export a user's schema.
3, table space mode, used to export table space. Table space is composed of data files, the data file from the current library copy to the target library, in the Exp tool from the current library to export the table space of the dictionary information and then import to the target library, two-step walk. More restrictive.
4, Database mode. Used to export the entire database, not for large amounts of data.
2.1.2 Export Example
Export 1--User mode
EXP username/password @ NETWORK SERVICE name File=d:/oralce_bak_20101001.dmp owner= username Log=d:/exp.log direct=y
File: Exported *.dmp files to specified directory
Owner: Which user's schema is exported
LOG: LogFile lost to specified directory (optional)
Direct:y indicates that the direct export (optional) speed is more than one times faster than the general export, and the default n
Rows:y indicates that data is exported at the same time (optional), and the default value Y,n represents the only guide table structure
Export 2--Table Schema
EXP username/password @ NETWORK SERVICE name file=20101001.dmp tables= table name 1, table name 2 rows=y log=exp.log
File: exported *.dmp files to current directory
Tables: Specifies the exported table name, which can be multiple, separated by commas
Rows:y indicates that data is exported at the same time (optional), and the default value Y,n represents the only guide table structure
LOG: File lost to current directory (optional)
Export 3--Database Schema
EXP username/password @ NETWORK SERVICE name file=20101001.dmp full=y rows=y log=exp.log grants=y
File: exported *.dmp files to current directory
Full: Export the entire library
Rows:y indicates that data is exported at the same time (optional), the default value Y, n represents the library structure only
LOG: File lost to current directory (optional)
Grants:y indicates export authorization (optional)
The following example illustrates the command format for exporting imports:
Export of databases:
1, the database test completely exported, user Name System Password Manager, exported to D:daochu.dmp
| The code is as follows |
Copy Code |
Exp System/manager@test file=d:daochu.dmp full=y |
2, the system users in the database and SYS users of the table export
| The code is as follows |
Copy Code |
Exp system/manager@test file=d:daochu.dmp owner= (System,sys) |
3, the database in the table inner_notify, Notify_staff_relat Export
| The code is as follows |
Copy Code |
Exp AICHANNEL/AICHANNEL@TESTDB2 file= d:datanewsmgnt.dmp tables= (Inner_notify,notify_staff_relat) |
4, the database in the Table table1 field filed1 with "00" Data export
| The code is as follows |
Copy Code |
Exp system/manager@test file=d:daochu.dmp tables= (table1) query= "where filed1 like ' 0% '" |
Import of database:
First, you import database test into the database Daoru by creating the empty database Daoru of the Configuration assistant.
| The code is as follows |
Copy Code |
Imp user/pwd@daoru file=d:test.dmp fromuser=user touser=user buffer=10240000 |
Note: You need to have sufficient privileges and permissions that will prompt you.
Database can be connected to. You can use tnsping test to get the database test to connect
There is also a DMP order, here to say
To export a DMP file step
Input: Run cmd? exp (or Exp.exe in Oracle's Bin directory)
Username/password @ Library Name (example: Ncs_test/k@gaichu)
Export Path (C:TEXT.DMP)
A series of default carriage returns
Export complete
2. Import DMP File Step
Input: Run cmd? Imp (or Imp.exe in Oracle's Bin directory)
Username/password @ Library Name (example: Ncs_test/k@gaichu)
Import Path (C:TEXT.DMP)
A series of default carriage returns
Import complete