Chinaunix首页 | 论坛 | 博客
  • 博客访问: 548887
  • 博文数量: 154
  • 博客积分: 4055
  • 博客等级: 上校
  • 技术积分: 1381
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-01 14:26
文章分类

全部博文(154)

文章存档

2014年(2)

2013年(2)

2011年(2)

2010年(11)

2009年(9)

2008年(35)

2007年(22)

2006年(71)

我的朋友

分类: Oracle

2006-12-15 17:43:13

整个省的生产系统,原来做了几天测试,需要恢复到前几天某一个点

RMAN>  sql 'alter session set nls_date_format="yyy-mm-dd hh24:mi:ss"';

修改成功 ,开始还原

RMAN>  run{
 allocate channel c1 type disk;
 allocate channel c2 type disk;
 allocate channel c3 type disk;
 allocate channel c4 type disk;
 allocate channel c5 type disk;
 allocate channel c6 type disk;
 allocate channel c7 type disk;
 allocate channel c8 type disk;
 allocate channel c9 type disk;
 allocate channel c10 type disk;
 allocate channel c11 type disk;
 allocate channel c12 type disk;
 allocate channel c13 type disk;
 allocate channel c14 type disk;
  set until time  '2006-11-26 9:00:00';
 restore database;
 recover database;
 release channel c1;
 release channel c2;
 release channel c3;
 release channel c4;
 release channel c5;
 release channel c6;
 release channel c7;
 release channel c8;
 release channel c9;
 release channel c10;
 release channel c11;
 release channel c12;
 release channel c13;
 release channel c14;
 }             2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> 21> 22> 23> 24> 25> 26> 27> 28> 29> 30> 31> 32> 33>
 
allocated channel: c1
channel c1: sid=13 devtype=DISK
 
allocated channel: c2
channel c2: sid=9 devtype=DISK
 
allocated channel: c3
channel c3: sid=18 devtype=DISK
 
allocated channel: c4
channel c4: sid=10 devtype=DISK
 
allocated channel: c5
channel c5: sid=14 devtype=DISK
 
allocated channel: c6
channel c6: sid=15 devtype=DISK
 
allocated channel: c7
channel c7: sid=16 devtype=DISK
 
allocated channel: c8
channel c8: sid=17 devtype=DISK
 
allocated channel: c9
channel c9: sid=19 devtype=DISK
 
allocated channel: c10
channel c10: sid=20 devtype=DISK
 
allocated channel: c11
channel c11: sid=21 devtype=DISK
 
allocated channel: c12
channel c12: sid=22 devtype=DISK
 
allocated channel: c13
channel c13: sid=23 devtype=DISK
 
allocated channel: c14
channel c14: sid=24 devtype=DISK
 
executing command: SET until clause
 
Starting restore at 07-DEC-06
 
skipping datafile 3; already restored to file /oracle/oradata/MOSS/cwmlite01.dbf
skipping datafile 9; already restored to file /oracle/oradata/MOSS/users01.dbf
skipping datafile 4; already restored to file /oracle/oradata/MOSS/drsys01.dbf
skipping datafile 7; already restored to file /oracle/oradata/MOSS/odm01.dbf
skipping datafile 12; already restored to file /oracle/oradata/MOSS/rman_ts.dbf
skipping datafile 5; already restored to file /oracle/oradata/MOSS/example01.dbf
skipping datafile 6; already restored to file /oracle/oradata/MOSS/indx01.dbf
skipping datafile 10; already restored to file /oracle/oradata/MOSS/xdb01.dbf
skipping datafile 8; already restored to file /oracle/oradata/MOSS/tools01.dbf
channel c1: starting datafile backupset restore
channel c1: specifying datafile(s) to restore from backup set
restoring datafile 00014 to /oracle/oradata/MOSS/MOSS_INDEX.dbf
restoring datafile 00019 to /oracle/oradata/MOSS/MOSS_BC1.dbf
restoring datafile 00029 to /oracle/oradata/MOSS/MOSS_MONTH3.dbf
restoring datafile 00031 to /oracle/oradata/MOSS/MOSS_MONTH4.dbf
restoring datafile 00039 to /oracle/oradata/MOSS/MOSS_MONTH12.dbf
channel c2: starting datafile backupset restore
channel c2: specifying datafile(s) to restore from backup set
restoring datafile 00015 to /oracle/oradata/MOSS/MOSS_JL1.dbf
restoring datafile 00021 to /oracle/oradata/MOSS/MOSS_SY1.dbf
restoring datafile 00022 to /oracle/oradata/MOSS/MOSS_BS1.dbf
restoring datafile 00034 to /oracle/oradata/MOSS/MOSS_MONTH7.dbf
restoring datafile 00037 to /oracle/oradata/MOSS/MOSS_MONTH10.dbf
channel c3: starting datafile backupset restore
channel c3: specifying datafile(s) to restore from backup set
restoring datafile 00025 to /oracle/oradata/MOSS/moss01.dbf
restoring datafile 00032 to /oracle/oradata/MOSS/MOSS_MONTH5.dbf
restoring datafile 00036 to /oracle/oradata/MOSS/MOSS_MONTH9.dbf
restoring datafile 00038 to /oracle/oradata/MOSS/MOSS_MONTH11.dbf
channel c4: starting datafile backupset restore
channel c4: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /oracle/oradata/MOSS/system01.dbf
restoring datafile 00016 to /oracle/oradata/MOSS/MOSS_YB1.dbf
restoring datafile 00018 to /oracle/oradata/MOSS/MOSS_TH1.dbf
restoring datafile 00024 to /oracle/oradata/MOSS/MOSS_JF.dbf
restoring datafile 00027 to /oracle/oradata/MOSS/MOSS_MONTH1.dbf
restoring datafile 00028 to /oracle/oradata/MOSS/MOSS_MONTH2.dbf
channel c5: starting datafile backupset restore
channel c5: specifying datafile(s) to restore from backup set
restoring datafile 00013 to /oracle/oradata/MOSS/MOSS_CC1.dbf
restoring datafile 00020 to /oracle/oradata/MOSS/MOSS_LY1.dbf
restoring datafile 00035 to /oracle/oradata/MOSS/MOSS_MONTH8.dbf
channel c6: starting datafile backupset restore
channel c6: specifying datafile(s) to restore from backup set
restoring datafile 00002 to /oracle/oradata/MOSS/undotbs01.dbf
restoring datafile 00017 to /oracle/oradata/MOSS/MOSS_SP1.dbf
restoring datafile 00033 to /oracle/oradata/MOSS/MOSS_MONTH6.dbf
channel c7: starting datafile backupset restore
channel c7: specifying datafile(s) to restore from backup set
restoring datafile 00011 to /oracle/oradata/MOSS/MOSS.dbf
 
