• DB_Links创建际删除


    创建

    create database link gadata0008
    connect to gadata0008
    identified by "gold"
    using 'ORA11G';

    删除数据库链接:drop database link linkname;

    创建数据库链接:
    create database link linkname
    connect to username
    identified by password
    using 'connection string';


    如果想建立全局链接,则需要使用关键字:public

    create public database link linkname
    connect to username
    identified by password
    using 'connection string';


    connection string可以有两种形式:
    1,在文件tnsnames.ora配置的名称:
    如:
    CDRDL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.147.129.29)(PORT = 2521))
    )
    (CONNECT_DATA =
    (SERVICE_NAME = cdrdb)
    )
    )
    此时可以写成:
    create database link linkname
    connect to username
    identified by password
    using 'CDRDL';

    2,也可以直接使用‘=’号后面的字符串,
    如:
    create database link linkname
    connect to username
    identified by password
    using '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.147.129.29)(PORT=2521)))(CONNECT_DATA=(SERVICE_NAME=cdrdb)))';

    查询使用:

     select * from item@gadata0008.regress.rdbms.dev.us.oracle.com

    create or replace synonym ERP2_ORG_DUMMY_LOG
      for ORG_DUMMY_LOG@ERP2.REGRESS.RDBMS.DEV.US.ORACLE.COM;

  • 相关阅读:
    子矩阵
    [Ahoi2008]Meet 紧急集合
    立体图
    CF933B A Determined Cleanup
    CF746G New Roads
    树的重量
    CF519E A and B and Lecture Rooms
    矩阵
    深入浅出乘法逆元
    20180519模拟赛T2——pretty
  • 原文地址:https://www.cnblogs.com/snake-hand/p/3163007.html
Copyright © 2020-2023  润新知