这里是文章模块栏目内容页
Oracle 10g环境下的数据库监听搭建实践

在Oracle 10g环境下搭建数据库监听,可以按照以下步骤进行:

Oracle 10g环境下的数据库监听搭建实践
(图片来源网络,侵删)

1、配置监听器参数文件

需要创建一个监听器参数文件,在Oracle安装目录下的networkadmin文件夹中,创建一个新的文本文件,例如listener.ora,并编辑该文件,添加以下内容:

“`

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

)

)

“`

HOSTPORT分别表示监听器的主机名和端口号,如果使用IPC通信,还需要设置KEY参数。

2、启动监听器服务

在命令行中,切换到Oracle安装目录下的bin文件夹,然后执行以下命令启动监听器服务:

“`

lsnrctl start

“`

如果一切正常,将看到类似以下的输出信息:

“`

Service "orcl" has 1 instance(s).

Instance "orcl", status READY, has 1 handler(s) for this service…

The command completed successfully

“`

3、测试监听器服务

可以使用tnsping命令测试监听器服务是否正常工作,在命令行中执行以下命令:

“`

tnsping orcl

“`

如果一切正常,将看到类似以下的输出信息:

“`

TNS Ping Utility for 64bit Windows: Version 10.2.0.1.0 Production on 08SEP2022 14:37:49

Using builtin version of tnsping utility.

Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected 24, received 0. Truncated binary data: Incorrect information length: expected

更多栏目