--Log in as DBA
C:\users\administrator>sqlplus/as SYSDBA
--Create User
Sql> create user bfzg0828 identified by bfzg0828 default Tablespace users quota
Unlimited on users;
--Grant the connection role, the resource role to the user
Sql> Grant Connect,resource to bfzg0828;
Authorization is successful.
--Authorization to create a data link
Sql> Grant Create table,create database link to bfzg0828;
Authorization is successful.
--Create Folder
sql> Create or replace directory Oracle_exp as ' D:\oracle ';
The folder was created.
--Create file on physical machine D disk Oracle
......
--Grant users permission to read and write folders
Sql> Grant Read,write on the directory oracle_exp to bfzg0828;
Grant Read,write on directory oracle_exp to BFZG;
Authorization is successful.
--Login with bfzg0828 users
Sql> Conn bfzg0828/bfzg0828
is connected.
--Create a Web database link
Sql> CREATE DATABASE link test113 connect to BTV10_BZ identified by BTV10_BZ using ' 192.168.0.66:1521/bttest ';
The database link was created.
--Query the network link created
Sql> SELECT * from [email protected];
Global_name
-----------------------------------------------
Bttest
Sql>
--use EXPDP to export the remote database to a local folder D:\oracle\bfzg0828.dmp
C:\USERS\ADMINISTRATOR>EXPDP Bfzg0828/[email protected] directory=dir_exp dumpfile=bfzg0828.dmp logfile= Bfzg0828.log network_link=test113
--After successful export, import to local library using IMPDP
--Here is the new user Bfzg user, has the Connect,resouce role permission, Table_exists_action=replace said, assuming the table exists is replaced, IMP has no function
IMPDP Bfzg/bfzg directory=oracle_exp dumpfile=bfzg0828. DMP REMAP_SCHEMA=BTV10_BZ:BFZG exclude=statistics Table_exists_action=replace
Note BTV10_BZ is the export user, BFZG for this import user
BFZG0828. DMP Export User is BTV10_BZ (btv10_bz/[email protected]:1521/bttest)
--Import a single table
IMPDP Bfzg/bfzg directory=oracle_exp dumpfile=bfzg0828. DMP Tables=btv10_bz.bt_corp Remap_schema=btv10_bz:bfzg exclude=statistics table_exists_action=replace
Oracle Data Pump remote import file to local database