Create Db_link, remote export/import. Expdp/impdp
The database is exported remotely, with limited Oracle database Local disk space, or application system needs. In Oracle, the EXP Remote guide is too slow, and the EXPDP is not able to pass directly through the Remote Guide library. Therefore, you need to create a db_link remote connection before you can use the EXPDP remote guidance library. The detailed steps are as follows:
1. In the configuration file of the local library, add as configuration:
Tnames.ora Increase
TEST2DB =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (host = remote host IP) (PORT = 1521))
)
(Connect_data =
(service_name = remote Service name)
)
)
2. Create Dblink
Sql> CREATE DATABASE link local_test2db connect to system identified by Oracle using ' test2db ';
Database Link created.
Sql> SELECT * from [email protected]_test2db;
D
-
X
3. Create an Export temp directory:
sql> Create or replace directory Dumpdir as '/oradata/dump ';
Directory created.
4. Authorized users, generally with system users.
[HTML] View plain copy on code to see a snippet derived from my Code slice
Sql> Grant Read,write on the directory Dumpdir to system;
Grant succeeded.
Sql> Conn System/oracle
Connected.
Sql> SELECT * from [email protected]_test2db;
D
-
X
Sql> quit
5. Remote export:
by User: expdp system/oracle network_link=local_test2db directory=dumpdir dumpfile=test.dmp logfile=test.log Schemas=users
6. Remote import:
Remote import, the DMP file needs to be copied to the remote server to import, not responsible for import. or import the remote exported library into the local library, and then pass the Dblink way to the remote library, both sides have dblink.
If the remote primary library has limited disk space and cannot be copied to the remote primary library disk, it is better to mount the server disk to the main library disk in NFS. Then import directly.
If you are using remote import, you can import the exported DMP file into your local library. It is then inserted remotely in the DB Library on the other end, for example: INSERT INTO table select * from [email protected];
Oracle Remote export/import