標籤:
伺服器A安裝的oracle 12c 64位的資料庫,機器B如何訪問oracle資料庫。
準備:
1.下載instantclient-basic-nt-12.1.0.2.0.zip,:http://pan.baidu.com/s/1c04lzSO
2.下載plsql,:http://pan.baidu.com/s/1bnHKDOj
安裝步驟
1.安裝orcle用戶端
將下載的 instantclient-basic-nt-12.1.0.2.0.zip解壓到機器B中非中文路徑的目錄下,假設解壓到了路徑
D:\tools\Application Develop\oracle\instantclient-basic-nt-12.1.0.2.0\instantclient_12_1
2.配置資料來源檔案
在機器B中的以上路徑中建立檔案NETWORK\ADMIN\tnsnames.ora
tnsnames.ora的內容即為伺服器A中資料來源的配置tnsnames.ora的內容。
伺服器A中tnsnames.ora的地址:C:\app\Administrator\product\12.1.0\dbhome_2\NETWORK\ADMIN\tnsnames.ora
3.添加環境變數
在機器B右擊"我的電腦" - "屬性" - "進階" - "環境變數" - "系統內容變數"
3.1選擇"Path" - 點擊"編輯", 把 "D:\tools\Application Develop\oracle\instantclient-basic-nt-12.1.0.2.0\instantclient_12_1;" 加入;
3.2點擊"建立", 變數名設定為"TNS_ADMIN", 變數值設定為"D:\tools\Application Develop\oracle\instantclient-basic-nt-12.1.0.2.0\instantclient_12_1;",點擊"確定";
4.安裝plsql,設定Oracle Home和OCI Library
安裝plsql到在機器B的非中文目錄下。開啟plsql 點擊取消登陸,進入plsql介面,在“工具”的“喜好設定”中或是英文的”tools“的”preferences“中設定Oracle Home和OCI Library
Oracle Home :D:\tools\Application Develop\oracle\instantclient-basic-nt-12.1.0.2.0\instantclient_12_1
OCI Library :D:\tools\Application Develop\oracle\instantclient-basic-nt-12.1.0.2.0\instantclient_12_1\oci.dll
用戶端如何訪問訪問oracle 12c 64位的資料庫