channel c4: restored backup piece 1
piece handle=/backup/dbmoss_t607300183_s246_p1 tag=TAG20061123T222943 params=NULL
channel c4: restore complete
channel c1: restored backup piece 1
piece handle=/backup/dbmoss_t607300183_s247_p1 tag=TAG20061123T222943 params=NULL
channel c1: restore complete
channel c3: restored backup piece 1
piece handle=/backup/dbmoss_t607300183_s248_p1 tag=TAG20061123T222943 params=NULL
channel c3: restore complete
channel c5: restored backup piece 1
piece handle=/backup/dbmoss_t607300184_s250_p1 tag=TAG20061123T222943 params=NULL
channel c5: restore complete
channel c6: restored backup piece 1
piece handle=/backup/dbmoss_t607300184_s249_p1 tag=TAG20061123T222943 params=NULL
channel c6: restore complete
channel c7: restored backup piece 1
piece handle=/backup/dbmoss_t607300184_s252_p1 tag=TAG20061123T222943 params=NULL
channel c7: restore complete
channel c2: restored backup piece 1
piece handle=/backup/dbmoss_t607300184_s251_p1 tag=TAG20061123T222943 params=NULL
channel c2: restore complete
Finished restore at 07-DEC-06
 
Starting recover at 07-DEC-06
 
starting media recovery
 
