$ export ORACLE_SID=shestate $ rman target / nocatalog Recovery Manager: Release 9.2.0.5.0 - 64bit Production Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved. connected to target database (not started) RMAN> set dbid=3563853082 executing command: SET DBID RMAN> startup nomount; Oracle instance started Total System Global Area 1411877936 bytes Fixed Size 744496 bytes Variable Size 1358954496 bytes Database Buffers 50331648 bytes Redo Buffers 1847296 bytes RMAN> RUN { allocate channel t1 type 'SBT_TAPE'; RESTORE CONTROLFILE TO '/u01/oradata/controlfile/ctl.ctl' FROM 'qdnqg2ni_1_1'; release channel t1; } 2> 3> 4> 5> 6> allocated channel: t1 channel t1: sid=11 devtype=SBT_TAPE channel t1: Data Protection for Oracle: version 5.4.1.0 Starting restore at 25-NOV-12 channel t1: restoring controlfile channel t1: restore complete Finished restore at 25-NOV-12 released channel: t1 RMAN> exit |
说明:从磁带库restore控制文件/数据文件,from ' '不需要带绝对路径,如果从中磁盘restore,需要带绝对路径,如:restore controlfile to '/tmp/ctl.ctl' from '/u01/bak/xxx.bak';