zoukankan      html  css  js  c++  java
  • oracle--错误笔记(一)

    一,环境模拟 

    SQL> select status from v$instance;
    
    STATUS
    ------------
    OPEN
    
    SQL>  select * from v$backup;
    
         FILE# STATUS         CHANGE# TIME
    ---------- ------------------ ---------- ---------
         1 NOT ACTIVE               0
         2 NOT ACTIVE               0
         3 NOT ACTIVE               0
         4 NOT ACTIVE         4531907 01-APR-19
         5 NOT ACTIVE               0
    
    SQL> select sysdate from dual;
    
    SYSDATE
    ---------
    22-APR-19
    
    SQL> ALTER TABLESPACE TEST1 BEGIN BACKUP;
    Tablespace altered.

    二,问题查看

    SQL> shutdown immediate;
    ORA-01149: cannot shutdown - file 4 has online backup set
    ORA-01110: data file 4: '/u01/app/oracle/oradata/oracle01/users01.dbf'
    SQL> shutdown abort;
    ORACLE instance shut down.
    SQL> startup
    ORACLE instance started.
    
    Total System Global Area 2505338880 bytes
    Fixed Size            2255832 bytes
    Variable Size          805307432 bytes
    Database Buffers     1677721600 bytes
    Redo Buffers           20054016 bytes
    Database mounted.
    ORA-10873: file 4 needs to be either taken out of backup mode or media
    recovered
    ORA-01110: data file 4: '/u01/app/oracle/oradata/oracle01/users01.dbf'
    
    
    SQL>  select * from v$backup;
    
         FILE# STATUS         CHANGE# TIME
    ---------- ------------------ ---------- ---------
         1 NOT ACTIVE               0
         2 NOT ACTIVE               0
         3 NOT ACTIVE               0
         4 ACTIVE         4531907 01-APR-19
         5 NOT ACTIVE               0
    
    SQL>  select * from v$backup where STATUS='ACTIVE';
    
         FILE# STATUS         CHANGE# TIME
    ---------- ------------------ ---------- ---------
         4 ACTIVE         4531907 01-APR-19
    数据库启动不起来,表示一直再联机备份

    三,问题处理

    01方法:
    SQL> ALTER TABLESPACE users01 end backup;
    02方法:
    SQL> startup mount
    ORACLE instance started.
    
    Total System Global Area 2505338880 bytes
    Fixed Size            2255832 bytes
    Variable Size          805307432 bytes
    Database Buffers     1677721600 bytes
    Redo Buffers           20054016 bytes
    Database mounted.
    SQL> alter database end backup;
    
    Database altered.
    
    SQL> alter database open;
    
    Database altered.
    
    SQL> select status from v$instance;
    
    STATUS
    ------------
    OPEN
  • 相关阅读:
    撒谎
    可怜的猪
    GIS学习笔记(五)
    国产木马冰河2.2
    矛盾
    GIS学习笔记(六)
    男人如衣服
    VS2005快捷键大全
    慧悟
    DOS命令
  • 原文地址:https://www.cnblogs.com/kingle-study/p/10748483.html
Copyright © 2011-2022 走看看