oracle中的database link如何使用 5
1个回答
展开全部
SQL> CREATE DATABASE LINK mydblink
2 CONNECT TO test IDENTIFIED BY test123
3 USING '(DESCRIPTION =
4 (ADDRESS_LIST =
5 (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.210)(PORT = 1521)))
6 (CONNECT_DATA = (SERVICE_NAME = orcl)
7 )
8 )';
Database link created.
SQL> select count(1) from user_tables@mydblink;
COUNT(1)
----------
6
注:
如果创建全局dblink,必须使用systm或sys用户,在database前加public。
2 CONNECT TO test IDENTIFIED BY test123
3 USING '(DESCRIPTION =
4 (ADDRESS_LIST =
5 (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.210)(PORT = 1521)))
6 (CONNECT_DATA = (SERVICE_NAME = orcl)
7 )
8 )';
Database link created.
SQL> select count(1) from user_tables@mydblink;
COUNT(1)
----------
6
注:
如果创建全局dblink,必须使用systm或sys用户,在database前加public。
参考资料: http://hi.baidu.com/wangzhiqing999/blog/item/fa5e070ef5c3950f94ca6b69.html
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询