Orcale backup and restoration of databases

Source: Internet
Author: User
Orcaledata warehouse upload data command exp.exe, restore Data Warehouse command imp.exe 1. Backup database mdash; exp

Orcale Data Warehouse upload data command exp.exe, restore Data Warehouse command imp.exe 1. Backup database mdash; exp

The Orcale Data Warehouse command uses exp.exeto restore the Data Warehouse command imp.exe

I. Back up the database -- exp

Format: exp username/password @ database owner = owner file = C: \ xxx. dmp

Eg1: the database TEST is completely exported. Username: test, password: test, Owner: tb_test: exported to D: \ daochu. dmp.

Exp test/test @ TEST owner = tb_test file = d: \ daochu. dmp

Step 1: Go to the bin directory under the Oracle Installation Directory;

Step 2: exp test/test @ TEST owner = tb_test file = d: \ daochu. dmp

Eg2: export data starting with "00" in the field filed1 in the test table in the database. Username: test, password: test

Exp test/test @ TEST file = d: \ daochu. dmp tables = (test) query = "where filed1 like '201312 '"

Note: You can add compress = y to the end of the command to compress the file.

2. Restore the database-imp

Format: imp username/password @ database full = y file = backup file path ignore = y log = log file Path

Eg 1. Restore the D: \ daochu. dmp file to the tb_test database. Set the user name to test, password to test, and log file to D:/log.txt.

Step 1: Go to the bin directory under the oracle Installation Directory;

Step 2: imp system/manager @ tb_test full = y file = "d: \ back. dmp" ignore = y log = d: \ log.txt

Eg2: Import table 1 in d: \ daochu. dmp to the tb_test database.

Imp system/manager @ tb_test file = d: \ daochu. dmp tables = (table1)

NOTE: If there is no previous table record, duplicate data may occur. You can solve this problem by using the following methods:

First, delete the USER (test used by myself): drop user test CASCADE

Next, create a user (test)

Create user test identified by test

Default tablespace test_data

Temporary tablespace test_temp

Quota unlimited on test_data

Account unlock;

Authorize the new user to grant connect, DBA, resource to test;

Finally, run the import data command.

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.