archive log thread 1 sequence 18589 is already on disk as file /oracle/products/9.2/dbs/arch1_18589.dbf
archive log thread 1 sequence 18590 is already on disk as file /oracle/products/9.2/dbs/arch1_18590.dbf
archive log thread 1 sequence 18591 is already on disk as file /oracle/products/9.2/dbs/arch1_18591.dbf
archive log thread 1 sequence 18592 is already on disk as file /oracle/products/9.2/dbs/arch1_18592.dbf
archive log thread 1 sequence 18593 is already on disk as file /oracle/products/9.2/dbs/arch1_18593.dbf
archive log thread 1 sequence 18594 is already on disk as file /oracle/products/9.2/dbs/arch1_18594.dbf
archive log thread 1 sequence 18595 is already on disk as file /oracle/products/9.2/dbs/arch1_18595.dbf
archive log thread 1 sequence 18596 is already on disk as file /oracle/products/9.2/dbs/arch1_18596.dbf
archive log thread 1 sequence 18597 is already on disk as file /oracle/products/9.2/dbs/arch1_18597.dbf
archive log thread 1 sequence 18598 is already on disk as file /oracle/products/9.2/dbs/arch1_18598.dbf
archive log thread 1 sequence 18599 is already on disk as file /oracle/products/9.2/dbs/arch1_18599.dbf
archive log thread 1 sequence 18600 is already on disk as file /oracle/products/9.2/dbs/arch1_18600.dbf
archive log thread 1 sequence 18601 is already on disk as file /oracle/products/9.2/dbs/arch1_18601.dbf
archive log thread 1 sequence 18602 is already on disk as file /oracle/products/9.2/dbs/arch1_18602.dbf
archive log thread 1 sequence 18603 is already on disk as file /oracle/products/9.2/dbs/arch1_18603.dbf
archive log thread 1 sequence 18604 is already on disk as file /oracle/products/9.2/dbs/arch1_18604.dbf
archive log thread 1 sequence 18605 is already on disk as file /oracle/products/9.2/dbs/arch1_18605.dbf
archive log thread 1 sequence 18606 is already on disk as file /oracle/products/9.2/dbs/arch1_18606.dbf
archive log thread 1 sequence 18607 is already on disk as file /oracle/products/9.2/dbs/arch1_18607.dbf
archive log thread 1 sequence 18608 is already on disk as file /oracle/products/9.2/dbs/arch1_18608.dbf
archive log thread 1 sequence 18609 is already on disk as file /oracle/products/9.2/dbs/arch1_18609.dbf
archive log thread 1 sequence 18610 is already on disk as file /oracle/products/9.2/dbs/arch1_18610.dbf
archive log thread 1 sequence 18611 is already on disk as file /oracle/products/9.2/dbs/arch1_18611.dbf
archive log thread 1 sequence 18612 is already on disk as file /oracle/products/9.2/dbs/arch1_18612.dbf
archive log thread 1 sequence 18613 is already on disk as file /oracle/products/9.2/dbs/arch1_18613.dbf
archive log thread 1 sequence 18614 is already on disk as file /oracle/products/9.2/dbs/arch1_18614.dbf
archive log thread 1 sequence 18615 is already on disk as file /oracle/products/9.2/dbs/arch1_18615.dbf
archive log thread 1 sequence 18616 is already on disk as file /oracle/products/9.2/dbs/arch1_18616.dbf
archive log thread 1 sequence 18617 is already on disk as file /oracle/products/9.2/dbs/arch1_18617.dbf
archive log thread 1 sequence 18618 is already on disk as file /oracle/products/9.2/dbs/arch1_18618.dbf
archive log thread 1 sequence 18619 is already on disk as file /oracle/products/9.2/dbs/arch1_18619.dbf
archive log thread 1 sequence 18620 is already on disk as file /oracle/products/9.2/dbs/arch1_18620.dbf
archive log thread 1 sequence 18621 is already on disk as file /oracle/products/9.2/dbs/arch1_18621.dbf
archive log thread 1 sequence 18622 is already on disk as file /oracle/products/9.2/dbs/arch1_18622.dbf
archive log thread 1 sequence 18623 is already on disk as file /oracle/products/9.2/dbs/arch1_18623.dbf
archive log thread 1 sequence 18624 is already on disk as file /oracle/products/9.2/dbs/arch1_18624.dbf
archive log thread 1 sequence 18625 is already on disk as file /oracle/products/9.2/dbs/arch1_18625.dbf
archive log thread 1 sequence 18626 is already on disk as file /oracle/products/9.2/dbs/arch1_18626.dbf
archive log thread 1 sequence 18627 is already on disk as file /oracle/products/9.2/dbs/arch1_18627.dbf
archive log thread 1 sequence 18628 is already on disk as file /oracle/products/9.2/dbs/arch1_18628.dbf
archive log thread 1 sequence 18629 is already on disk as file /oracle/products/9.2/dbs/arch1_18629.dbf
archive log thread 1 sequence 18630 is already on disk as file /oracle/products/9.2/dbs/arch1_18630.dbf
archive log thread 1 sequence 18631 is already on disk as file /oracle/products/9.2/dbs/arch1_18631.dbf
archive log thread 1 sequence 18632 is already on disk as file /oracle/products/9.2/dbs/arch1_18632.dbf
archive log thread 1 sequence 18633 is already on disk as file /oracle/products/9.2/dbs/arch1_18633.dbf
archive log thread 1 sequence 18634 is already on disk as file /oracle/products/9.2/dbs/arch1_18634.dbf
archive log thread 1 sequence 18635 is already on disk as file /oracle/products/9.2/dbs/arch1_18635.dbf
archive log thread 1 sequence 18636 is already on disk as file /oracle/products/9.2/dbs/arch1_18636.dbf
archive log thread 1 sequence 18637 is already on disk as file /oracle/products/9.2/dbs/arch1_18637.dbf
archive log thread 1 sequence 18638 is already on disk as file /oracle/products/9.2/dbs/arch1_18638.dbf
archive log thread 1 sequence 18639 is already on disk as file /oracle/products/9.2/dbs/arch1_18639.dbf
archive log filename=/oracle/products/9.2/dbs/arch1_18589.dbf thread=1 sequence=18589
archive log filename=/oracle/products/9.2/dbs/arch1_18590.dbf thread=1 sequence=18590
archive log filename=/oracle/products/9.2/dbs/arch1_18591.dbf thread=1 sequence=18591
archive log filename=/oracle/products/9.2/dbs/arch1_18592.dbf thread=1 sequence=18592
archive log filename=/oracle/products/9.2/dbs/arch1_18593.dbf thread=1 sequence=18593
archive log filename=/oracle/products/9.2/dbs/arch1_18594.dbf thread=1 sequence=18594
archive log filename=/oracle/products/9.2/dbs/arch1_18595.dbf thread=1 sequence=18595
archive log filename=/oracle/products/9.2/dbs/arch1_18596.dbf thread=1 sequence=18596
archive log filename=/oracle/products/9.2/dbs/arch1_18597.dbf thread=1 sequence=18597
archive log filename=/oracle/products/9.2/dbs/arch1_18598.dbf thread=1 sequence=18598
archive log filename=/oracle/products/9.2/dbs/arch1_18599.dbf thread=1 sequence=18599
archive log filename=/oracle/products/9.2/dbs/arch1_18600.dbf thread=1 sequence=18600
archive log filename=/oracle/products/9.2/dbs/arch1_18601.dbf thread=1 sequence=18601
archive log filename=/oracle/products/9.2/dbs/arch1_18602.dbf thread=1 sequence=18602
archive log filename=/oracle/products/9.2/dbs/arch1_18603.dbf thread=1 sequence=18603
archive log filename=/oracle/products/9.2/dbs/arch1_18604.dbf thread=1 sequence=18604
archive log filename=/oracle/products/9.2/dbs/arch1_18605.dbf thread=1 sequence=18605
archive log filename=/oracle/products/9.2/dbs/arch1_18606.dbf thread=1 sequence=18606
archive log filename=/oracle/products/9.2/dbs/arch1_18607.dbf thread=1 sequence=18607
archive log filename=/oracle/products/9.2/dbs/arch1_18608.dbf thread=1 sequence=18608
archive log filename=/oracle/products/9.2/dbs/arch1_18609.dbf thread=1 sequence=18609
archive log filename=/oracle/products/9.2/dbs/arch1_18610.dbf thread=1 sequence=18610
archive log filename=/oracle/products/9.2/dbs/arch1_18611.dbf thread=1 sequence=18611
archive log filename=/oracle/products/9.2/dbs/arch1_18612.dbf thread=1 sequence=18612
archive log filename=/oracle/products/9.2/dbs/arch1_18613.dbf thread=1 sequence=18613
archive log filename=/oracle/products/9.2/dbs/arch1_18614.dbf thread=1 sequence=18614
archive log filename=/oracle/products/9.2/dbs/arch1_18615.dbf thread=1 sequence=18615
archive log filename=/oracle/products/9.2/dbs/arch1_18616.dbf thread=1 sequence=18616
archive log filename=/oracle/products/9.2/dbs/arch1_18617.dbf thread=1 sequence=18617
archive log filename=/oracle/products/9.2/dbs/arch1_18618.dbf thread=1 sequence=18618
archive log filename=/oracle/products/9.2/dbs/arch1_18619.dbf thread=1 sequence=18619
archive log filename=/oracle/products/9.2/dbs/arch1_18620.dbf thread=1 sequence=18620
archive log filename=/oracle/products/9.2/dbs/arch1_18621.dbf thread=1 sequence=18621
archive log filename=/oracle/products/9.2/dbs/arch1_18622.dbf thread=1 sequence=18622
archive log filename=/oracle/products/9.2/dbs/arch1_18623.dbf thread=1 sequence=18623
archive log filename=/oracle/products/9.2/dbs/arch1_18624.dbf thread=1 sequence=18624
archive log filename=/oracle/products/9.2/dbs/arch1_18625.dbf thread=1 sequence=18625
archive log filename=/oracle/products/9.2/dbs/arch1_18626.dbf thread=1 sequence=18626
archive log filename=/oracle/products/9.2/dbs/arch1_18627.dbf thread=1 sequence=18627
archive log filename=/oracle/products/9.2/dbs/arch1_18628.dbf thread=1 sequence=18628
archive log filename=/oracle/products/9.2/dbs/arch1_18629.dbf thread=1 sequence=18629
archive log filename=/oracle/products/9.2/dbs/arch1_18630.dbf thread=1 sequence=18630
archive log filename=/oracle/products/9.2/dbs/arch1_18631.dbf thread=1 sequence=18631
archive log filename=/oracle/products/9.2/dbs/arch1_18632.dbf thread=1 sequence=18632
archive log filename=/oracle/products/9.2/dbs/arch1_18633.dbf thread=1 sequence=18633
archive log filename=/oracle/products/9.2/dbs/arch1_18634.dbf thread=1 sequence=18634
archive log filename=/oracle/products/9.2/dbs/arch1_18635.dbf thread=1 sequence=18635
archive log filename=/oracle/products/9.2/dbs/arch1_18636.dbf thread=1 sequence=18636
archive log filename=/oracle/products/9.2/dbs/arch1_18637.dbf thread=1 sequence=18637
archive log filename=/oracle/products/9.2/dbs/arch1_18638.dbf thread=1 sequence=18638
archive log filename=/oracle/products/9.2/dbs/arch1_18639.dbf thread=1 sequence=18639
media recovery complete
Finished recover at 07-DEC-06
 
