Oracle database Import and Export combat summary (same version)

Source: Internet
Author: User
Tags import database sqlplus

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.
Related Article

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.