Quick and convenient oracle Data Import/Export commands

Source: Internet
Author: User
1. Database Export: three modes: Full Database Export, user export, and table export. 1. Command Line-full Database Export expuseridsystemsystem @ MyOraclefullyfile (c: tmp2004020601.dmp, c: tmp2004020602.dmp, c: tmp2004020603.dmp) filesize2GBlogc: tmp20040206.log Remarks: This command

1. Database Export: three modes: Full Database Export, user export, and table export. 1. command Line-full Database Export expuserid = system/system @ My Oracle full = y file = (c:/tmp/2004020601.dmp, c:/tmp/2004020602.dmp, c: /tmp/2004020603.dmp) filesize = 2 GB log = c:/tmp/20040206.log Note: This command

1. Database Export: three modes: Full Database Export, user export, and table export.
1. Command Line-full Database Export
Exp userid = system/system @ MyOracle full = y file = (c:/tmp/2004020601.dmp, c:/tmp/2004020602.dmp, c:/tmp/2004020603.dmp) filesize = 2 GB
Log = c:/tmp/20040206.log
  
Note: This command exports full-database data to multiple files. Each file has a maximum of 2 GB, AND exp only generates the minimum number of exported files. For example, if the exported data is less than 2 GB,
Exp only generates/tmp/2004020601.dmp. If there are too few files in the file list,
All exported data cannot be stored. exp prompts the user to enter the file name and record the export process log.


2. Command Line-full export
Exp userid = system/system @ MyOracle full = y inctype = complete
File = (/tmp/2004020601.dmp,/tmp/2004020602.dmp,/tmp/2004020603.dmp)
Filesize = 2 GB log =/tmp/20040206.log
  
This command completely exports the full database data. The maximum size of each file in multiple files is 2 GB, and the export process logs are recorded.


Note: During full-Database Export, the incremental export type is (complete) by default, so the export results of 1 and 2 are identical.

3. Command Line-cumulative Export
Exp userid = system/system @ MyOracle full = y inctype = cumulative
File = (/tmp/2004020601.dmp,/tmp/2004020602.dmp) filesize = 2 GB
Log =/tmp/20040206.log
  
This command cumulatively exports full-database data to multiple files. Each file has a maximum of 2 GB and the export process logs are recorded.
  
Note: If you select the incremental export type, you must select full = y, that is, you can only perform full or incremental export in full-Database Export mode.

4. Command Line-incremental Export
  
Exp userid = system/system @ MyOracle full = y inctype = incremental
File = (/tmp/2004020601.dmp,/tmp/2004020602.dmp) filesize = 2 GB
Log =/tmp/20040206.log
  
This command cumulatively exports full-database data to multiple files. Each file has a maximum of 2 GB and the export process logs are recorded.


5. export from the command line user
  
Exp userid = cams/cams @ cams owner = cams file = (/tmp/2004020601.dmp,
/Tmp/2004020602.dmp,/tmp/2004020603.dmp) filesize = 2 GB
Log =/tmp/20040206.log
  
This command is used to export cams user data to multiple files. Each file has a maximum of 2 GB export process logs.
  
6. Export the command line table
  
Exp userid = cams/cams @ cams tables = (tbl_log, tbl_user_log) file = (/tmp/2004020601.dmp,/tmp/2004020602.dmp) filesize = 2 GB
Log =/tmp/20040206.log
  
This command exports the data of two tables of the cams user to multiple files. Each file has a maximum of 2 GB, and the export process logs are recorded.


Ii. Database Import
1. Command Line table import: There are three modes: a: tables (), B: full = y, c: fromuser (), touser ()
A) imp userid = system/system @ MyOracle file = c:/export/user_group.dmp log = c:/export/user_group.dmp tables (tbl_user, tbl_group)
B) imp userid = system/system @ MyOracle file = c:/export/user_group.dmp log = c:/export/user_group.dmp full = y
C) imp userid = system/system @ MyOracle file = c:/export/user_group.dmp log = c:/export/user_group.dmp fromuser = sanmyd touser = system

2. Import the user using the command line:
Imp userid = system/system @ MyOracle file = c:/export/user_group.dmp log = c:/export/user_group.dmp fromuser = (sanmyd) touser = (system)

3. Command Line full Database Import
Imp userid = system/system @ MyOracle file = c:/export/user_group.dmp log = c:/export/user_group.dmp full = y ignore = y

3. Compile the BAK file and export the data at subscription.

@ Echo off

If exist "d: \ smqdDB_bak" goto doExp

Md "d: \ smqdDB_bak"

: DoExp

Exp sanmyd/sanmyd@DEMO_192.168.2.102file = 'd: \ smqdDB_bak \ % date :~ 0, 4% % date :~ 5, 2% % date :~ 8, 2%. dmp'

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.