Today, nothing to do, on a database to play, by the way to summarize under
0, cmd command Administrator permissions to log into the database
Sqlplus/as SYSDBA
1. cmd connection to remote database
Sqlplus Xn_balance/[email PROTECTED]:1521/ORCL
--------Export
2, cmd command to export the database (no need to connect the database, direct guidance)
Exp Xn_balance/[email PROTECTED]:1521/ORCL file=d:/daochu.dmp full=y
3. Export the system user in the database and the SYS user's table
Exp System/[email protected] file=d:/daochu.dmp owner= (System,sys)
4. Export the table inner_notify and Notify_staff_relat in the database
Expsystem/Manager@TESTDB2 file= d:/data/newsmgnt.dmp tables= (Inner_notify,notify_staff_relat)
5. Export the field filed1 in table table1 in the database with the data beginning with "00"
Exp System/[email protected] file=d:/daochu.dmp tables= (table1) query=/"where filed1 like ' 0% '/"
---------Import
6. Import Database files
Imp gzjs/[email protected] file=d:\daochu.dmp full=y ignore=y;
7. Import a table
Imp gzjs/[email protected] file=d:/table.dmp tables= (balance_user) ignore=y
-----------Considerations
8, if the exported file is DBA authority, the import must also be DBA authority,
9. Database Export Import version issue
Generally low-version exported files can be imported successfully in a high version
That is, the high version is compatible with the lower version.
10, when the import, there will be some warning message: For example, the export user and the imported user name is inconsistent, can not be ignored.
11, when the import, generally in the back with Ignore=y, do not add, if the table already exists, will be an error.