Practical application of three models in Oracle Database Backup

Source: Internet
Author: User

In Oracle Database backup, we often use the following three modes: Table mode, all objects in the specified user, and data export/import, the following describes the actual application of the three modes in Oracle Database Backup.

1) Export/import data from a specified table.

Export: export one or more tables:

 
 
  1. $ exp user/pwd file=/dir/xxx.dmp log=
    xxx.log tables=table1,table2 

Export some data of a table

 
 
  1. $ exp user/pwd file=/dir/xxx.dmp log=
    xxx.log tables=table1 query=\“where col1=
    \‘…\’and col2 \<…\” 

Import: import one or more tables.

 
 
  1. $ imp user/pwd file=/dir/xxx.dmp log=
    xxx.log tables=table1,  
  2. table2 fromuser=dbuser touser=
    dbuser2 commit=y ignore=y 

2) In the second mode of Oracle Database backup, you need to export/import all objects and data of the specified user.

Export:

 
 
  1. $ exp user/pwd file=/dir/xxx.dmp log=
    xxx.log owner=xx, yy) 

Export only data objects, not data rows = n)

 
 
  1. $ exp user/pwd file=/dir/xxx.dmp log=
    xxx.log owner=user rows=n 

Import:

 
 
  1. $ imp user/pwd file=/dir/xxx.dmp log=
    xxx.log fromuser=dbuser touser=dbuser2 
  2. commit=y ignore=y 

3) Export/Import and Export all objects in the database in full database mode:

 
 
  1. $ exp user/pwd file=/dir/xxx.dmp log=xxx.log full=
    ycommit=y ignore=y 

Import:

 
 
  1. $ imp user/pwd file=/dir/xxx.dmp log=xxx.log fromuser=
    dbuser touser=dbuser2 

The above is an introduction to the three modes related to Oracle database backup. I hope you will gain some benefits.

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.