Oracle private dblink和pubic dblink
Oracle DBLINK 建立分為private 和 public dblink,預設建立的為private ; private dblink 只有建立的schema才能刪除,sys也刪除不了;public dblink 任意schema都可以刪除,只要許可權夠。
一、PRIVATE DBLINK:
收回dba許可權:
SQL> revoke dba from yoon;
Revoke succeeded.
嘗試連線,無法連線:
SQL> conn yoon/yoon
ERROR:
ORA-01045: user YOON lacks CREATE SESSION privilege; logon denied
Warning: You are no longer connected to ORACLE.
連線sys
SQL> conn / as sysdba
Connected.
授權
SQL> grant connect to yoon;
Grant succeeded.
SQL> grant create database link to yoon;
Grant succeeded.
SQL> conn yoon/yoon
Connected.
當前使用者:
SQL> show user
USER is "YOON"
建立dblink:
SQL> create database link dblink_yoon connect to yoon identified by yoon using 'YOON';
Database link created.
連線sys使用者:
SQL> conn / as sysdba
Connected.
刪除dblink:
SQL> drop database link dblink_yoon;
drop database link dblink_yoon
*
ERROR at line 1:
ORA-02024: database link not found
SQL> show user
USER is "SYS"
SQL> drop database link dblink_yoon ;
drop database link dblink_yoon
*
ERROR at line 1:
ORA-02024: database link not found
檢視dblink
SQL> select * from dba_db_links;
OWNER DB_LINK USERNAME HOST CREATED
---------- ------------- ---------- ---------- ---------
YOON DBLINK_YOON YOON YOON 14-NOV-14
連線建立dblink使用者:
SQL> conn yoon/yoon
Connected.
SQL> drop database link dblink_yoon ;
Database link dropped.
二、PUBLIC DBLINK:
SQL> conn / as sysdba
Connected.
SQL> grant dba to yoon;
Grant succeeded.
SQL> conn yoon/yoon
Connected.
SQL> show user
USER is "YOON"
SQL> create public database link dblink_yoon connect to yoon identified by yoon using 'YOON';
Database link created.
SQL> conn / as sysdba
Connected.
SQL> grant dba to yoon;
Grant succeeded.
SQL> conn yoon/yoon
Connected.
SQL> show user
USER is "YOON"
SQL> create public database link dblink_yoon connect to yoon identified by yoon using 'YOON';
Database link created.
SQL> conn / as sysdba
Connected.
SQL> select * from dba_db_links;
OWNER DB_LINK USERNAME HOST CREATED
---------- ------------- ---------- ---------- ---------
PUBLIC DBLINK_YOON YOON YOON 14-NOV-14
SQL> drop public database link dblink_yoon;
Database link dropped.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28939273/viewspace-1332640/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORACLE DBLINKOracle
- oracle DBLink oracleOracle
- oracle DBLink sqlserverOracleSQLServer
- oracle之DBLINKOracle
- oracle dblink用法總結和expdp和impdp利用dblink倒入匯出到本地Oracle
- Oracle dblink詳解Oracle
- Oracle建立dblink MySQLOracleMySql
- Oracle dblink介紹Oracle
- oracle dblink問題Oracle
- Oracle dblink詳解(轉)Oracle
- 【PL/SQL】oracle建立dblinkSQLOracle
- Oracle dblink監聽問題Oracle
- 水煮oracle34----oracle dblink詳解Oracle
- 配置Oracle DBlink連線MySQL庫OracleMySql
- oracle database link (dblink) 工作原理OracleDatabase
- Oracle SQL performance with database links - dblinkOracleSQLORMDatabase
- 建立oracle dblink 的兩種方式Oracle
- DBLINK詳解
- DBLINK 設定
- Oracle 11g使用dblink與12c使用dblink的一點區別Oracle
- oracle 12c使用dblink克隆pdbOracle
- Oracle DBLINK 抽數以及DDL、DML操作Oracle
- PostgreSQL DBA(58) - DBLinkSQL
- federated MySQL的DBLinkMySql
- dblink的型別型別
- DBLink配置總結
- 【DBLINK】DBLINK域名問題及與global_name和db_domian的關係
- 達夢7異構(DM-Oracle) DBLINKOracle
- Oracle->Mysql dblink 建立詳細過程OracleMySql
- oracle 9i 刪除dblink問題Oracle
- Oracle19c dblink連結mysql8.0OracleMySql
- ORACLE 建立DBLINK 自動加域名解決方案Oracle
- oracle dblink實現insert語句的同步Oracle
- SQL Server通過dblink訪問Oracle資料SQLServerOracle
- linux oracle 建立informix dblink 錯誤解決LinuxOracleORM
- dblink概述及建立示例
- Greenplum安裝dblink模組
- DBLINK詳解(轉載)