released channel: c1
 
released channel: c2
 
released channel: c3
 
released channel: c4
 
released channel: c5
 
released channel: c6
 
released channel: c7
 
released channel: c8
 
released channel: c9
 
released channel: c10
 
released channel: c11
 
released channel: c12
 
released channel: c13
 
released channel: c14
 
RMAN>
RMAN> exit

SQL> col tb for a10
SQL> alter database open resetlogs;
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced

晕,数据库强制关闭,并且断开
 
TB         STATUS  VD
---------- ------- ------------------------------------------------------------
SYSTEM     SYSTEM  /oracle/oradata/MOSS/system01.dbf
UNDOTBS1   ONLINE  /oracle/oradata/MOSS/undotbs01.dbf
CWMLITE    ONLINE  /oracle/oradata/MOSS/cwmlite01.dbf
DRSYS      ONLINE  /oracle/oradata/MOSS/drsys01.dbf
EXAMPLE    ONLINE  /oracle/oradata/MOSS/example01.dbf
INDX       ONLINE  /oracle/oradata/MOSS/indx01.dbf
ODM        ONLINE  /oracle/oradata/MOSS/odm01.dbf
TOOLS      ONLINE  /oracle/oradata/MOSS/tools01.dbf
USERS      ONLINE  /oracle/oradata/MOSS/users01.dbf
XDB        ONLINE  /oracle/oradata/MOSS/xdb01.dbf
MOSS       ONLINE  /oracle/oradata/MOSS/MOSS.dbf
 
TB         STATUS  VD
---------- ------- ------------------------------------------------------------
MOSS       ONLINE  /oracle/oradata/MOSS/moss01.dbf
MOSS_CC    ONLINE  /oracle/oradata/MOSS/MOSS_CC1.dbf
MOSS_INDEX ONLINE  /oracle/oradata/MOSS/MOSS_INDEX.dbf
MOSS_JL    ONLINE  /oracle/oradata/MOSS/MOSS_JL1.dbf
MOSS_YB    ONLINE  /oracle/oradata/MOSS/MOSS_YB1.dbf
MOSS_SP    ONLINE  /oracle/oradata/MOSS/MOSS_SP1.dbf
MOSS_TH    ONLINE  /oracle/oradata/MOSS/MOSS_TH1.dbf
MOSS_BC    ONLINE  /oracle/oradata/MOSS/MOSS_BC1.dbf
MOSS_LY    ONLINE  /oracle/oradata/MOSS/MOSS_LY1.dbf
MOSS_SY    ONLINE  /oracle/oradata/MOSS/MOSS_SY1.dbf
MOSS_BS    ONLINE  /oracle/oradata/MOSS/MOSS_BS1.dbf
 
TB         STATUS  VD
---------- ------- ------------------------------------------------------------
PERFSTAT   ONLINE  /oracle/products/9.2/dbs/d:oracleoradataeygleperfstat.dbf
MOSS_MONTH ONLINE  /oracle/oradata/MOSS/MOSS_MONTH1.dbf
1
 
MOSS_MONTH ONLINE  /oracle/oradata/MOSS/MOSS_MONTH2.dbf
2
 .......................
 
SQL> recover database unsing backup controlfile until cancel;
ORA-00905: missing keyword
 
 
SQL> recover database using backup controlfile until cancel;
ORA-00283: recovery session canceled due to errors
ORA-01190: controlfile or data file 23 is from before the last RESETLOGS
ORA-01110: data file 23:
'/oracle/products/9.2/dbs/d:oracleoradataeygleperfstat.dbf'
 
 
SQL> exit

察看参数文件:
"initMOSS.ora" 34 lines, 1052 characters
*.aq_tm_processes=1
*.background_dump_dest='/oracle/admin/MOSS/bdump'
*.compatible='9.2.0.1.0'
*.control_files='/oracle/oradata/MOSS/control03.ctl','/oracle/oradata/MOSS/control02.ctl','/oracle/oradata/MOSS/control01.ctl
'
*.core_dump_dest='/oracle/admin/MOSS/cdump'
*.db_block_size=8192
*.db_cache_size=3221225472
*.db_domain=''
*.db_file_multiblock_read_count=32
*.db_name='MOSS'
*.dispatchers='(PROTOCOL=TCP)'
*.fast_start_mttr_target=300
*.hash_area_size=1048576
*.hash_join_enabled=TRUE
*.instance_name='MOSS'
*.java_pool_size=31457280
*.job_queue_processes=6
*.large_pool_size=209715200
*.log_buffer=5242880
*.open_cursors=300
*.pga_aggregate_target=734003200
*.processes=150
*.query_rewrite_enabled='TRUE'
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_max_size=5368709120
*.shared_pool_size=318767104
*.sort_area_size=1040187392
*.star_transformation_enabled='TRUE'
*.timed_statistics=TRUE
*.undo_management='AUTO'
*.undo_retention=10800
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/oracle/admin/MOSS/udump'
*._allow_resetlogs_corruption=true
"initMOSS.ora" 34 lines, 1052 characters

