oracle启动监听linux
㈠ linux下如何用命令来配置oracle11g的监听
这个不是命令配置的,是改文件
如果是服务端:
$ORACLE_HOME/network/ADMIN目录,修改LISTENER.ORA
到$ORACLE_HOME/bin下,通过lnsrctl start启动监听 lnsrctl stop | lnsrctl status 分别是停止监听和查看监听状态
如果是客户端:
$ORACLE_HOME/network/ADMIN目录,修改tnsnames.ora
==========================================================
配置LISTENER.ORA的demo:
LISTENER =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
#BEQUEATH CONFIG
(GLOBAL_DBNAME=salesdb.mycompany)
(SID_NAME=sid1)
(ORACLE_HOME=/private/app/oracle/proct/8.0.3)
#PRESPAWN CONFIG
(PRESPAWN_MAX=20)
(PRESPAWN_LIST=
(PRESPAWN_DESC=(PROTOCOL=tcp)(POOL_SIZE=2)(TIMEOUT=1))
)
)
)
配置tnsnames.ora的demo:
ora_xxx =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ora11g) <-----这个地方填SID_NAME也行
)
)
㈡ linux下启动oracle监听时报错
错误:
[oracle@Oora log]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Proction on 18-12月-2009 17:22:17
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /opt/app/oracle/proct/10.2.0/db_1/bin/tnslsnr: please wait...
TNS-12537: TNS:connection closed
TNS-12560: TNS:protocol adapter error
TNS-00507: Connection closed
Linux Error: 29: Illegal seek
[oracle@ora log]$
解决办法:
1:查看/etc/hosts文件,一定要包含以下语句:
127.0.0.1 localhost.localdomain localhost
2:保证下面2个文件标红的内容要完全一样
修改listener.ora文件
默认情况下该文件内容:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =你的服务器IP地址)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
修改tnsnames.ora文件
默认情况下该文件内容
orcl =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =你的服务器IP地址)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
㈢ 如何查看和开启oracle监听和服务
1、检查oracle监听服务运行状态,输入lsnrctl status命令来查看,看到提示信息TNS:no listener,表示监听没有启动,
㈣ linux怎样启动oracle监听
我用的是redhat
linux,用下面的步骤来启动oracle数据库。
首先使用oracle用户登录linux,然后在shell命令行中执行下面的命令:
第一步:打开oracle监听
$
lsnrctl
start
第二步:进入sqlplus
$
sqlplus
/nolog
sql>
第三步:使用sysdab角色登录sqlplus
sql>
conn
/as
sysdba
第四步:启动数据库
sql>
startup
经过上面的四个步骤,oracle数据库就可以启动了。
㈤ linux下oracle数据库启动监听报目标主机不存在,但是hosts文件里已经配置
1、cat $ORACLE_HOME/network/admin/listener.ora
修改HOST=0.0.0.0或主机IP
(ADDRESS = (PROTOCOL = TCP)(HOST = server10)(PORT = 1521))
2、netstat -ntlp
3、ifconfig -a
㈥ Linux如何设置Oracle实例和监听自启动
设置Oracle 实例和监听服务自启动 1. 增加启动脚本 touch /etc/init.d/orcl vi orcl # !/bin/bash # whoami # root # chkconfig: 345 51 49 # /etc/init.d/orcl # description: starts the oracle dabase deamons # ORA_HOME=/home/oracle/proct/10.2.0/db_1/ ORA_OWNER=oracle case "{GetProperty(Content)}" in start) echo -n "Starting orcl: " su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart" & su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start" touch /var/lock/subsys/orcl echo ;; stop) echo -n "shutting down orcl: " su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut" & su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop" rm -f /var/lock/subsys/orcl echo ;; restart) echo -n "restarting orcl: " {GetProperty(Content)} stop {GetProperty(Content)} start echo ;; *) echo "Usage: `basename {GetProperty(Content)}` start|stop|restart" exit 1 esac exit 0 保存orcl 并退出 2. 增加配置服务 /sbin/chkconfig --add orcl 3. 修改 /etc/oratab 文件 vi /etc/oratab ORACLE_SID:ORACLE_HOME:Y -- 是否自启动 4. 重启测试一下 或者简单的配置 /etc/rc.d/rc.local 增加两条启动命令 su - oracle -c /home/oracle/proct/10.2.0/db_1/bin/dbstart su - oracle -c /home/oracle/proct/10.2.0/db_1/bin/lsnrctl start
㈦ Linux下oracle启动监听报错,弄了一整天了
1:查看/etc/hosts文件,一定要配置好本机的代称localhost,要包含以下语句:
127.0.0.1 localhost.localdomain localhost
2:查看listener.ora与tnsnames.ora里面的HOST 配置的是否一致。
㈧ linux操作系统下oracle数据库如何配置监听
1. 修改监听器配置文件
Linux下Oracle监听器配置文件在:$ ORACLE_HOME/network/admin/listerer.ora, 如:
/bank/oracle/oracle10g/proct/10.2.0/network/admin/listener.ora
修改并配置要监听SID的相关信息,如:
#listener.ora Network Configuration File: /bank/oracle/oracle10g/proct/10.2.0/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /bank/oracle/oracle10g/proct/10.2.0)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL DBNAME = bkserver)
(SID_NAME = bkserver)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.7.13.242)(PORT = 1521))
)
)
2. 启动监听器
(1). 切换至oracle安装用户(一般为oracle)
su - oracle
(2). 启动监听器
lsnrctl start
另:停止监听器
lsnrctl stop
3. 测试监听器是否运行正常
在客户端修改tnsnames.ora配置文件就访问Oracle数据库,如:
BKSERVER =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.7.13.242)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = BKSERVER)
)
)
通过命令tnsping测试是否能访问到监听器,如:
M:\>tnsping bkserver
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Proction on 12-8月 -
2010 17:11:04
Copyright (c) 1997, 2005, Oracle. All rights reserved.
已使用的参数文件:
D:\oracle\proct\10.2.0\client_1\network\admin\sqlnet.ora
已使用 TNSNAMES 适配器来解析别名
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = 10.7.13.242)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVIC
E_NAME = BKSERVER)))
OK (20 毫秒)
注意: 监听器是否能被tnsping通跟数据库的开启/关闭无关,所以就算可以tnsping通监听器但未必能连接到数据库,这时请检查listener.ora文件配置信息是否正确,还有数据库是否已经被开启。
㈨ 如何在linux suse中安装Oracle 11g创建监听
在linux suse中安装Oracle 11g创建监听的步骤:
在本地oracle用户模式下 oracle@linux-udly:~> netca
接下来按图一直点击NEXT
此处可以修改oracle监听器的端口号