环境变量
#临时环境变量 export ORACLE_HOME="/opt/oracle/product/OraHome" export PATH="$PATH:$ORACLE_HOME/bin" export ORACLE_SID=orcl
Listener.ora配置
需将HOST中的localhost修改成IP。
增加SID_LIST_LISTENER配置,否则会报 Oracle 11g ORA-12514:TNS:监听程序当前无法识别连接描
LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.108.8.18)(PORT = 1521)) (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) ) SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = orcl) (ORACLE_HOME= /opt/oracle/product/OraHome/) (SID_NAME = orcl) ) ) ADR_BASE_LISTENER = /opt/oracle
配置完成后,登录账号报如下错误
ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist Process ID: 0Session ID: 0 Serial number: 0
C:\Documents and Settings\Administrator>sqlplus /nolog SQL*Plus: Release 11.2.0.1.0 Production on Thu Nov 7 17:16:47 2013 Copyright (c) 1982, 2010, Oracle. All rights reserved. SQL> conn / as sysdba Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 778387456 bytes Fixed Size 1374808 bytes Variable Size 503317928 bytes Database Buffers 268435456 bytes Redo Buffers 5259264 bytes Database mounted. Database opened.