$ sqlplus
 
SQL*Plus: Release 9.2.0.1.0 - Production on Thu Dec 7 15:50:47 2006
 
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
 
Enter user-name: / as sysdba
 
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
 
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery
 
 
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '/oracle/oradata/MOSS/system01.dbf'
 
 
SQL> recover datafile 1;
ORA-00279: change 9004808824018 generated at 11/23/2006 22:29:43 needed for
thread 1
ORA-00289: suggestion : /oracle/products/9.2/dbs/arch1_18589.dbf
ORA-00280: change 9004808824018 for thread 1 is in sequence #18589
 
 
Specify log: {=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 9004835171614 generated at 11/24/2006 04:20:55 needed for
thread 1
ORA-00289: suggestion : /oracle/products/9.2/dbs/arch1_18590.dbf
ORA-00280: change 9004835171614 for thread 1 is in sequence #18590
ORA-00278: log file '/oracle/products/9.2/dbs/arch1_18589.dbf' no longer needed
for this recovery
 
 
ORA-00279: change 9004835282261 generated at 11/24/2006 14:32:29 needed for
thread 1
ORA-00289: suggestion : /oracle/products/9.2/dbs/arch1_18591.dbf
ORA-00280: change 9004835282261 for thread 1 is in sequence #18591
ORA-00278: log file '/oracle/products/9.2/dbs/arch1_18590.dbf' no longer needed
for this recovery
 ..................
最后还是没有办法,最后没有办法了,怎么如此马虎出现一个

'/oracle/products/9.2/dbs/d:oracleoradataeygleperfstat.dbf'这样的表空间呢,晕

重新创建控制文件呢,把此表空间丢掉(此表空间数据时生成statspack报告的)

CREATE CONTROLFILE REUSE DATABASE "MOSS" NORESETLOGS ARCHIVELOG
    MAXLOGFILES 32
    MAXLOGMEMBERS 2
    MAXDATAFILES 254
    MAXLOGHISTORY 27372
LOGFILE
GROUP 1
'/oracle/oradata/MOSS/redo01.log',
'/oracle/oradata/MOSS/redo011.log' SIZE 100M,
GROUP 2
'/oracle/oradata/MOSS/redo02.log',
'/oracle/oradata/MOSS/redo021.log' SIZE 100M,
GROUP 3
'/oracle/oradata/MOSS/redo031.log',
'/oracle/oradata/MOSS/redo03.log' SIZE 100M,
GROUP 4
'/oracle/oradata/MOSS/redo04.log',
'/oracle/oradata/MOSS/redo041.log' SIZE 100M,
GROUP 5
'/oracle/oradata/MOSS/redo05.log',
'/oracle/oradata/MOSS/redo051.log'  SIZE 100M,
GROUP 6
'/oracle/oradata/MOSS/redo06.log',
'/oracle/oradata/MOSS/redo061.log'  SIZE 100M,
GROUP 7
'/oracle/oradata/MOSS/log7a.rdo',
'/oracle/oradata/MOSS/log7b.rdo'  SIZE 100M,
GROUP 8
'/oracle/oradata/MOSS/log8a.rdo',
'/oracle/oradata/MOSS/log8b.rdo'  SIZE 100M
DATAFILE
'/oracle/oradata/MOSS/system01.dbf',
'/oracle/oradata/MOSS/undotbs01.dbf',
'/oracle/oradata/MOSS/cwmlite01.dbf',
'/oracle/oradata/MOSS/drsys01.dbf',
'/oracle/oradata/MOSS/example01.dbf',
'/oracle/oradata/MOSS/indx01.dbf',
'/oracle/oradata/MOSS/odm01.dbf',
'/oracle/oradata/MOSS/tools01.dbf',
'/oracle/oradata/MOSS/users01.dbf',
'/oracle/oradata/MOSS/xdb01.dbf',
'/oracle/oradata/MOSS/MOSS.dbf',
'/oracle/oradata/MOSS/rman_ts.dbf',
'/oracle/oradata/MOSS/MOSS_CC1.dbf',
'/oracle/oradata/MOSS/MOSS_INDEX.dbf',
'/oracle/oradata/MOSS/MOSS_JL1.dbf',
'/oracle/oradata/MOSS/MOSS_YB1.dbf',
'/oracle/oradata/MOSS/MOSS_SP1.dbf',
'/oracle/oradata/MOSS/MOSS_TH1.dbf',
'/oracle/oradata/MOSS/MOSS_BC1.dbf',
'/oracle/oradata/MOSS/MOSS_LY1.dbf',
'/oracle/oradata/MOSS/MOSS_SY1.dbf',
'/oracle/oradata/MOSS/MOSS_BS1.dbf',
'/oracle/oradata/MOSS/MOSS_JF.dbf',
'/oracle/oradata/MOSS/moss01.dbf',
'/oracle/oradata/MOSS/MOSS_MONTH1.dbf',
'/oracle/oradata/MOSS/MOSS_MONTH2.dbf',
'/oracle/oradata/MOSS/MOSS_MONTH3.dbf',
'/oracle/oradata/MOSS/MOSS_MONTH4.dbf',
'/oracle/oradata/MOSS/MOSS_MONTH5.dbf',
'/oracle/oradata/MOSS/MOSS_MONTH6.dbf',
'/oracle/oradata/MOSS/MOSS_MONTH7.dbf',
'/oracle/oradata/MOSS/MOSS_MONTH8.dbf',
'/oracle/oradata/MOSS/MOSS_MONTH9.dbf',
'/oracle/oradata/MOSS/MOSS_MONTH10.dbf',
'/oracle/oradata/MOSS/MOSS_MONTH11.dbf',
'/oracle/oradata/MOSS/MOSS_MONTH12.dbf'
CHARACTER SET ZHS16CGB231280
然后再介质恢复数据库,终于恢复过来了,谢天谢地
alter database open resetlogs;
ok数据库打开,但是此时监听都关掉了,怎么关呢,很是怕,数据除问题,
但是这样备份也不好,于是决定停一次数据库
启动资源组,双机,察看情况
# scsetup
 
  *** Main Menu ***
 
    Please select from one of the following options:
 
        1) Quorum
        2) Resource groups
        3) Data Services
        4) Cluster interconnect
        5) Device groups and volumes
        6) Private hostnames
        7) New nodes
        8) Other cluster properties
 
        ?) Help with menu options
        q) Quit
 
    Option:  2
 
  *** Resource Group Menu ***
 
    Please select from one of the following options:
 
        1) Create a resource group
        2) Add a network resource to a resource group
        3) Add a data service resource to a resource group
        4) Resource type registration
        5) Online/Offline or Switchover a resource group
        6) Enable/Disable a resource
        7) Change properties of a resource group
        8) Change properties of a resource
        9) Remove a resource from a resource group
       10) Remove a resource group
       11) Clear the stop_failed error flag from a resource
 
        ?) Help
        s) Show current status
        q) Return to the main menu
 
    Option:  5
 
  >>> Online/Offline or Switchover a Resource Group <<<
 
    Use this option to bring a resource group online or offline on one or
    more cluster nodes. For failover resource groups which are already
    online, use this option to switch the primary owner of a group. For
    scalable groups which are already online, use it to change the set of
    current primaries.
 
    This option is also used to control the managed and unmanaged state
    of a resource group.
 
    Once a resource group is brought online, all enabled resources in
    that group become available to clients.
 
    Once a resource group is taken offline from all cluster nodes, the
    resources in that group are no longer available to clients of those
    resources.
 
    Is it okay to continue (yes/no) [yes]?  yes
 
    Select the resource group you want to change:
 
           Group Name           Type       State(s)
           ==========           ====       ========
 
        1) ha-ora               failover   Online
 
        q) Done
 
    Option:  1
 
        1) Switch ownership of the group
        2) Bring the group offline from all cluster nodes
        3) Put the group into an unmanaged state
 
        q) Quit
 
    Option:  1
 
    Select the node to take ownership of "ha-ora":
 
        1) DB2
 
        q) Done
 
    Option:  1
 
    Switching primary ownership of a failover resource group typically
    results in a brief outage of service for all resources in the group.
 
    Are you sure you want to switch "ha-ora" (yes/no) [yes]?  yes
 
