美文网首页
Oracle中dblink的创建与删除

Oracle中dblink的创建与删除

作者: 佐佑时代 | 来源:发表于2017-07-21 13:26 被阅读0次

    查询数据库中有哪些dblink连接

    select * from dba_objects where object_type='DATABASE LINK';
    

    删除公有的EMIS_PRODUCTOIN连接

    drop public database link EMIS_PRODUCTION;
    

    创建公有的EMIS_PRODUCTION连接

    create public database link EMIS_PRODUCTION connect to EMIS_FRAME identified by EMIS_FRAME using '(DESCRIPTION =
    (ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.101)(PORT = 1521)))
    (CONNECT_DATA = (SERVICE_NAME = testdb))
    )';
    

    删除EMIS_PRODUCTION连接

    drop database link EMIS_PRODUCTION;
    

    创建EMIS_PRODUCTION连接

    create database link EMIS_PRODUCTION connect to EMIS_FRAME identified by EMIS_FRAME using '(DESCRIPTION =
    (ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.101)(PORT = 1521)))
    (CONNECT_DATA = (SERVICE_NAME = testdb))
    )';
    

    测试是否可用

    select * from EMIS_FRAME.sys_menu@EMIS_PRODUCTION;
    

    相关文章

      网友评论

          本文标题:Oracle中dblink的创建与删除

          本文链接:https://www.haomeiwen.com/subject/dbfekxtx.html