alter database datafile '' offline drop以后的恢复

来源:互联网 发布:ubuntu 安装luajit 编辑:程序博客网 时间:2024/05/13 01:19
此时查看数据文件的状态11:03:02 sys@orcl> select name,status from v$datafile;11:03:21 sys@orcl> col name for a5011:03:24 sys@orcl> /NAME                                               STATUS-------------------------------------------------- -------/u02/oradata/orcl/system01.dbf                     SYSTEM/u02/oradata/orcl/sysaux01.dbf                     ONLINE/u02/oradata/orcl/undotbs01.dbf                    RECOVER/u02/oradata/orcl/users01.dbf                      ONLINEElapsed: 00:00:00.01我们直接进行恢复11:03:25 sys@orcl> recover datafile '/u02/oradata/orcl/undotbs01.dbf';ORA-00603: ORACLE server session terminated by fatal errorORA-00376: file 3 cannot be read at this timeORA-01110: data file 3: '/u02/oradata/orcl/undotbs01.dbf'ORA-00376: file 3 cannot be read at this timeORA-01110: data file 3: '/u02/oradata/orcl/undotbs01.dbf'ORA-00376: file 3 cannot be read at this timeORA-01110: data file 3: '/u02/oradata/orcl/undotbs01.dbf'Process ID: 48475Session ID: 69 Serial number: 22711:04:48 sys@orcl> quitDisconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options[11:04:51 oracle(db)@kiwi-test ~]$ sqlSQL*Plus: Release 11.2.0.4.0 Production on Sun Dec 21 11:04:52 2014Copyright (c) 1982, 2013, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options11:04:52 sys@orcl> 11:04:52 sys@orcl> col name for a50                   11:05:06 sys@orcl> select name,status from v$datafile;NAME                                               STATUS-------------------------------------------------- -------/u02/oradata/orcl/system01.dbf                     SYSTEM/u02/oradata/orcl/sysaux01.dbf                     ONLINE/u02/oradata/orcl/undotbs01.dbf                    OFFLINE/u02/oradata/orcl/users01.dbf                      ONLINEElapsed: 00:00:00.00可以看到此时数据文件是offline的11:05:30 sys@orcl> alter database datafile '/u02/oradata/orcl/undotbs01.dbf' online;Database altered.Elapsed: 00:00:00.0411:05:46 sys@orcl> select name,status from v$datafile;NAME                                               STATUS-------------------------------------------------- -------/u02/oradata/orcl/system01.dbf                     SYSTEM/u02/oradata/orcl/sysaux01.dbf                     ONLINE/u02/oradata/orcl/undotbs01.dbf                    ONLINE/u02/oradata/orcl/users01.dbf                      ONLINEElapsed: 00:00:00.00已经恢复了

0 0
原创粉丝点击