Oracle環境變數、監聽listener.ora、tnsnames.ora、sqlnet.ora配置
Oracle環境變數、監聽listener.ora、tnsnames.ora、sqlnet.ora配置
點選(此處)摺疊或開啟
-
NLS_DATE_FORMAT=YYYY-MM-DD HH24:mi:ss
-
NLS_LANG=AMERICAN_CHINA.ZHS16GBK
-
ORACLE10G=D:\Program files\app\oracle\product\10.2.0\db_1
-
ORACLE11G=D:\Program files\app\oracle\product\11.2.0.1\dbhome_1
-
ORACLE8I=D:\Program files\app\oracle\product\ora8i
-
ORACLE9I=D:\Program files\app\oracle\product\ora92
-
ORACLE_HOME=D:\Program files\app\oracle\product\11.2.0.1\dbhome_1
-
PATH=%ORACLE_HOME%\bin
-
TNS_ADMIN=%ORACLE_HOME%\NETWORK\ADMIN
-
-
-
-
-
---------cmd下設定使用者環境變數
-
SETX "NLS_DATE_FORMAT" "YYYY-MM-DD HH24:MI:SS"
-
SETX "NLS_LANG" "AMERICAN_CHINA.ZHS16GBK"
-
SETX "ORACLE10G" "D:\Program files\app\oracle\product\10.2.0\db_1"
-
SETX "ORACLE11G" "D:\Program files\app\oracle\product\11.2.0.1\dbhome_1"
-
SETX "ORACLE8I" "D:\Program files\app\oracle\product\ora8i"
-
SETX "ORACLE9I" "D:\Program files\app\oracle\product\ora92"
-
SETX "ORACLE_HOME" "D:\Program files\app\oracle\product\11.2.0.1\dbhome_1"
-
SETX "TNS_ADMIN" "%ORACLE_HOME%\NETWORK\ADMIN"
-
SETX "Path" "%ORACLE_HOME%\bin"
-
SETX "VBOX_MSI_INSTALL_PATH" "D:\Program Files\Oracle\VirtualBox"
-
-
-
-
alter session set nls_language='SIMPLIFIED CHINESE';
-
alter system set nls_language='AMERICAN' scope=spfile;
-
-
-
-
-
------------------------------------ sqlnet.ora----------------------------------------------
-
---------- windows
-
SQLNET.AUTHENTICATION_SERVICES= (NTS)
-
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
-
-
---------- linux
-
SQLNET.AUTHENTICATION_SERVICES= (ALL)
-
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
-
-
-
-
--------------------------------------------------------------------- oracle
-
# .bash_profile
-
-
# Get the aliases and functions
-
if [ -f ~/.bashrc ]; then
-
. ~/.bashrc
-
fi
-
-
# User specific environment and startup programs
-
-
export PATH=$PATH:/sbin/:$HOME/bin
-
-
-
# for oracle user
-
-
unset USERNAME
-
-
export GLOBAL_DB_UNIQUE_NAME=orclasm
-
export ORACLE_HOSTNAME=192.168.128.134
-
export ORACLE_UNQNAME=orclasm
-
-
export EDITOR=vi
-
export ORACLE_SID=orclasm
-
export ORACLE_BASE=/u01/app/oracle
-
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
-
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
-
export ORACLE_ALERT=$ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace
-
export PATH=$ORACLE_HOME/bin:$PATH
-
export TNS_ADMIN=$ORACLE_HOME/network/admin
-
export ORACLE_PATH=.:$ORACLE_BASE/dba_scripts/sql:$ORACLE_HOME/rdbms/admin
-
umask 022
-
-
#export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK" SELECT userenv('LANGUAGE') db_NLS_LANG FROM DUAL;
-
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8"
-
export SQLPATH=$ORACLE_HOME/sqlplus/admin
-
export NLS_DATE_FORMAT='YYYY-MM-DD HH24:mi:ss';
-
-
alias sqlplus='rlwrap sqlplus'
-
alias rman='rlwrap rman'
-
alias asmcmd='rlwrap asmcmd'
-
alias alert_log='tail -200f $ORACLE_ALERT/alert_$ORACLE_SID.log'
-
alias alert_xml='tail -200f $ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/alert/log.xml'
-
alias alert_listener='tail -200f $ORACLE_BASE/diag/tnslsnr/rhel6/listener/trace/listener.log'
-
-
-
-
-
-
-
stty erase ^h
-
ORACLE_HOME=D:\Program files\app\oracle\product\11.2.0.1\dbhome_1
-
PATH=%ORACLE_HOME%\bin
-
TNS_ADMIN=%ORACLE_HOME%\NETWORK\ADMIN
-
##NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
-
NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK
-
#ORACLE_SCRIPT=%ORACLE_HOME%\RDBMS\ADMIN
-
SQLPATH=.;%ORACLE_BASE%\dba_scripts\sql;%ORACLE_HOME%\rdbms\admin
-
-
-
NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16CGB231280"
-
NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
-
NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8"
-
NLS_LANG=AMERICAN_AMERICA.UTF8
-
NLS_LANG=AMERICAN_AMERICA.AL32UTF8
-
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
-
NLS_LANG=AMERICAN_CHINA.ZHS16GBK
-
-
-
NLS_DATE_FORMAT='YYYY-MM-DD HH24:mi:ss'
-
-
-
-
-
--------------------------------------------------------------------- grid
-
-
# .bash_profile
-
-
# Get the aliases and functions
-
if [ -f ~/.bashrc ]; then
-
. ~/.bashrc
-
fi
-
-
# User specific environment and startup programs
-
-
export PATH=$PATH:$HOME/bin
-
-
-
# for grid user
-
export ORACLE_SID=+ASM
-
export ORACLE_BASE=/u01/app/grid
-
export ORACLE_HOME=/u01/app/grid/11.2.0
-
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
-
export PATH=$ORACLE_HOME/bin:$PATH
-
umask 022
-
-
-
alias sqlplus='rlwrap sqlplus'
-
alias asmcmd='rlwrap asmcmd'
-
alias alert_log='tail -200f $ORACLE_BASE/diag/asm/+asm/$ORACLE_SID/trace/alert_$ORACLE_SID.log'
-
alias crsd_log='tail -200f $ORACLE_HOME/log/$HOSTNAME/crsd/crsd.log'
-
-
-
-
在linux和unix上有時不知道該使用LD_LIBRARY_PATH還是LIBPATH,經過搜尋和實際使用,實際的情況如下
-
-
OS Environment Variable Name
-
Linux LD_LIBRARY_PATH
-
Solaris 32-bit ruby LD_LIBRARY_PATH_32 or LD_LIBRARY_PATH
-
Solaris 64-bit ruby LD_LIBRARY_PATH_64 or LD_LIBRARY_PATH
-
HP-UX PA-RISC 32-bit ruby SHLIB_PATH
-
HP-UX PA-RISC 64-bit ruby LD_LIBRARY_PATH
-
HP-UX IA64 LD_LIBRARY_PATH
-
Mac OS X DYLD_LIBRARY_PATH
-
AIX LIBPATH
-
-
-
-
-----------------------------------------------------------------------------------------------
-
------------------------------------listener.ora--------------------------------------------
-
--動態監聽: alter system set LOCAL_LISTENER='(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.157)(PORT = 1521))';
-
-----------------------------------------------------------------------------------------------
-
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
-
# Generated by Oracle configuration tools.
-
-
LISTENER =
-
(DESCRIPTION_LIST =
-
(DESCRIPTION =
-
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.129)(PORT = 1521))
-
)
-
)
-
SID_LIST_LISTENER =
-
(SID_LIST =
-
(SID_DESC =
-
(SID_NAME = PLSExtProc)
-
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
-
(PROGRAM = extproc)
-
)
-
(SID_DESC =
-
(GLOBAL_DBNAME = orcl.lhr.com)
-
(SID_NAME = orcl)
-
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
-
)
-
(SID_DESC =
-
(GLOBAL_DBNAME = rman.lhr.com)
-
(SID_NAME = rman)
-
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
-
)
-
)
-
-
LSNR2 =
-
(DESCRIPTION_LIST =
-
(DESCRIPTION =
-
(ADDRESS_LIST =
-
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.129)(PORT = 1526))
-
)
-
)
-
)
-
SID_LIST_LSNR2 =
-
(SID_LIST =
-
(SID_DESC =
-
(SID_NAME = PLSExtProc)
-
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
-
(PROGRAM = extproc)
-
)
-
)
-
-
ADR_BASE_LISTENER = /u01/app/oracle
-
-
-
------------windows 下
-
SID_LIST_LISTENER =
-
(SID_LIST =
-
(SID_DESC =
-
(SID_NAME = CLRExtProc)
-
(ORACLE_HOME = D:\app\oracle\product\11.2.0.1)
-
(PROGRAM = extproc)
-
(ENVS = "EXTPROC_DLLS=ONLY:D:\app\oracle\product\11.2.0.1\bin\oraclr11.dll")
-
)
-
(SID_DESC =
-
(GLOBAL_DBNAME = orcl.lhr.com)
-
(SID_NAME = orcl)
-
(ORACLE_HOME = D:\app\oracle\product\11.2.0.1)
-
)
-
)
-
-
-
-----------------------/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
-
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
-
# Generated by Oracle configuration tools.
-
-
orcl =
-
(DESCRIPTION =
-
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.133)(PORT = 1521))
-
(CONNECT_DATA =
-
(SERVER = DEDICATED)
-
(SERVICE_NAME = orcl.lhr.com)
-
)
-
)
-
-
#### 動態監聽非預設埠
-
LSNR_ORCL =
-
(DESCRIPTION =
-
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.129)(PORT = 1526))
-
(CONNECT_DATA =
-
(SERVICE_NAME = orcl)
-
)
-
)
-
-
-
-------------------------------------------------------------------- rac
-
--- TAF BASIC方式
-
racdb_vip =
-
(DESCRIPTION =
-
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.132)(PORT = 1521))
-
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.131)(PORT = 1521))
-
(LOAD_BALANCE = on)
-
(CONNECT_DATA =
-
(SERVER = DEDICATED)
-
(SERVICE_NAME = jmrac)
-
(FAILOVER_MODE =
-
(TYPE = SELECT)
-
(METHOD = BASIC)
-
(RETRIES = 180)
-
(DELAY = 5)
-
)
-
)
-
)
-
-
--- TAF preconnect方式
-
racdb_vip1 =
-
(DESCRIPTION =
-
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.131)(PORT = 1521))
-
(CONNECT_DATA =
-
(SERVER = DEDICATED)
-
(SERVICE_NAME = jmrac)
-
(FAILOVER_MODE =
-
(TYPE = SELECT)
-
(METHOD = BASIC)
-
(BACKUP = preconnect)
-
)
-
)
-
)
-
-
racdb_vip2 =
-
(DESCRIPTION =
-
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.132)(PORT = 1521))
-
(CONNECT_DATA =
-
(SERVER = DEDICATED)
-
(SERVICE_NAME = jmrac)
-
(FAILOVER_MODE =
-
(TYPE = SELECT)
-
(METHOD = BASIC)
-
(BACKUP = preconnect)
-
)
-
)
- )
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26736162/viewspace-2135163/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle網路配置listener.ora、sqlnet.ora、tnsnames.oraOracleSQL
- oracle網路配置(listener.ora/sqlnet.ora/tnsnames.ora)OracleSQL
- Oracle 網路配置用到的sqlnet.ora, tnsnames.ora, listener.ora檔案OracleSQL
- [Oracle] -- 配置Oracle環境變數Oracle變數
- Oracle的網路三大配置檔案(sqlnet.ora、tnsnames.ora、listener.ora)OracleSQL
- Listener.ora、sqlnet.ora、tnsnames.ora三個配置檔案區別SQL
- Oracle 多個例項 沒有listener.ora/sqlnet.ora/tnsnames.oraOracleSQL
- listener.ora、sqlnet.ora、tnsnames.ora的關係以及手工配置舉例SQL
- [zt] 理解sqlnet.ora , tnsnames.ora , Listener.ora 檔案SQL
- oracle資料庫中listener.ora sqlnet.ora tnsnames.ora的區別Oracle資料庫SQL
- 配置環境變數變數
- oracle 最全的監聽、tnsnames.ora格式Oracle
- oracle listener.ora sqlnet.ora tnsnames.ora 三個檔案的關聯性OracleSQL
- ORACLE 環境變數Oracle變數
- tnsnames.ora監聽配置檔案詳解
- oracle中的全域性環境變數配置Oracle變數
- 配置JDK環境變數JDK變數
- Flume 配置環境變數變數
- Shell配置環境變數變數
- Kaldi配置環境變數變數
- MySQL 環境變數配置MySql變數
- jdk環境變數配置JDK變數
- JDK配置環境變數JDK變數
- java環境變數配置Java變數
- java 配置環境變數Java變數
- windows配置環境變數Windows變數
- oracle 環境變數 redhatOracle變數Redhat
- Linux環境變數配置Linux變數
- java 環境變數的配置Java變數
- Mac配置Java環境變數MacJava變數
- jdk環境變數的配置JDK變數
- ubuntu 配置java環境變數UbuntuJava變數
- XP Java 環境變數配置Java變數
- oracle 11g 【listener.ora tnsnames.ora】Oracle
- 配置jdk環境變數win10教程_win10jdk環境變數如何配置JDK變數Win10
- oracle環境變數設定Oracle變數
- JDK各版本環境變數配置JDK變數
- linux java環境變數配置LinuxJava變數