Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1109342
  • 博文数量: 227
  • 博客积分: 6860
  • 博客等级: 准将
  • 技术积分: 2688
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-02 16:06
文章分类

全部博文(227)

文章存档

2015年(7)

2014年(8)

2012年(5)

2011年(62)

2010年(145)

分类: Oracle

2011-01-16 17:13:13

[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>
阅读(1673) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~