[oracle@server ~]$ rman target/
Recovery Manager: Release 10.2.0.1.0 - Production on Sun Jan 16 09:39:05 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1268348214)
RMAN> sql 'alter tablespace users offline';
using target database control file instead of recovery catalog
sql statement: alter tablespace users offline
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 01/16/2011 09:39:18
RMAN-11003: failure during parse/execution of SQL statement: alter tablespace users offline
ORA-01116: error in opening database file 4
ORA-01110: data file 4: '/oracle/oradata/orcl/users01.dbf'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
RMAN> sql 'alter tablespace users offline immediate';
sql statement: alter tablespace users offline immediate
RMAN> restore tablespace users;
Starting restore at 16-JAN-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=154 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00004 to /oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /oracle/orabak/databak/20110116_02m28b6s.dbf
channel ORA_DISK_1: restored backup piece 1
piece handle=/oracle/orabak/databak/20110116_02m28b6s.dbf tag=TAG20110116T092444
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 16-JAN-11
RMAN> recover tablespace users;
Starting recover at 16-JAN-11
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:02
Finished recover at 16-JAN-11
RMAN> sql 'alter tablespace users online';
sql statement: alter tablespace users online
RMAN>
阅读(1678) | 评论(0) | 转发(0) |