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)