Creation of--dblink:
Create Public database link Ccare_test
Connect to Ccare identified by Ccare
Using ' (DESCRIPTION =
(address = (PROTOCOL = TCP) (HOST = 10.221.3.130) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(Service_Name =ora11g)
)
)';
--the configuration is consistent with the Tnsnames.ora
The use of--dblink
SELECT * FROM Rec_con@db_link_aaa_blldb
Dblink shutdown:
COMMIT;--DML operation requires a commit before it can be closed;
Execute immediate ' alter session close database link Db_link_aaa_blldb ';
--database Link's deletion
Drop Public Database link billingdb
Attention points are as follows:
Dblink is closed manually when not in use, but Oracle automatically opens when used
Dblink can not be added in parallel;
Dblink can only build one, to other users after the authorization, under different users, the table name before adding a user name can access to other users of the table;
This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/