远程无法连接 oracle,远程使用Oracle无法连接的问题解决方案

使用xlauch远程操作Oracle,经常进入界面的时候,提示sqlplus这个命令不识别,这说明,我们配置的环境变量没有生效。

[oracle@localhost ~]$ vi .bash_profile

Oracle用户中的.bash_profile中存放着这些环境变量,所以我们需要重新执行以下。

[oracle@localhost ~]$source .bash_profile我们重新执行以下,

[oracle@localhost ~]$sqlplus 此时该命令被识别

SQL*Plus: Release 11.1.0.6.0 -Production on Thu Sep 3 15:26:50 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

[oracle@localhost ~]$ sqlplussystem/hope@orcl

SQL*Plus: Release 11.1.0.6.0 -Production on Thu Sep 3 15:27:07 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

ERROR:

ORA-12541: TNS:nolistener

此时,还是不让登陆,我们可以采用以下方法来完成

[oracle@localhost ~]$sqlplus /nolog

SQL*Plus: Release 11.1.0.6.0 -Production on Thu Sep 3 15:28:09 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

SQL> connect /assysdba

Connected to an idleinstance.

SQL> startup 启动Oracle的实例

ORACLEinstance started.

Total System Global Area 849530880 bytes

Fixed Size 1303216 bytes

Variable Size 603983184 bytes

Database Buffers 239075328 bytes

Redo Buffers 5169152 bytes

Database mounted.

Database opened.

SQL> exit

Disconnected from Oracle Database 11gEnterprise Edition Release 11.1.0.6.0 - Production

With the Partitioning, OLAP, DataMining and Real Application Testing options

[oracle@localhost ~]$lsnrctl Oracle监听进程

LSNRCTL for Linux: Version 11.1.0.6.0- Production on 03-SEP-2009 15:44:02

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

Welcome to LSNRCTL, type "help" forinformation.

LSNRCTL> start 启动Oracle的监听进程

Starting/home/oracle/app/oracle/product/11.1.0/db/bin/tnslsnr: pleasewait...

TNSLSNR for Linux: Version 11.1.0.6.0- Production

System parameter file is/home/oracle/app/oracle/product/11.1.0/db/network/admin/listener.ora

Log messages written to/home/oracle/app/oracle/product/11.1.0/db/log/diag/tnslsnr/localhost/listener/alert/log.xml

Listening on:(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Listening on:(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))

Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version11.1.0.6.0 - Production

Start Date 03-SEP-2009 15:44:07

Uptime 0 days 0 hr. 0 min. 0sec

Trace Level off

Security ON: Local OSAuthentication

SNMP OFF

Listener Parameter File /home/oracle/app/oracle/product/11.1.0/db/network/admin/listener.ora

Listener Log File /home/oracle/app/oracle/product/11.1.0/db/log/diag/tnslsnr/localhost/listener/alert/log.xml

Listening EndpointsSummary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))

The listener supports noservices

The command completedsuccessfully

LSNRCTL>

做到这里就可以了,现在,可以操作Oracle,并且可以从客户端操作Oracle了!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值