分类: Oracle
2009-01-10 10:54:11
[oracle@oem2 o102db1data]$ sqlplus SQL*Plus: Release 10.2.0.1.0 - Production on Fri Dec 19 03:21:40 2008 Copyright (c) 1982, 2005, Oracle. All rights reserved. Enter user-name: / as sysdba Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options SQL> alter database datafile '/u01/app/oracle/oradata/o102db1/testbk01.dbf' offline; Database altered. SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options |
[oracle@oem2 o102db1data]$ rman target / catalog rman/rman@rman Recovery Manager: Release 10.2.0.1.0 - Production on Fri Dec 19 03:22:16 2008 Copyright (c) 1982, 2005, Oracle. All rights reserved. connected to target database: O102DB1 (DBID=2838976858) connected to recovery catalog database RMAN> restore datafile 'alter database datafile '/u0 '/u01/app/oracle/oradata/o102db1/testbk01.dbf'; Starting restore at 19-DEC-08 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=159 devtype=DISK channel ORA_DISK_1: starting datafile backupset restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set restoring datafile 00007 to /u01/app/oracle/oradata/o102db1/testbk01.dbf channel ORA_DISK_1: reading from backup piece /u01/app/oracle/backup/dbO102DB1_9_1_673844707 channel ORA_DISK_1: restored backup piece 1 piece handle=/u01/app/oracle/backup/dbO102DB1_9_1_673844707 tag=TAG20081219T030506 channel ORA_DISK_1: restore complete, elapsed time: 00:00:15 Finished restore at 19-DEC-08 RMAN> recover datafile '/u01/app/oracle/oradata/o102db1 testbk01.dbf'; Starting recover at 19-DEC-08 using channel ORA_DISK_1 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 12/19/2008 03:26:08 RMAN-06094: datafile 7 must be restored RMAN> restore datafile 7; Starting restore at 19-DEC-08 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile backupset restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set restoring datafile 00007 to /u01/app/oracle/oradata/o102db1/testbk01.dbf channel ORA_DISK_1: reading from backup piece /u01/app/oracle/backup/dbO102DB1_9_1_673844707 channel ORA_DISK_1: restored backup piece 1 piece handle=/u01/app/oracle/backup/dbO102DB1_9_1_673844707 tag=TAG20081219T030506 channel ORA_DISK_1: restore complete, elapsed time: 00:00:16 Finished restore at 19-DEC-08 RMAN> recover datafile '/u01/app/oracle/oradata/o102db1/testbk01.dbf'; Starting recover at 19-DEC-08 using channel ORA_DISK_1 channel ORA_DISK_1: starting incremental datafile backupset restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set destination for restore of datafile 00007: /u01/app/oracle/oradata/o102db1/testbk01.dbf channel ORA_DISK_1: reading from backup piece /u01/app/oracle/backup/dbO102DB1_11_1_673845470 channel ORA_DISK_1: restored backup piece 1 piece handle=/u01/app/oracle/backup/dbO102DB1_11_1_673845470 tag=TAG20081219T031747 channel ORA_DISK_1: restore complete, elapsed time: 00:00:04 starting media recovery media recovery complete, elapsed time: 00:00:05 Finished recover at 19-DEC-08 RMAN> sql 'alter database datafile 7 online'; sql statement: alter database datafile 7 online RMAN> shutdown immediate database closed database dismounted Oracle instance shut down RMAN> exit Recovery Manager complete. |
[oracle@oem2 o102db1data]$ rman target / catalog rman/rman@rman Recovery Manager: Release 10.2.0.1.0 - Production on Fri Dec 19 03:29:00 2008 Copyright (c) 1982, 2005, Oracle. All rights reserved. connected to target database (not started) connected to recovery catalog database RMAN> startup nomount Oracle instance started Total System Global Area 285212672 bytes Fixed Size 1218992 bytes Variable Size 75499088 bytes Database Buffers 205520896 bytes Redo Buffers 2973696 bytes RMAN> restore controlfile; Starting restore at 19-DEC-08 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=156 devtype=DISK channel ORA_DISK_1: restoring control file channel ORA_DISK_1: copied control file copy input filename=/u03/control_backup output filename=/u01/app/oracle/oradata/o102db1/control01.ctl output filename=/u01/app/oracle/oradata/o102db1/control02.ctl output filename=/u01/app/oracle/oradata/o102db1/control03.ctl Finished restore at 19-DEC-08 RMAN> exit Recovery Manager complete. [oracle@oem2 o102db1data]$ sqlplus SQL*Plus: Release 10.2.0.1.0 - Production on Fri Dec 19 03:30:59 2008 Copyright (c) 1982, 2005, Oracle. All rights reserved. Enter user-name: / as sysdba Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options SQL> alter database mount; Database altered. SQL> alter database open; alter database open * ERROR at line 1: ORA-01589: must use RESETLOGS or NORESETLOGS option for database open SQL> recover database using backup controlfile; ORA-00279: change 636432 generated at 12/19/2008 01:16:50 needed for thread 1 ORA-00289: suggestion : /u01/app/oracle/oradata/o102db1/arch/1_17_654397857.dbf ORA-00280: change 636432 for thread 1 is in sequence #17 Specify log: { auto ORA-00308: cannot open archived log '/u01/app/oracle/oradata/o102db1/arch/1_17_654397857.dbf' ORA-27037: unable to obtain file status Linux Error: 2: No such file or directory Additional information: 3 ORA-00308: cannot open archived log '/u01/app/oracle/oradata/o102db1/arch/1_17_654397857.dbf' ORA-27037: unable to obtain file status Linux Error: 2: No such file or directory Additional information: 3 SQL> alter database open noresetlogs; alter database open noresetlogs * ERROR at line 1: ORA-01588: must use RESETLOGS option for database open SQL> shutdown immediate ORA-01109: database not open Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 285212672 bytes Fixed Size 1218992 bytes Variable Size 75499088 bytes Database Buffers 205520896 bytes Redo Buffers 2973696 bytes Database mounted. Database opened. SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options [oracle@oem2 o102db1data]$ |