zoukankan      html  css  js  c++  java
  • oracle_dblink配置

    说明:一下是未配置本地服务的dblink。

    前提:   授权>  grant create public database link,create database link to myAccount;  

    1.创建dblink

    SQL> create database link demob connect to dblink identified by dblink using '(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 10.100.25.14)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orcl)))';

    Database link created.

    参数说明> 

    demob --link_name

    dblink -- 远程数据库的用户账号与密码

    (DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 10.100.25.14)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orcl)))  -- 远程数据库的tnsnames.ora

    ------------------------------------------------------------------------------------------------------------------------------

    2.使用dblink

    SQL> select * from dblink.dblink@demob;

    ID
    ----------
    1
    2

    参数说明

    @demob  --dblink_name

    ___________________________________________________________________________________________________

    3.查看dblink

    select owner,object_name from dba_objects  where object_type='DATABASE LINK'; 

    或者

    select * from dba_db_links;  

    —————————————————————————————————————————————————————————————————

    4.删除db_link

    DROP PUBLIC DATABASE LINK linkfwq;  或者 DROP  DATABASE LINK linkfwq

  • 相关阅读:
    [Oracle]Oracle的闪回归档
    【zabbix】snmp监控linux主机
    XFS文件系统
    PostgreSQL的使用向导
    PostgreSQL 12 YUM安装
    011.MySQL双主多从+Keepalived配置
    010.MySQL-Keepalived搭配脚本04
    009.MySQL-Keepalived搭配脚本03
    008.MySQL-Keepalived搭配脚本02
    007.MySQL-Keepalived搭配脚本01
  • 原文地址:https://www.cnblogs.com/andy6/p/6073594.html
Copyright © 2011-2022 走看看