Oracle database Backup and restore basic commands
1. Get Help
$ exp Help=y
$ imp help=y
2. Three ways of working
(1) Interactive mode
$ exp Then follow the prompts to enter the required parameters
(2) command line mode
$ exp User/[email protected] file=/oracle/test.dmp full=y
Enter the required parameters in the command line
(3) Oracle database Backup and recovery we're going to go. Related to parameter file mode
$ exp Parfile=username.par
Enter the required parameters in the parameter file
Parameter file Username.par content Userid=username/userpassword buffer=8192000
Compress=n grants=y
File=/oracle/test.dmp full=y
3, three modes
(1) Table mode, export/import the data of the specified table.
Export: Export one or several tables: $ exp user/pwd file=/dir/xxx.dmp Log=xxx.log tables=table1,table2
Export part of a table's data
$ exp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1 query=\ "where col1=\ ' ... \ ' and col2 \<...\"
Import: Import one or several tables
$ imp user/pwd file=/dir/xxx.dmp log=xxx.log Tables=table1,
Table2 fromuser=dbuser touser=dbuser2 commit=y ignore=y
(2) User mode, all objects and data of the specified user are exported/imported.
Export: $ exp user/pwd file=/dir/xxx.dmp log=xxx.log owner= (xx, yy)
Export Data Objects only, do not export data (rows=n)
$ exp user/pwd file=/dir/xxx.dmp log=xxx.log owner=user rows=n
Import: $ imp user/pwd file=/dir/xxx.dmp log=xxx.log fromuser=dbuser touser=dbuser2
Commit=y Ignore=y
(3) All objects in the database are exported/imported as a whole library:
$ exp user/pwd file=/dir/xxx.dmp log=xxx.log full=ycommit=y ignore=y
Import: $ imp user/pwd file=/dir/xxx.dmp log=xxx.log fromuser=dbuser touser=dbuser2
The above is an introduction to the basic commands related to Oracle database backup and recovery, and hope you will reap some of the benefits.
Shaanxi Heavy Steam Backup SQL statements are:
Exp Sxzq/[email protected] file=d:/sxzq20140720.dmp log=sxzq20140720.log full=y