首页 > 编程知识 正文

oracle配置多个监听,oracle查看监听端口命令

时间:2023-05-06 08:50:16 阅读:16276 作者:3206

修改oracle拦截怕黑的美女

修正怕黑美人号的总体步骤:

1.1显示当前监听的状态

1.2停止监听

1.3修改拦截文件的抗黑美女号

1.4更改初始化参数local_listener

1.5重新启动监听程序

1.6修改完成后,使用新的怕黑美女登录测试

1.1显示当前监听的状态

[test@ASI-1 ~]$lsnrctl status

1.2停止监听

[test@ASI-1~]$lsnrctl stop

版权所有(c ) 1991,2005,Oracle.all权限保留。

连接到(描述=(地址=)协议=TCP )主机=192.168.0.100 ) )端口=1521 )

thecommandcompletedsuccessfully

1.3修改拦截文件的抗黑美女号

将怕黑的美女号修改为1530,分别修改listener.ora和tnsname.ora上的文件

[ test @ ASI-1~~ ] $ CD/usr/opt/Oracle/product/10.2.0/db _1/network/admin /

[test@ASI-1 admin]$ pwd

/usr/opt/Oracle/product/10.2.0/db _1/network/admin

[test@ASI-1~]$vi listener.ora

# listener.oranetworkconfigurationfile :/usr/opt/Oracle/product/10.2.0/db _1/network/admin/listentent

#总帐会计管理系统。

SID_LIST_LISTENER=

(SID_LIST=

(SID_DESC=

(SID_NAME=PLSExtProc )

(Oracle _ home=/usr/opt/Oracle/product/10.2.0/db _1)

(PROGRAM=extproc )

(SID_DESC=

(GLOBAL_DBNAME=orcl )

(Oracle _ home=/usr/opt/Oracle/product/10.2.0/db _1)

(SID_NAME=orcl )

监听器=

(描述=

(地址=(协议=TCP );主机=192.168.0.100 );端口=1530 ) )

[test@ASI-1~]$vi tnsnames.ora

#总帐会计管理系统。

(描述=

(地址_列表=

(地址=(协议=TCP );主机=192.168.0.100 );端口=1530 ) )

(CONNECT_DATA=

(服务_ name=orcl )

EXTPROC_CONNECTION_DATA=

(描述=

(地址_列表=

(地址=(协议=IPC )密钥=ext proc0) )

(CONNECT_DATA=

(SID=PLSExtProc )

(PRESENTATION=RO )

1.4更改初始化参数local_listener

[ test @ ASI-1~~ ] $ sqlplus/assysdba

SQL*plus:版本10.2.0.1.0-productionon周六7月19日1:243360022008

版权所有(c ) 1982,2005,Oracle.all权限保留。

连接到:

Oracle数据库10通用版本10.2.0.1.0-p

roduction

With the Partitioning, OLAP and Data Mining options

SQL> showparameter local_listener

NAME TYPE ssddy/p>

------------------------------------ ----------- ------------------------------

local_listener string (address=(protocol=tcp)(host=s

kate)(port=1522))

SQL> alter system setlocal_listener="(address=(protocol=tcp)(host=192.168.0.100)(port=1530))";

系统已更ysdfbx

1.5重启监听器

[test@ASI-1~]$lsnrctl start

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Starting /usr/opt/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...

System parameter file is /usr/opt/oracle/product/10.2.0/db_1/network/admin/liste

ner.ora

Log messages written to /usr/opt/oracle/product/10.2.0/db_1/network/log/listener

.log

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.100)(PORT=1530

)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.100)(PORT=1530

)))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production

Start Date 11-MAR-2011 17:56:42

Uptime 0 days 0 hr. 0 min. 0 sec

Trace Level off

Listener Parameter File /usr/opt/oracle/product/10.2.0/db_1/network/admin/list

ener.ora

Listener Log File /usr/opt/oracle/product/10.2.0/db_1/network/log/listen

er.log

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.100)(PORT=1530)))

Services Summary...

Service "PLSExtProc" has 1 instance(s).

Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

Service "orcl" has 1 instance(s).

Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

1.6使用新怕黑的美女登录测试

1.6.1 检查监听怕黑的美女是否改变

[test@ASI-1~]$netstat -na | grep "1530"

tcp 0 0 192.168.0.100:1530 0.0.0.0:* LISTEN

1.6.2 查看监听器的状态

[test@ASI-1~]$lsnrctl status

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.100)(PORT=1530)))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production

Start Date 11-MAR-2011 17:56:42

Uptime 0 days 0 hr. 24 min. 21 sec

Trace Level off

Listener Parameter File /usr/opt/oracle/product/10.2.0/db_1/network/admin/listener.ora

Listener Log File /usr/opt/oracle/product/10.2.0/db_1/network/log/listener.log

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.100)(PORT=1530)))

Services Summary...

Service "PLSExtProc" has 1 instance(s).

Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

Service "orcl" has 1 instance(s).

Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

1.6.3 [test@ASI-1 ~]$tnsping orcl

Copyright (c) 1997, 2005, Oracle. All rights reserved.

Used parameter files:

/usr/opt/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias

Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.100)(PORT = 1530))) (CONNECT_DATA = (SERVICE_NAME = orcl)))

OK (0 msec)

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。