1 頁 (共 1 頁)

Linux connect Oracle 9

發表於 : 2014-02-05 19:14:01
yehlu
tnsnames.ora

代碼: 選擇全部

VJ.WORLD =
  (DESCRIPTION =
    (ADDRESS_LIST =
        (ADDRESS =
          (COMMUNITY = tcp.world)
          (PROTOCOL = TCP)
          (Host = 192.168.0.150)
          (Port = 1521)
        )
    )
    (CONNECT_DATA = (SID = VJ)
    )
  )

代碼: 選擇全部

export TNS_ADMIN=/root
export NLS_LANG=AMERICAN_AMERICA.ZHT16BIG5

代碼: 選擇全部

sqlplus64 VJ/VJ@VJ.WORLD

Re: Linux connect Oracle 9

發表於 : 2014-02-05 19:15:44
yehlu
http://amychen1108.pixnet.net/blog/post ... -developer

設定環境變數

指定 Oracle 應用程式的 HOME 目錄
ORACLE_HOME = D:\oracle\product\10.2.0\client_1

在「系統環境變數」指定 Client 要使用的字集
NLS_LANG = TRADITIONAL CHINESE_TAIWAN.ZHT16MSWIN950

在「系統環境變數」指定 tnsnames.ora 檔案所在的路徑
TNS_ADMIN = D:\oracle\product\10.2.0\client_1\NETWORK\ADMIN

在「系統環境變數」指定日期的輸入、輸出格式
NLS_DATE_FORMAT = yyyy-mm-dd hh24:mi:ss

Re: Linux connect Oracle 9

發表於 : 2014-02-06 09:15:59
yehlu
How do I export variables for all users in Linux?

You can put the variable assignments in one of the shell startup scripts:

/etc/profile
/etc/bash_profile
/etc/bashrc
for bash and some other shells, depending on how your particular distro is configured. There are equivalents for most shells. There is also a file

/etc/environment
which is not a script but contains enviroment variable assignments, and is loaded at login via pam_env.so. Obviously this works only on systems that use PAM for authentication (almost all Linux distros, but probably not Solaris).