PLSQL Developer 遠程鏈接Oracle數據庫

下載、安裝、激活PLSQL Developer,本例使用 PLSQL Developer 13 (64 bit)。html

下載Oracle即時客戶端 Instant Client,本例使用11gR2sql

   連接:http://www.oracle.com/technetwork/cn/database/features/instant-client/index-092699-zhs.html數據庫

   關於即時客戶端 Instant Client: https://www.oracle.com/technetwork/cn/topics/instantclient-095449-zhs.html服務器

第一步:監聽配置文件

    解壓下載的Oracle客戶端-->instantclient,放置到一個固定的地方(避免被刪),在其目錄下新建文件夾\network\admin\,已下或稱「該文件夾」oracle

 方法1: 若本機裝有Oracle數據庫,將Oracle數據庫配置文件(3個.ora文件,路徑在\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN)拷貝到該文件夾下,將對應的服務器IP和全局數據庫名改掉(參考方法二)。app

   方法2: 在該文件夾下手動建立3個文件spa

    listener.orahtm

    SID_LIST_LISTENER =
     (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:\app\oracle12c\product\12.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:C:\app\oracle12c\product\12.2.0\dbhome_1\bin\oraclr12.dll")
    )
  )
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = Oracle服務器ip)(PORT = 1521))    
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )blog

  )ip

 

tnsnames.ora

LISTENER_ORCL =

  (ADDRESS = (PROTOCOL = TCP)(HOST = Oracle服務器ip)(PORT = 1521))

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = ORCL)
      (PRESENTATION = RO)
    )
  )

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Oracle服務器ip)(PORT = 1521))
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)    #Oracle 全局數據庫名
    )
  )

 

sqlnet.ora

SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
#遠程沒法鏈接數據庫 在數據庫服務器sqlnet.ora中加上這段
SQLNET.ALLOWED_LOGON_VERSION=8   

第二步:PLSQL Developer客戶端配置

不登陸帳戶直接打開,configure配置—preference首選項—connect鏈接。

Oracle Home主目錄:...\instantclient_11_2 (Oracle即時客戶端所在路徑)

OCILibrary庫:...\instantclient_11_2\oci.dll (Oracle即時客戶端主目錄中的oci.dll文件)

Apply應用——OK肯定,重啓,登陸能夠鏈接了!

相關文章
相關標籤/搜索