scswitch -z -g ha-ora -h DB2
 
    Command completed successfully.
 
   
Press Enter to continue: 
 
    Select the resource group you want to change:
 
           Group Name           Type       State(s)
           ==========           ====       ========
 
        1) ha-ora               failover   Online
 
        q) Done
 
    Option:  1
 
        1) Switch ownership of the group
        2) Bring the group offline from all cluster nodes
        3) Put the group into an unmanaged state
 
        q) Quit
 
    Option:  1
 
    Select the node to take ownership of "ha-ora":
 
        1) DB1
 
        q) Done
 
    Option:  1
 
    Switching primary ownership of a failover resource group typically
    results in a brief outage of service for all resources in the group.
 
    Are you sure you want to switch "ha-ora" (yes/no) [yes]?  yes
 
scswitch -z -g ha-ora -h DB1
 
    Command completed successfully.
 
   
Press Enter to continue: 
 
    Select the resource group you want to change:
 
           Group Name           Type       State(s)
           ==========           ====       ========
 
        1) ha-ora               failover   Online
 
        q) Done
 
    Option:  1
 
        1) Switch ownership of the group
        2) Bring the group offline from all cluster nodes
        3) Put the group into an unmanaged state
 
        q) Quit
 
    Option:  q
 
    Select the resource group you want to change:
 
           Group Name           Type       State(s)
           ==========           ====       ========
 
        1) ha-ora               failover   Online
 
        q) Done
 
    Option:  q
 
  *** Resource Group Menu ***
 
    Please select from one of the following options:
 
        1) Create a resource group
        2) Add a network resource to a resource group
        3) Add a data service resource to a resource group
        4) Resource type registration
        5) Online/Offline or Switchover a resource group
        6) Enable/Disable a resource
        7) Change properties of a resource group
        8) Change properties of a resource
        9) Remove a resource from a resource group
       10) Remove a resource group
       11) Clear the stop_failed error flag from a resource
 
        ?) Help
        s) Show current status
        q) Return to the main menu
 
    Option:  6
 
  >>> Enable or Disable a Resource <<<
 
    Use this option to either enable or disable a resource.
 
    Once a resource is enabled in an online resource group, the resource
    becomes available to clients. Before a resource can be enabled, all
    resources upon which it depends must also first be enabled.
 
    Once a resource is disabled, the resource is no longer available to
    clients of that resource. Before a resource can be disabled, all
    resources which depend upon it must also first be disabled.
 
    Is it okay to continue (yes/no) [yes]?  yes
 
    Select the resource for which you want to make a state change:
 
           Resource Name             Resource State 
           =============             ============== 
 
        1) ORADB                     Disabled
        2) ora-listener              Disabled
        3) ora-base                  Disabled
        4) hasp-ora                  Disabled
 
        q) Done
 
    Option:  2
 
    Do you want to enable "ora-listener" (yes/no) [yes]?  yes
 
    "ora-listener" has dependencies on the following disabled resource(s):
 
        ORADB
 
    Is it okay to enable these other resource(s) first (yes/no) [yes]?  yes
 
scswitch -e -j ora-listener,ORADB
   
