Oracle 10 下开启监听实现数据库安全连接(oracle10开启监听)

Oracle 10 下开启监听:实现数据库安全连接

在使用Oracle数据库进行开发工作过程中,一般需要使用连接工具进行连接。而在连接的过程中,为了保证数据库的安全性,一般需要开启Oracle监听器。因此,在本篇文章中,将介绍在Oracle 10下如何开启监听器。

1. 连接到数据库

需要用管理员权限账户登录到Oracle数据库。如下所示:

$ sqlplus /nolog

SQL> connect / as sysdba

2. 启动监听器程序

在完成登录后,需要启动监听器程序。启动命令如下:

SQL> lsnrctl start

当出现如下所示信息,说明监听器程序已经成功启动。

LSNRCTL for Linux: Version 10.2.0.1.0 – Production on 22-JUN-2021 16:28:52

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

Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wt…

TNSLSNR for Linux: Version 10.2.0.1.0 – Production

System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora

Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.2)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.2)(PORT=1521)))

STATUS of the LISTENER

————————

Alias listener

Version TNSLSNR for Linux: Version 10.2.0.1.0 – Production

Start Date 22-JUN-2021 16:28:52

Uptime 0 days 0 hr. 0 min. 0 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora

Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log

Listening Endpoints Summary…

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.2)(PORT=1521)))

The listener supports no services

The command completed successfully

3. 确认监听器状态

完成启动监听器程序后,需要确认监听器状态是否正常,输入以下命令:

SQL> lsnrctl status

当看到如下所示信息时,说明监听器状态正常。

LSNRCTL for Linux: Version 10.2.0.1.0 – Production on 22-JUN-2021 16:29:41

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.2)(PORT=1521)))

STATUS of the LISTENER

————————

Alias listener

Version TNSLSNR for Linux: Version 10.2.0.1.0 – Production

Start Date 22-JUN-2021 16:28:52

Uptime 0 days 0 hr. 0 min. 49 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora

Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log

Listening Endpoints Summary…

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.2)(PORT=1521)))

The listener supports no services

The command completed successfully

4. 配置监听器

需要配置监听器以使其能够接受外部连接。打开监听器配置文件listener.ora,在文件末尾加入以下语句:

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSExtProc)

(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)

(PROGRAM = extproc)

)

)

监听器配置的详细内容请参考Oracle监听器手册。

至此,在Oracle 10下开启监听器的操作就介绍完毕了。通过开启监听器,可以保证数据库的安全连接,防止不必要的攻击和破坏。


数据运维技术 » Oracle 10 下开启监听实现数据库安全连接(oracle10开启监听)