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

 

posted on 2019-04-22 09:47  kingle-l  阅读(202)  评论(0编辑  收藏  举报

levels of contents