How to import and export Oracle databases

Source: Internet
Author: User
Prerequisites for Database Import and Export: 1. Install the oraclek client locally or the server. 2. connect through NetConfigurationAssistant provided by oracle

Prerequisites for Database Import and Export: 1. Install the oraclek client locally or the server. 2. connect through the NetConfiguration Assistant provided by oracle

Prerequisites for Database Import and Export:

1. Install the Oraclek client or server locally.

2. connect to the target database through the NetConfiguration Assistant provided by oracle.

The first step is needless to say. The second step is to open the Net Configuration Assistant, select the third item, and enter the service name of the remote database on the next page, such as AHMCCCMS, on the following page, enter the IP address and port of the remote database (usually 1521 by default), and then test it. The test will fail because the user name and password used to connect to the database are incorrect, enter the correct user name and password to view the successful test information. Next, specify the local service name, which is equivalent to the remote database ing. Click Finish. After this step is successful, it will be easy to do.

Assume that we have configured two services:

Export source-Workstation user name CMS password password123 service name WORKDB

Import Destination -- Test Machine user name CMS_TEST password password123 service name TESTDB

The following is how to export the statement (executed on the Console ):

1. Completely export the database WORKDB, and export the user name CMS password password123 to D: \ daochu. dmp.

Exp cms/password123 @ WORKDB file = d: \ 1.dmp full = y

2. Export the table of the cms user in the database

Exp cms/password123 @ WORKDB file = d: \ 2.dmp owner = (cms)

3. Export the tables tb_contract and tb_sys_user in the database.

Exp cms/password123 @ WORKDBfile = d: \ 3.dmp tables = (tb_contract, tb_sys_user)

The following are the import statements.

1. import data from D: \ 2.dmp to the testdb database.

Imp CMS_TEST/password123 @ TESTDB file = d: \ 2.dmp ignore = y

2. Import the table tb_contract in d: \ 3. dmp

Imp CMS_TEST/password123 @ TESTDB file = d: \ 3.dmp tables = (tb_contract)

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.