请教大家个问题,配置oracle监听程序 提示1521端口被占用,可是用netstat检查根本没有占用此端口,我换用其他的任意一端口也都提示被占用,重新安装了几次操作系统也不行,换了不同的操作系统安装程序(都是2003企业版的有R2也有没有R2的)也这样我是装ORACLE11G标准版  在虚机上安装没出问题大家帮忙看看什么原因

解决方案 »

  1.   

    监听文件listener.ora是如何配置的?
      

  2.   

    下面是打开listener.ora 用记事本打开的 
      

  3.   

    #   this parameter refers to.  All parameters and values are
    #   case-insensitive.# <lsnr>
    #   This parameter specifies both the name of the listener, and
    #   it listening address(es). Other parameters for this listener
    #   us this name in place of <lsnr>.  When not specified,
    #   the name for <lsnr> defaults to "LISTENER", with the default
    #   address value as shown below.
    #
    # LISTENER =
    #  (ADDRESS_LIST=
    # (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
    # (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY))) # SID_LIST_<lsnr>
    #   List of services the listener knows about and can connect 
    #   clients to.  There is no default.  See the Net8 Administrator's
    #   Guide for more information.
    #
    # SID_LIST_LISTENER=
    #   (SID_LIST=
    # (SID_DESC=
    # #BEQUEATH CONFIG
    #          (GLOBAL_DBNAME=salesdb.mycompany)
    #          (SID_NAME=sid1)
    #          (ORACLE_HOME=/private/app/oracle/product/8.0.3)
    # #PRESPAWN CONFIG
    #         (PRESPAWN_MAX=20)
    #   (PRESPAWN_LIST=
    #           (PRESPAWN_DESC=(PROTOCOL=tcp)(POOL_SIZE=2)(TIMEOUT=1))
    #         )
    #        )
    #       )

    # PASSWORDS_<lsnr>
    #   Specifies a password to authenticate stopping the listener.
    #   Both encrypted and plain-text values can be set.  Encrypted passwords
    #   can be set and stored using lsnrctl.  
    #     LSNRCTL> change_password
    #       Will prompt for old and new passwords, and use encryption both
    #       to match the old password and to set the new one.
    #     LSNRCTL> set password
    # Will prompt for the new password, for authentication with 
    #       the listener. The password must be set before running the next
    #       command.
    #     LSNRCTL> save_config
    #       Will save the changed password to listener.ora. These last two
    #       steps are not necessary if SAVE_CONFIG_ON_STOP_<lsnr> is ON.
    #       See below.
    #
    # Default: NONE
    #
    # PASSWORDS_LISTENER = 20A22647832FB454      # "foobar"# SAVE_CONFIG_ON_STOP_<lsnr>
    #   Tells the listener to save configuration changes to listener.ora when
    #   it shuts down.  Changed parameter values will be written to the file,
    #   while preserving formatting and comments.
    # Default: OFF
    # Values: ON/OFF
    #
    # SAVE_CONFIG_ON_STOP_LISTENER = ON# USE_PLUG_AND_PLAY_<lsnr>
    #   Tells the listener to contact an Onames server and register itself
    #   and its services with Onames.
    # Values: ON/OFF
    # Default: OFF
    #
    # USE_PLUG_AND_PLAY_LISTENER = ON# LOG_FILE_<lsnr>
    #   Sets the name of the listener's log file.  The .log extension
    #   is added automatically.
    # Default=<lsnr>
    #
    # LOG_FILE_LISTENER = lsnr# LOG_DIRECTORY_<lsnr>
    #   Sets the directory for the listener's log file.
    # Default: <oracle_home>/network/log
    #
    # LOG_DIRECTORY_LISTENER = /private/app/oracle/product/8.0.3/network/log# TRACE_LEVEL_<lsnr>
    #   Specifies desired tracing level.
    # Default: OFF
    # Values: OFF/USER/ADMIN/SUPPORT/0-16
    #
    # TRACE_LEVEL_LISTENER = SUPPORT# TRACE_FILE_<lsnr>
    #   Sets the name of the listener's trace file. The .trc extension
    #   is added automatically.
    # Default: <lsnr>
    #
    # TRACE_FILE_LISTENER = lsnr# TRACE_DIRECTORY_<lsnr>
    #   Sets the directory for the listener's trace file.
    # Default: <oracle_home>/network/trace
    #
    # TRACE_DIRECTORY_LISTENER=/private/app/oracle/product/8.0.3/network/trace
    # CONNECT_TIMEOUT_<lsnr>
    #   Sets the number of seconds that the listener waits to get a 
    #   valid database query after it has been started.
    # Default: 10
    #
    # CONNECT_TIMEOUT_LISTENER=10
      

  4.   

    你打开的listener.ora的文件是一个ORACLE的样本文件吧,不是你的真正的环境配置监听器文件。
    db_1\NETWORK\ADMIN下面的listener.ora
    而非是db_1\NETWORK\ADMIN\Sample下的
    把你的db_1\NETWORK\ADMIN下面的listener.ora一般这种问题都是listener.ora配置文件有问题
      

  5.   

    他说端口被占用难道ORACLE不能改端口的吗
    我没试过 发个疑问
      

  6.   

    lsnrctl status ;
    看看是否已经起来了。
    用net Configuration Assistant 重新配置个看看。
    最近我也被困扰呀,我是不能单独监听某一个实例,一言难尽呀。
      

  7.   

    这个问题很奇怪  在网络上找了很久也没找到有真正说的解决方案   目前的做法是把监听直接配置好 然后用lsnrctl stop 然后lsnrctl start就可以了  不过你点重新配置监听程序  发现依然说是被占用 只能再lsnrctl stop 然后lsnrctl start 关键的问题是操作系统都装了好几次  以及 好几个版本 也不行
      

  8.   

    这个是不是windows系统跟数据库有冲突? 我用的是windows 2003 企业 r2  装的是11g标准版   在网上下的飞管方是可以装的  但是到官方下载的11g还是出这样的问题