Oracle遠端鏈結 Dblink

2021-10-25 07:49:36 字數 1220 閱讀 2554

grant

create

database link to 【使用者名稱】;

--建立dblink許可權

grant

create

anyview

to 【使用者名稱】;

--建立檢視許可權

grant

drop

public

database link to 【使用者名稱】;

--刪除dblink的許可權

--建立dblink

create

database link dblink的名稱

connect

to 使用者名稱 identified by

"密碼"

using

'(description =

(address_list =

(address = (protocol = tcp)(host = ip位址)(port = 1521))

)(connect_data =

(service_name =例項名)

))'

--檢視dblink

select owner,object_name from dba_objects where object_type=

'database link'

;--檢視dblink

select

*from dba_db_links;

--刪除dblink

drop

public

database link dblink的名稱;

--刪除dblink

drop

database link dblink的名稱;

使用dblink來導資料,這裡使用create database導資料,如果使用insert into table來導資料會非常的慢

--使用create database導資料

create

table 表名 as

select

*from 表名@dblink的名稱;

insert

into 表名 select

*from 表名@dblink的名稱

Oracle使用expdp遷移dblink(教程)

建立dblink必須使用dblink的所有者登入資料庫建立,才能建立到當前的模式下。且不知道資料庫使用者密碼的情況下,將無法直接建立dblink。那麼使用expdp方式遷移dbkink將是一種非常方便簡單的方法。可以使用如下方法將整個資料庫的dblink儲存到乙個轉儲檔案中 expdp dumpfi...

oracle建立與mysql的dblink

由於專案開發的需求,需要通過oracle訪問mysql,必須配置 閘道器 通過odbc實現 總結了一下從oracle訪問mysql的步驟 1.先簡單介紹下環境 作業系統 windows xp oracle 10.0.2.0.1 mysql 5.0 3.配置odbc資料來源,在控制面板中配置就可以了,...

oracle建立與mysql的dblink

1.先簡單介紹下環境 作業系統 windows 2008 r2 64bits oracle資料庫 10gr2 10.2.0.3.0 32bits mysql資料庫 5.1 32bits 注意 一定要32bits,oracle因為是32bits的所有該使用32bits,如實64bit請使用64bit ...