Press Enter to continue: 
 
    Select the resource for which you want to make a state change:
 
           Resource Name             Resource State 
           =============             ============== 
 
        1) ORADB                     Enabled
        2) ora-listener              Enabled
        3) ora-base                  Disabled
        4) hasp-ora                  Disabled
 
        q) Done
 
    Option:  1
 
    Remember that once a resource is disabled, the resource is no longer
    available to clients of that resource. Clients which depend upon that
    resource will experience a loss of service.
 
    Are you sure you want to disable "ORADB" (yes/no) [yes]?  yes
 
    "ORADB" is depended upon by the following enabled resource(s):
 
        ora-listener
    Is it okay to disable these other resource(s) first (yes/no) [yes]?  yes
 
scswitch -n -j ORADB,ora-listener
   
Press Enter to continue: 
 
    Select the resource for which you want to make a state change:
 
           Resource Name             Resource State 
           =============             ============== 
 
        1) ORADB                     Disabled
        2) ora-listener              Disabled
        3) ora-base                  Disabled
        4) hasp-ora                  Disabled
 
        q) Done
 
    Option:  3
 
    Do you want to enable "ora-base" (yes/no) [yes]?  yes
 
    "ora-base" has dependencies on the following disabled resource(s):
 
        ORADB
 
    Is it okay to enable these other resource(s) first (yes/no) [yes]?  yes
 
scswitch -e -j ora-base,ORADB
 
   
Press Enter to continue: 
    Select the resource for which you want to make a state change:
 
           Resource Name             Resource State 
           =============             ============== 
 
        1) ORADB                     Enabled
        2) ora-listener              Disabled
        3) ora-base                  Enabled
        4) hasp-ora                  Disabled
 
        q) Done
 
    Option:  q
 
  *** Resource Group Menu ***
 
    Please select from one of the following options:
 
        1) Create a resource group
        2) Add a network resource to a resource group
        3) Add a data service resource to a resource group
        4) Resource type registration
        5) Online/Offline or Switchover a resource group
        6) Enable/Disable a resource
        7) Change properties of a resource group
        8) Change properties of a resource
        9) Remove a resource from a resource group
       10) Remove a resource group
       11) Clear the stop_failed error flag from a resource
 
        ?) Help
        s) Show current status
        q) Return to the main menu
 
    Option:  q
 
  *** Main Menu ***
 
    Please select from one of the following options:
 
        1) Quorum
        2) Resource groups
        3) Data Services
        4) Cluster interconnect
        5) Device groups and volumes
        6) Private hostnames
        7) New nodes
        8) Other cluster properties
 
        ?) Help with menu options
        q) Quit
 
    Option:  q
 
# exit
$ jk
__________________________________________________
 
