一、环境变量的及其含义:
数据库主目录 ORACLE_HOME=D:\app\Administrator\product\11.2.0\dbhome_1 监听文件所在目录 TNS_ADMIN=D:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN 或者 TNS_ADMIN=D:\Program Files\PLSQL\ 简体中文的编码格式 NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK -- 中文字符集 或者 NLS_LANG=SIMPLIFIED CHINESE_CHINA.AL32UTF8 --美式UTF8字符集
JDK主目录 JAVA_HOME=D:\Program Files\Java\jdk1.7.0_79 JDK类路径 CLASSPATH=.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar; 可执行文件所在路径 Path=%JAVA_HOME%\bin;D:\app\Administrator\product\11.2.0\dbhome_1\bin
二、监听文件
listener.ora
# listener.ora Network Configuration File: D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = CLRExtProc) (ORACLE_HOME = D:\app\Administrator\product\11.2.0\dbhome_1) (PROGRAM = extproc) (ENVS = "EXTPROC_DLLS=ONLY:D:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll") ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) ) ) ADR_BASE_LISTENER = D:\app\Administrator
tnsnames.ora
# Generated by Oracle configuration tools. LISTENER_ORCL = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) ORACLR_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) (CONNECT_DATA = (SID = CLRExtProc) (PRESENTATION = RO) ) ) # 本地主机 ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) ) ZHENG = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.11.219)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = zheng.bonc.com) # 此处为全局数据库名 也可以为某个存在的数据库名 ) )