eygle.com   eygle.com
eygle.com  
 

« 生命的律动 | Blog首页 | 光纤存储、SUN遭遇莫名故障 »

DBA警世录:有多少错误可以再犯

作者:eygle |【转载时请务必以超链接形式标明文章和作者信息及本声明
链接:

前几天写过一篇短文,有些习惯DBA需要养成,其中提到几点建议以帮助DBA减少错误。

今天,一个同事又犯下一个低级的错误,导致了数据库故障。
所以确切的说,是SA的错误而不应该是DBA的责任,然而影响的毕竟还是数据库业务。

错误是这样犯下的,一台数据库服务器出了点故障,SA去检查重起信息,他试图键入如下一条命令:

last |grep reboot

然而不幸得是grep被他漏掉了,然后主机就被成功的reboot了。

晕倒,这样的错误也不容易出现的吧。

然后该我来启动数据库:

$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Mar 27 10:33:12 2007

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

Connected to an idle instance.

SQL> startup
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATADG/boss/spfileboss.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATADG/boss/spfileboss.ora
ORA-15077: could not locate ASM instance serving a required diskgroup
SQL> exit
Disconnected

报错,原来是ASM的数据库,先来启动ASM实例:

$ export ORACLE_SID=+ASM
$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Mar 27 10:35:51 2007

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

Connected to an idle instance.

SQL> startup
ASM instance started

Total System Global Area 130023424 bytes
Fixed Size 1976920 bytes
Variable Size 102880680 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining Scoring Engine options

再来启动数据库实例:

$ export ORACLE_SID=boss
$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Mar 27 10:36:18 2007

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 1115684864 bytes
Fixed Size 1984440 bytes
Variable Size 520099912 bytes
Database Buffers 587202560 bytes
Redo Buffers 6397952 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining Scoring Engine options

最后启动监听器:

$ lsnrctl start

LSNRCTL for Solaris: Version 10.2.0.1.0 - Production on 27-MAR-2007 10:37:03

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

Starting /opt/oracle/product/10.2.0/bin/tnslsnr: please wait...

TNSLSNR for Solaris: Version 10.2.0.1.0 - Production
System parameter file is /opt/oracle/product/10.2.0/network/admin/listener.ora
Log messages written to /opt/oracle/product/10.2.0/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db480.hurray.com.cn)(PORT=1521)))

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Solaris: Version 10.2.0.1.0 - Production
Start Date 27-MAR-2007 10:37:03
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/10.2.0/network/admin/listener.ora
Listener Log File /opt/oracle/product/10.2.0/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db480.hurray.com.cn)(PORT=1521)))
The listener supports no services
The command completed successfully

搞定。
记录一下,存此警世。

-The End-

By eygle on 2007-03-27 11:03 | Comments (7) | Posted to Beginner | Edit |Pageviews:

相关文章 随机文章
  • DBA警世录:威胁来自数据库之外
  • DBA警世录:root操作需谨慎
  • DBA警世录:使用ASM应当具备充分认识
  • DBA警世录:年关临近 谨防数据库事故
  • DBA警世录:职业生涯误操作之误删除篇
  • 这是一个作恶的时代
    年终难终 我们有多少时间能浪费
    对即将上线的Oracle10g ASM生产数据库进行备份恢复测试
    你们的关怀让我温暖
    瑞典游记-别章-丹麦哥本哈根游记 Part II
    网上相关主题:
    Google

    留言 (7)

    unix的命令都是很危险的^_^

    Posted by: NinGoo at March 27, 2007 11:23 AM

    是很危险,所以责任重大啊:)

    Posted by: eygle at March 27, 2007 11:49 AM

    我们这地,sa和dba是同一个人,所以所以这个对我们就非常有用了.

    Posted by: David.Guo at March 27, 2007 3:32 PM

    你老婆的blog怎么看不了呢??

    Posted by: sudan at March 28, 2007 6:13 PM

    嘿嘿,就是犯了错误,暂时关闭躲躲风头。

    Posted by: Julia at March 28, 2007 9:14 PM

    呵呵,有了这次的教训,以后键入命令在按下enter前,估计SA要sleep 2秒了.^|^

    Posted by: 托马斯张 at March 28, 2007 10:07 PM

    哈哈

    估计也是。

    还在是不是6月份的??

    Posted by: sudan at March 29, 2007 1:40 AM

    发表留言:



    Remember Me?
    (输入验证码后方可评论,谢谢支持)



    CopyRight © 2004 eygle.com, All rights reserved.