Mac下配置Oracle資料庫用戶端遠端連線資料庫伺服器

來源:互聯網
上載者:User

標籤:mes   htm   prot   用戶端   soft   protoc   conf   rip   library   

下載mac資料庫用戶端:

地址:http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html

下載這倆個:(來源:http://www.cnblogs.com/xiaobo-Linux/p/7821402.html)

 

12.12.0.1.0版本的:

 

解壓instantclient包到 cd ~

建立目錄lib然後做一個檔案串連:

  mkdir ~/lib  ln -s ~/instantclient_12_2/libclntsh.dylib ~/lib/  ln -s ~/instantclient_12_2/libclntsh.dylib.12.1 ~/lib/

做一個監聽:tnsnames.ora檔案

If you intend to co-locate optional Oracle configuration files such as tnsnames.orasqlnet.oraldap.ora, or oraaccess.xml with Instant Client, then create a network/adminsubdirectory. For example:

  mkdir -p ~/instantclient_12_2/network/admin

     vim tnsnames.ora

下如下內容,配置IP地址,IP地址是伺服器位址,連接埠預設1521; 

  ORALOCAL =

  (DESCRIPTION =

    (ADDRESS_LIST =

     (ADDRESS = (PROTOCOL = TCP)(HOST = 10.211.55.14)(PORT = 1521)) )

      (CONNECT_DATA = (SERVER = DEDICATED)  (SERVICE_NAME = orcl) ) )

 

串連windows oraclez11g

可以看一下IP地址:

串連的時候需要關閉防火牆,或者配置該連接埠允許串連。

 

配置一下環境變數:

 ~  vim  .profile

追加如下:

ORCL_LIBRARY_PATH="instantclient_12_2"

export ORCL_LIBRARY_PATH

export ORACLE_HOME=$ORCL_LIBRARY_PATH

export PATH=$ORACLE_HOME:$PATH

執行一下生效:

~ source .profile

登入:

~  sqlplus sys/[email protected]:1521/orcl as sysdba

Mac下配置Oracle資料庫用戶端遠端連線資料庫伺服器

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.