Chinaunix首页 | 论坛 | 博客
  • 博客访问: 38526
  • 博文数量: 10
  • 博客积分: 440
  • 博客等级: 下士
  • 技术积分: 130
  • 用 户 组: 普通用户
  • 注册时间: 2007-07-11 10:22
文章分类
文章存档

2011年(4)

2008年(6)

我的朋友
最近访客

分类: Oracle

2008-07-31 15:41:49

Oracle数据库的手工启动

AllenYao 2008-7-31

刚刚安装好Oracle9iLinux机器重启后,发现数据库无法连接了。原因是数据库并没有随系统自动启动,需要手工执行命令启动。

使用oracle用户登录到Linux系统中,然后执行“sqlplus”程序。

[oracle@CentOS4 ~]$ sqlplus

 

SQL*Plus: Release 9.2.0.4.0 - Production on Thu Jul 31 10:20:36 2008

 

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

 

Enter user-name: sys/ypoonsww as sysdba

Connected to an idle instance.

 

SQL> startup

ORACLE instance started.

 

Total System Global Area  236000356 bytes

Fixed Size                   451684 bytes

Variable Size             201326592 bytes

Database Buffers           33554432 bytes

Redo Buffers                 667648 bytes

Database mounted.

Database opened.

SQL>

SQL> quit

Disconnected from Oracle9i Release 9.2.0.4.0 - Production

JServer Release 9.2.0.4.0 - Production

 

此时,如何远程登录数据库还是不能成功,例如在Windows中执行“SQL Plus”会出现这样的错误提示:

SQL*Plus: Release 9.2.0.1.0 - Production on 星期四 7 31 10:55:40 2008

 

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

 

ERROR:

ORA-12541: TNS: 没有监听器

 

原因是Oracle数据库的监听程序还没有启动。启动的方法很简单,就是执行“lsnrctl start”命令。

[oracle@CentOS4 ~]$ lsnrctl start

 

LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 31-JUL-2008 10:21:53

 

Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.

 

Starting /oracle/92/bin/tnslsnr: please wait...

 

TNSLSNR for Linux: Version 9.2.0.4.0 - Production

System parameter file is /oracle/92/network/admin/listener.ora

Log messages written to /oracle/92/network/log/listener.log

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

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=CentOS4)(PORT=1521)))

 

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

STATUS of the LISTENER

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

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 9.2.0.4.0 - Production

Start Date                31-JUL-2008 10:21:53

Uptime                    0 days 0 hr. 0 min. 0 sec

Trace Level               off

Security                  OFF

SNMP                      OFF

Listener Parameter File   /oracle/92/network/admin/listener.ora

Listener Log File         /oracle/92/network/log/listener.log

Listening Endpoints Summary...

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

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=CentOS4)(PORT=1521)))

Services Summary...

Service "PLSExtProc" has 1 instance(s).

  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

Service "dev" has 1 instance(s).

  Instance "lx92", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

[oracle@CentOS4 ~]$

现在,数据库应该可以远程登录了。

阅读(1012) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~