#------> SCOUT Course of DB of MOSS System <-----#
***********     moss system     ****************
__________________________________________________
 
 13006 ?        0:00 oracle
 13022 ?        0:00 oracle
 13018 ?        0:00 oracle
 13178 ?        0:00 oracle
 13010 ?        0:00 oracle
 13287 ?        0:00 oracle
 13020 ?        0:00 oracle
 13012 ?        0:00 oracle
 13014 ?        0:00 oracle
 13170 ?        0:02 oracle
 13016 ?        0:00 oracle
 13285 ?        0:00 oracle_s
 13008 ?        0:00 oracle
 13024 ?        0:00 oracle
 13180 ?        0:00 oracle
 
    root 13270   514  0 22:43:20 ?        0:00 /opt/SUNWscor/oracle_server/bin/oracle_server_monitor64_v9 -R ora-base -G ha-or
  oracle 13006     1  0 22:42:51 ?        0:00 ora_pmon_MOSS
  oracle 13022     1  0 22:42:52 ?        0:00 ora_s000_MOSS
  oracle 13018     1  0 22:42:52 ?        0:00 ora_cjq0_MOSS
  oracle 13178     1  0 22:43:13 ?        0:00 ora_j001_MOSS
  oracle 13029     1  0 22:42:53 ?        0:00 /oracle/products/9.2/bin/tnslsnr LISTENER -inherit
  oracle 13010     1  0 22:42:51 ?        0:00 ora_lgwr_MOSS
  oracle 13287 13285  0 22:43:20 ?        0:00 oracleMOSS (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
  oracle 13704 13703  0 22:43:35 pts/9    0:00 ps -ef
  oracle 13020     1  0 22:42:52 ?        0:00 ora_qmn0_MOSS
  oracle 13012     1  0 22:42:52 ?        0:00 ora_ckpt_MOSS
  oracle 10228 10226  0 22:31:34 syscon   0:00 -sh
  oracle 13014     1  0 22:42:52 ?        0:00 ora_smon_MOSS
  oracle 29513 29511  0 17:14:08 pts/9    0:01 -sh
  oracle 13170     1  1 22:43:13 ?        0:02 ora_j000_MOSS
  oracle 13703 13698  0 22:43:35 pts/9    0:00 grep oracle
  oracle 13016     1  0 22:42:52 ?        0:00 ora_reco_MOSS
  oracle 13285 13270  0 22:43:20 ?        0:00 /opt/SUNWscor/oracle_server/bin/oracle_server_monitor64_v9 -R ora-base -G ha-or
  oracle 13698 29513  0 22:43:35 pts/9    0:00 -sh
  oracle 13008     1  0 22:42:51 ?        0:00 ora_dbw0_MOSS
  oracle 13024     1  0 22:42:52 ?        0:00 ora_d000_MOSS
  oracle 13180     1  0 22:43:13 ?        0:00 ora_j002_MOSS
==================================================
      23     197    1569
__________________________________________________
Thu Dec  7 22:43:34 CST 2006
--------------------------------------------------
$ jk
__________________________________________________
 
#------> SCOUT Course of DB of MOSS System <-----#
***********     moss system     ****************
__________________________________________________
 
 13006 ?        0:00 oracle
 13022 ?        0:00 oracle
 13018 ?        0:00 oracle
 13178 ?        0:00 oracle
 13010 ?        0:00 oracle
 13287 ?        0:00 oracle
 13020 ?        0:00 oracle
 13012 ?        0:00 oracle
 13014 ?        0:00 oracle
 13170 ?        0:02 oracle
 13016 ?        0:00 oracle
 13285 ?        0:00 oracle_s
 13008 ?        0:00 oracle
 13024 ?        0:00 oracle
 13180 ?        0:00 oracle
 
    root 13270   514  0 22:43:20 ?        0:00 /opt/SUNWscor/oracle_server/bin/oracle_server_monitor64_v9 -R ora-base -G ha-or
  oracle 13006     1  0 22:42:51 ?        0:00 ora_pmon_MOSS
  oracle 13022     1  0 22:42:52 ?        0:00 ora_s000_MOSS
  oracle 13018     1  0 22:42:52 ?        0:00 ora_cjq0_MOSS
  oracle 13178     1  0 22:43:13 ?        0:00 ora_j001_MOSS
  oracle 13029     1  0 22:42:53 ?        0:00 /oracle/products/9.2/bin/tnslsnr LISTENER -inherit
  oracle 13010     1  0 22:42:51 ?        0:00 ora_lgwr_MOSS
  oracle 13287 13285  0 22:43:20 ?        0:00 oracleMOSS (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
  oracle 13020     1  0 22:42:52 ?        0:00 ora_qmn0_MOSS
  oracle 13012     1  0 22:42:52 ?        0:00 ora_ckpt_MOSS
  oracle 10228 10226  0 22:31:34 syscon   0:00 -sh
  oracle 13014     1  0 22:42:52 ?        0:00 ora_smon_MOSS
  oracle 29513 29511  0 17:14:08 pts/9    0:01 -sh
  oracle 13714 13709  0 22:43:36 pts/9    0:00 grep oracle
  oracle 13170     1  1 22:43:13 ?        0:02 ora_j000_MOSS
  oracle 13715 13714  0 22:43:36 pts/9    0:00 ps -ef
  oracle 13016     1  0 22:42:52 ?        0:00 ora_reco_MOSS
  oracle 13285 13270  0 22:43:20 ?        0:00 /opt/SUNWscor/oracle_server/bin/oracle_server_monitor64_v9 -R ora-base -G ha-or
  oracle 13709 29513  0 22:43:36 pts/9    0:00 -sh
  oracle 13008     1  0 22:42:51 ?        0:00 ora_dbw0_MOSS
  oracle 13024     1  0 22:42:52 ?        0:00 ora_d000_MOSS
  oracle 13180     1  0 22:43:13 ?        0:00 ora_j002_MOSS
==================================================
      23     197    1569
__________________________________________________
Thu Dec  7 22:43:35 CST 2006
--------------------------------------------------
$ jk
__________________________________________________
 
#------> SCOUT Course of DB of MOSS System <-----#
***********     moss system     ****************
__________________________________________________
 
 13006 ?        0:00 oracle
 13022 ?        0:00 oracle
 13018 ?        0:00 oracle
 13178 ?        0:00 oracle
 13010 ?        0:00 oracle
 13287 ?        0:00 oracle
 13020 ?        0:00 oracle
 13012 ?        0:00 oracle
 13014 ?        0:00 oracle
 13170 ?        0:02 oracle
 13016 ?        0:00 oracle
 13285 ?        0:00 oracle_s
 13008 ?        0:00 oracle
 13024 ?        0:00 oracle
 13180 ?        0:00 oracle
 
    root 13270   514  0 22:43:20 ?        0:00 /opt/SUNWscor/oracle_server/bin/oracle_server_monitor64_v9 -R ora-base -G ha-or
  oracle 13006     1  0 22:42:51 ?        0:00 ora_pmon_MOSS
  oracle 13022     1  0 22:42:52 ?        0:00 ora_s000_MOSS
  oracle 13018     1  0 22:42:52 ?        0:00 ora_cjq0_MOSS
  oracle 13178     1  0 22:43:13 ?        0:00 ora_j001_MOSS
  oracle 13029     1  0 22:42:53 ?        0:00 /oracle/products/9.2/bin/tnslsnr LISTENER -inherit
  oracle 13010     1  0 22:42:51 ?        0:00 ora_lgwr_MOSS
  oracle 13287 13285  0 22:43:20 ?        0:00 oracleMOSS (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
  oracle 13726 13725  0 22:43:36 pts/9    0:00 ps -ef
  oracle 13020     1  0 22:42:52 ?        0:00 ora_qmn0_MOSS
  oracle 13012     1  0 22:42:52 ?        0:00 ora_ckpt_MOSS
  oracle 10228 10226  0 22:31:34 syscon   0:00 -sh
  oracle 13014     1  0 22:42:52 ?        0:00 ora_smon_MOSS
  oracle 29513 29511  0 17:14:08 pts/9    0:01 -sh
  oracle 13725 13720  0 22:43:36 pts/9    0:00 grep oracle
  oracle 13170     1  1 22:43:13 ?        0:02 ora_j000_MOSS
  oracle 13016     1  0 22:42:52 ?        0:00 ora_reco_MOSS
  oracle 13285 13270  0 22:43:20 ?        0:00 /opt/SUNWscor/oracle_server/bin/oracle_server_monitor64_v9 -R ora-base -G ha-or
  oracle 13720 29513  0 22:43:36 pts/9    0:00 -sh
  oracle 13008     1  0 22:42:51 ?        0:00 ora_dbw0_MOSS
  oracle 13024     1  0 22:42:52 ?        0:00 ora_d000_MOSS
  oracle 13180     1  0 22:43:13 ?        0:00 ora_j002_MOSS
==================================================
      23     197    1569
__________________________________________________
Thu Dec  7 22:43:36 CST 2006
--------------------------------------------------
$
ok!数据库恢复完成,在重新把temp表空间恢复一下,彻底万事,马上rman备份
我靠,一看表,0点了,备份吧,等了一会,没有问题,就会宿舍睡觉去了,太困了,整整一天

阅读(1212) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~