DB_LINK:
搏击格斗
dblink 需要创建以下 3个权限(DB_LINK不能通过databa link提交commit事务与这些DDL)
SQL> lect distinct 脖子落枕最快恢复办法privilege as "databa link privileges" from少儿英语教学 role_sys_privs where privilege in ('CREATE SESSION','CREATE DATABASE LINK','CREATE PUBLIC DATABASE LINK');
【第一种】创建公有DB_LINK:只要是数据库里的用户都可以使用公有dblink
SQL> create public databa link ora11g connect to ur_name identified by "ur_passwd" using 'ora11g';
【第二种】私有dblink:只能在该数据库中由创建该dblink的用户才能使用和删除,其他用户都不可以使用和删除。
create databa link ora11g connect to itpux identified by "itpux" using 'ora11g';
用法:lect * from 治脱发的简单有效方法test@itpux
编辑TNS:a:
ora11g =
(DESCRIPTION小清新女生 =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = db01)
))
【第三种】全局的dblink: 和共有私有不同的是global dblink创建不用直接在a中定义,而是直接把服务写在dblink的定义中
create public databa link dblink_name connect to ur_name identified by叶剑鸣 "password" using '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.52)(PORT = 1521))
) (CONNECT_DATA =
(SERVICE_NAME = db01)
))';
装修知识
---------------------------------------------------------------------------
-
-查看 dblink
col OBJECT_NAME format a20
lect owner,object_name from dba_objects where object_type='DATABASE LINK';
--或者
小米手环怎么开机
col DB_LINK format a30
lect * from dba_db_links;
关闭: alter ssion clo databa link ora11g;
删除: drop public databa link ora11g;