Oracle侦听更改端口以进行远程连接

时间:2010-05-05 09:07:56

标签: oracle port listener oracle11g

我安装了Oracle 11gR2,现在我正尝试从远程系统访问数据库。

我的listener.ora仍然是默认值:

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = /media/oracle/app/oracle

./ lsnrctl services 会返回此信息:

oracle@ubuntu:/media/oracle/app/oracle/product/11.2.0/dbhome_1/bin$ ./lsnrctl services

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 05-MAY-2010 05:00:49

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
Services Summary...
Service "gis.c2c" has 1 instance(s).
  Instance "gis", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
Service "gisXDB.c2c" has 1 instance(s).
  Instance "gis", status READY, has 1 handler(s) for this service...
    Handler(s):
      "D000" established:0 refused:0 current:0 max:972 state:ready
         DISPATCHER <machine: ubuntu, pid: 2916>
         (ADDRESS=(PROTOCOL=tcp)(HOST=ubuntu.localdomain)(PORT=47616))
The command completed successfully

我无法使用端口1521进行远程连接,但上面列出的端口47616可以正常工作。我不介意使用与1521不同的端口,但问题是每次重启时此端口都会发生变化。

出了什么问题?

谢谢!

1 个答案:

答案 0 :(得分:2)

这不是编程问题,也许它属于serverfault。

但是,我想到以下几点:

是否在/ etc / hosts中定义了localhost?并且,如果要从网络访问侦听器,则不应该在localhost上侦听,而应在外部地址上侦听。

端口1521可用吗?通过运行netstat -tlnp进行验证。

相关问题