oracle虚拟机连不上网,plsql developer 连不上虚拟机上的oracle

启动虚拟机上的oracle,启动监听,用plsql连接提示无法识别标示符。

--原因服务器listener.ora 中SID设置不对。

[oracle@localhost ~]$ find / -name "listener.ora";

/u01/app/product/10.2.0/db_1/network/admin/samples/listener.ora

(或者

[oracle@localhost /]$ cd  /u01/app/product/10.2.0/db_1

[oracle@localhost db_1]$ find . -name "listener.ora"

./network/admin/samples/listener.ora

)

将此文件改成类似:

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSExtProc)

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

(PROGRAM = extproc)

)

(SID_DESC =

(GLOBAL_DBNAME = ccdb)

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

(SID_NAME = ccdb)

)

)

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))

)

(DESCRIPTION =

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

)

)

重启监听程序,lsnrctl stop; lsnrctl start;即可登录

----原始listener.ora备份

# copyright (c) 1997 by the Oracle Corporation

#

# NAME

#   listener.ora

# FUNCTION

#   Network Listener startup parameter file example

# NOTES

#   This file contains all the parameters for listener.ora,

#   and could be used to configure the listener by uncommenting

#   and changing values.  Multiple listeners can be configured

#   in one listener.ora, so listener.ora parameters take the form

#   of SID_LIST_, where is the name of the listener

#   this parameter refers to.  All parameters and values are

#   case-insensitive.

# #   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 .  When not specified,

#   the name for 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_#   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_#   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_is ON.

#       See below.

#

# Default: NONE

#

# PASSWORDS_LISTENER = 20A22647832FB454      # "foobar"

# SAVE_CONFIG_ON_STOP_#   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_#   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_#   Sets the name of the listener's log file.  The .log extension

#   is added automatically.

# Default=#

# LOG_FILE_LISTENER = lsnr

# LOG_DIRECTORY_#   Sets the directory for the listener's log file.

# Default: /network/log

#

# LOG_DIRECTORY_LISTENER = /private/app/oracle/product/8.0.3/network/log

# TRACE_LEVEL_#   Specifies desired tracing level.

# Default: OFF

# Values: OFF/USER/ADMIN/SUPPORT/0-16

#

# TRACE_LEVEL_LISTENER = SUPPORT

# TRACE_FILE_#   Sets the name of the listener's trace file. The .trc extension

#   is added automatically.

# Default: #

# TRACE_FILE_LISTENER = lsnr

# TRACE_DIRECTORY_#   Sets the directory for the listener's trace file.

# Default: /network/trace

#

# TRACE_DIRECTORY_LISTENER=/private/app/oracle/product/8.0.3/network/trace

# CONNECT_TIMEOUT_#   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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值