一、更换环境操作系统:AIX数据库:10.2.0.4数据文件存储方式:ASM二、前期准备1、图形界面工具:Xmanager 42、确认新存储正常挂载映射,新存储lun划分规则需和当前使用存储一致(ocr、votingdisk所在盘,其他盘可以不一致),被his两台服务器识别。3、提前格式化一块大盘,做成文件系统,挂载到一个服务器节点,用于存放全备。 注:ocr仲裁盘可在线进行替换,数据盘、归档盘由于使用的asmdg,需停机操作。 三、规划名称原位置新位置属组属主权限权限大小DATAVG_0001/dev/rhdisk11/dev/rhdiskpower1oracle dba660500GDATAVG_0002/dev/rhdisk12/dev/rhdiskpower2oracle dba660500GDATAVG_0003/dev/rhdisk13/dev/rhdiskpower3oracle dba660500Gfra/dev/rhdisk14/dev/rhdiskpower4oracle dba660300Gocr/dev/rhdisk8/dev/rhdiskpower5root oinstall6401Gocr/dev/rhdisk21/dev/rhdiskpower6root oinstall6401Gvote/dev/rhdisk22/dev/rhdiskpower7oracle oinstall6441Gvote/dev/rhdisk23/dev/rhdiskpower8oracle oinstall6441Gvote/dev/rhdisk24/dev/rhdiskpower0oracle oinstall644405G四、具体实施步骤1.修改新盘权限(root用户修改,每个节点)chown oracle:dba /dev/rhdiskpower1 chown oracle:dba /dev/rhdiskpower2 chown oracle:dba /dev/rhdiskpower3 chown oracle:dba /dev/rhdiskpower4 chown root:oinstall /dev/rhdiskpower5chown root:oinstall /dev/rhdiskpower6chown oracle:oinstall /dev/rhdiskpower7chown oracle:oinstall /dev/rhdiskpower8chown oracle:oinstall /dev/rhdiskpower0chmod 660 /dev/rhdiskpower1chmod 660 /dev/rhdiskpower2chmod 660 /dev/rhdiskpower3chmod 660 /dev/rhdiskpower4chmod 640 /dev/rhdiskpower5chmod 640 /dev/rhdiskpower6chmod 644 /dev/rhdiskpower7chmod 644 /dev/rhdiskpower8chmod 644 /dev/rhdiskpower0确认 ls -l /dev/rhdiskpowe*2.全备数据库 nohup /orabak/backup1126/backup.sh & /orabak/backup1126/backup.sh#!/usr/bin/ksh. ~/.profile/u01/app/oracle/product/10.2.0/db_1/bin/rman target / cmdfile /orabak/backup1126/backup.rcv log=/orabak/backup1126/rmanfull_log.txt /orabak/backup1126/backup.rcvrun{allocate channel c1 type disk;sql 'alter system archive log current';backup as backupset database format '/orabak/backup1126/rmanfull_%d_%T_%s_%p.bak' include current controlfile;sql 'alter system archive log current';sql 'alter system archive log current';sql 'alter system archive log current';sql 'alter system archive log current';sql 'alter system archive log current';backup format '/orabak/backup1126/rmanarch_full%T%U' archivelog all;backup spfile format '/orabak/backup1126/spfile_%d_%T_%s_%p.bak';backup current controlfile format '/orabak/backup1126/control_%d_%T_%s_%p.bak';release channel c1;}3.在线更换ocr(su – oracle su root)1)确保OCR有最近的备份A、查看OCR的健康状态ocrcheckocrconfig -showbackupB、如果没有,手工备份一下ocrconfig -export /home/oracle/ocrbak.ocr -s onlineC、使用OCR备份还原ocrconfig -import /home/oracle/ocrbak.ocrD、查看OCR的健康状态ocrcheck2)添加新的OCR盘该步骤会使用rhdiskpower5覆盖原有镜像rhdisk8ocrconfig -replace ocrmirror /dev/rhdiskpower5ocrcheck3)移除原有OCR盘该步骤会移除rhdisk4,并且rhdiskpower5成为OCR盘ocrconfig -replace ocrocrcheck4)添加新的镜像OCR盘该步骤会使rhdiskpower6盘成为ocrmirrorocrconfig -replace ocrmirror /dev/rhdiskpower6ocrcheck注:移除OCR镜像盘,用不到该命令ocrconfig -replace ocrmirror4.做新的disk group1)使用oracle用户登陆Xmanager 2) 打开命令窗口输入oracle用户.profile中的内容后,绝对路径打开dbca3) 添加新的Disk Group,要与之前对应的DG属性完全一致创建完新DiskGroup后会自动mount到左右节点如果没有,选中新DG后单击低下的mount键对新DG进行mount 添加完后: 5.查询并记录数据库失效对象set linesize 300 pagesize 150;column owner format a20;column object_name format a60;column status format a20;column object_type format a60;select owner,object_name,status,object_type from dba_objects where status='INVALID' and owner in ('ZYHIS','ABW','HIS_ADT');6.更换vote盘当添加新的vote盘、或者替换时,vote盘的内容自动从备份恢复添加vote盘时,必须以root用户停止整个集群1)备份vote盘(备份一份即可,无需全部备份)dd if=/dev/rhdisk22 of=/home/oracle/votebak6.votedd if=/dev/rhdisk23 of=/home/oracle/votebak7.votedd if=/dev/rhdisk24 of=/home/oracle/votebak8.vote2)停止集群crsctl stop crs注:所有节点都执行3)添加vote盘crsctl add css votedisk /dev/rhdiskpower7 -forcecrsctl add css votedisk /dev/rhdiskpower8 -forcecrsctl add css votedisk /dev/rhdiskpower0 -force# crsctl add css votedisk /dev/rhdiskpower7 -forceNow formatting voting disk: /dev/rhdiskpower7successful addition of votedisk /dev/rhdiskpower7.# crsctl add css votedisk /dev/rhdiskpower8 -forceNow formatting voting disk: /dev/rhdiskpower8successful addition of votedisk /dev/rhdiskpower8.# crsctl add css votedisk /dev/rhdiskpower0 -forceNow formatting voting disk: /dev/rhdiskpower0successful addition of votedisk /dev/rhdiskpower0.4)移除原vote盘crsctl delete css votedisk /dev/rhdisk22 -forcecrsctl delete css votedisk /dev/rhdisk23 -forcecrsctl delete css votedisk /dev/rhdisk24 -force5)启动集群crsctl start crs所有节点都执行6)验证当前vote盘路径crsctl query css votediskselect name, path, mode_status, state from v$asm_disk order by name;7)手工启动集群未自启动的服务srvctl start -d orcl -s orclmzsrvctl start -d orcl -s orclzy8)检查集群资源状态crs_stat –t7.停机,切换redo,备份归档1) 停机关闭监听:lsnrctl stop 杀进程LOCAL = NO:查出并杀掉进程$ ps -ef | grep LOCAL=NO | more oracle 208986 1 0 17:15:06 - 0:18 oracleorcl1 (LOCAL=NO) oracle 467168 1 0 16:43:30 - 0:09 oracleorcl1 (LOCAL=NO) oracle 552974 1 0 17:16:43 - 0:12 oracleorcl1 (LOCAL=NO) oracle 606432 1 0 15:43:02 - 0:08 oracleorcl1 (LOCAL=NO) oracle 618502 1 0 Nov 26 - 0:13 oracleorcl1 (LOCAL=NO) oracle 622680 1 0 15:59:12 - 0:17 oracleorcl1 (LOCAL=NO) oracle 639134 1 0 Nov 26 - 0:47 oracleorcl1 (LOCAL=NO) oracle 688356 1 0 13:58:59 - 0:19 oracleorcl1 (LOCAL=NO) oracle 708658 1 0 15:08:36 - 0:10 oracleorcl1 (LOCAL=NO) oracle 716928 1 0 08:56:38 - 0:22 oracleorcl1 (LOCAL=NO) oracle 725062 1 0 16:53:51 - 0:01 oracleorcl1 (LOCAL=NO) oracle 790686 1 0 17:17:24 - 0:04 oracleorcl1 (LOCAL=NO) oracle 806974 1 0 17:03:18 - 0:11 oracleorcl1 (LOCAL=NO) oracle 839906 1 0 Nov 25 - 0:18 oracleorcl1 (LOCAL=NO) $ kill -9 2089861)所有节点切换redo,确保所有的redo都已经归档查询redolog日志状态set pagesize 200;column TBS_NAME format a20;c column DBF_NAME format a60;sselect l.group#,l.THREAD#,l.SEQUENCE#,l.status,l.FIRST_CHANGE#,l.NEXT_CHANGE#,l.NEXT_TIME from v$log l;Rodo归档命令alter system archive log currentalter system checkpoint;3)备份归档日志 nohup /orabak/backup1126/arch_last.sh & /orabak/backup1126/arch_last.sh#!/usr/bin/ksh. ~/.profile/u01/app/oracle/product/10.2.0/db_1/bin/rman target / cmdfile /orabak/backup1126/arch_last.rcv log=/orabak/backup1126/arch_last.txt /orabak/backup1126/arch_last.rcvrun{allocate channel c1 type disk;sql 'alter system archive log current';sql 'alter system archive log current';sql 'alter system archive log current';sql 'alter system archive log current';sql 'alter system archive log current';backup format '/orabak/backup1126/Last_rmanarch_full%T%U' archivelog all;release channel c1;}4)查询并记录最后的一个在线日志的时间点select l.GROUP#,l.THREAD#,l.SEQUENCE#,l.STATUS,to_number(l.FIRST_CHANGE#) "FIRST_CHANGE#",to_char(l.FIRST_TIME,'yyyy/mm/dd hh24:mi:ss') "First_Time" from v$log l order by l.FIRST_CHANGE# desc;5)查询并记录最后一个归档日志的时间点column name format a70;set linesize 300 pagesize 100;select l.name,l.THREAD#,l.SEQUENCE#,l.FIRST_CHANGE#,to_char(l.FIRST_TIME,'yyyy/mm/dd hh24:mi:ss') "First_Time",l.NEXT_CHANGE#,to_char(l.NEXT_TIME,'yyyy/mm/dd hh24:mi:ss') "Next_Time" from v$archived_log l order by l.FIRST_CHANGE# desc;8.关闭数据库,dismount原DG1)使用集群命令关闭数据库srvctl stop database -d orcl如果关不了所有节点执行shutdown immediate关闭2)dismount原DG(一定要确保原DG在所有节点都已经DISMOUNT再进行后续操作)注:11g通过srvctl命令dismount此操作所有节点都要做,以下以节点1为例Export ORACLE_SID=+ASM1Sqlplus / as sysdbaALTER DISKGROUP DATAVG DISMOUNT;ALTER DISKGROUP FRA DISMOUNT;3)检查确保原DG已经mountASMCA图像界面确认 登陆到每个节点通过asmcmd =>lsdg再次确认9.修改参数文件1)创建pfile并进行修改create pfile = '/orabak/initorcl.ora' from spfile;修改pfile,将其中带原DG的路径换为新DG的路径修改前后参数文件对比$ diff initorcl.ora initorcl_change.ora17c17---> *.control_files='+NEWDATA/orcl/control01.ctl','+NEWDATA/orcl/control02.ctl','+NEWDATA/orcl/control03.ctl'22c22---> *.db_file_name_convert='/oradata/standby/','+NEWDATA/ORCL/'34c34---> *.log_archive_dest_1='LOCATION=+NEWFAR VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=orcl'40c40---> *.log_file_name_convert='/oradata/standby/','+NEWDATA/ORCL/ONLINELOG/'2)创建spfile到新DGcreate spfile='+NEWDATA' from pfile='/orabak/initorcl_change.ora';3) 修改pfile,让pfile指向spfile(所有节点都要做,以节点一为例)vi /u01/app/oracle/product/10.2.0/db_1/dbs/initorcl1.oraspfile='+NEWDATA/ORCL/PARAMETERFILE/spfile.313.896992587'4)打开数据库到nomount状态,查看spfile是否指向新DG(所有节点都要做,以节点一为例)startup nomountshow parameter spfile10.恢复控制文件1)恢复控制文件rman target /restore controlfile from '/orabak/ctlbackup_c-1282382613-20151128-04';alter database mount;2)查询数据文件及redolog位置rman target /report schema;Report of database schemaList of Permanent Datafiles===========================File Size(MB) Tablespace RB segs Datafile Name---- -------- -------------------- ------- ------------------------1 570 SYSTEM *** +DATAVG/standby/datafile/system.272.8020556092 2605 UNDOTBS1 *** +DATAVG/standby/datafile/undotbs1.257.8020556073 1990 SYSAUX *** +DATAVG/standby/datafile/sysaux.258.8020556074 4705 USERS *** +DATAVG/standby/datafile/users.273.8020556095 1150 UNDOTBS2 *** +DATAVG/standby/datafile/undotbs2.256.8020556096 32717 HIS_DATA *** +DATAVG/orcl/datafile/his01.dbf7 32767 HIS_DATA *** +DATAVG/orcl/datafile/his02.dbf8 32767 HIS_DATA *** +DATAVG/orcl/datafile/his03.dbf9 32767 HIS_DATA *** +DATAVG/orcl/datafile/his04.dbf10 32767 HIS_DATA *** +DATAVG/orcl/datafile/his05.dbf11 32767 IDXTBS *** +DATAVG/orcl/datafile/idxtbs01.dbf12 32767 IDXTBS *** +DATAVG/orcl/datafile/idxtbs02.dbf13 4096 HIS_ADT_SP *** +DATAVG/orcl/datafile/his_adt_sp.dbf14 4096 LIS_DATA *** +DATAVG/orcl/datafile/lis_data.dbf15 32767 IDXTBS *** +DATAVG/orcl/datafile/idxtbs03.dbf16 29564 IDXTBS *** +DATAVG/orcl/datafile/idxtbs04.dbf17 32761 HIS_DATA *** +DATAVG/orcl/datafile/his06.dbf18 32767 IDXTBS *** +DATAVG/orcl/datafile/idxtbs05.dbf19 30720 HIS_DATA *** +DATAVG/orcl/datafile/his07.dbf20 30720 IDXTBS *** +DATAVG/orcl/datafile/idxtbs06.dbf21 30720 HIS_DATA *** +DATAVG/orcl/datafile/his08.dbf22 30720 IDXTBS *** +DATAVG/orcl/datafile/idxtbs07.dbf23 4096 HIS_ADT_SP *** +DATAVG/orcl/datafile/his_adt_sp02.dbf24 1024 HIS_ADT_SP *** +DATAVG/orcl/datafile/his_adt_sp.281.89496389525 4096 HIS_DATA *** +DATAVG/orcl/datafile/his_data.300.89496435126 512 SYSAUX *** +DATAVG/orcl/datafile/sysaux.301.89496447527 512 SYSTEM *** +DATAVG/orcl/datafile/system.302.89496453328 2048 USERS *** +DATAVG/orcl/datafile/users.303.894964571List of Temporary Files=======================File Size(MB) Tablespace Maxsize(MB) Tempfile Name---- -------- -------------------- ----------- --------------------1 32767 TEMP 32767 +DATAVG/standby/tempfile/temp.287.802083423sqlplus / as sysdbaSQL> set pagesize 200;SQL> column TBS_NAME format a20;SQL> column DBF_NAME format a60;SQL> select dbf.FILE#,tbs.NAME TBS_NAME,dbf.NAME DBF_NAME from v$tablespace tbs,v$datafile dbf where tbs.TS#=dbf.TS#; FILE# TBS_NAME---------- --------------------DBF_NAME------------------------------------------------------------ 1 SYSTEM+DATAVG/standby/datafile/system.272.802055609 27 SYSTEM+DATAVG/orcl/datafile/system.302.894964533 2 UNDOTBS1+DATAVG/standby/datafile/undotbs1.257.802055607 3 SYSAUX+DATAVG/standby/datafile/sysaux.258.802055607 26 SYSAUX+DATAVG/orcl/datafile/sysaux.301.894964475 4 USERS+DATAVG/standby/datafile/users.273.802055609 28 USERS+DATAVG/orcl/datafile/users.303.894964571 5 UNDOTBS2+DATAVG/standby/datafile/undotbs2.256.802055609 9 HIS_DATA+DATAVG/orcl/datafile/his04.dbf 8 HIS_DATA+DATAVG/orcl/datafile/his03.dbf 10 HIS_DATA+DATAVG/orcl/datafile/his05.dbf 6 HIS_DATA+DATAVG/orcl/datafile/his01.dbf 7 HIS_DATA+DATAVG/orcl/datafile/his02.dbf 25 HIS_DATA+DATAVG/orcl/datafile/his_data.300.894964351 21 HIS_DATA+DATAVG/orcl/datafile/his08.dbf 19 HIS_DATA+DATAVG/orcl/datafile/his07.dbf 17 HIS_DATA+DATAVG/orcl/datafile/his06.dbf 18 IDXTBS+DATAVG/orcl/datafile/idxtbs05.dbf 16 IDXTBS+DATAVG/orcl/datafile/idxtbs04.dbf 12 IDXTBS+DATAVG/orcl/datafile/idxtbs02.dbf 15 IDXTBS+DATAVG/orcl/datafile/idxtbs03.dbf 11 IDXTBS+DATAVG/orcl/datafile/idxtbs01.dbf 20 IDXTBS+DATAVG/orcl/datafile/idxtbs06.dbf 22 IDXTBS+DATAVG/orcl/datafile/idxtbs07.dbf 13 HIS_ADT_SP+DATAVG/orcl/datafile/his_adt_sp.dbf 24 HIS_ADT_SP+DATAVG/orcl/datafile/his_adt_sp.281.894963895 23 HIS_ADT_SP+DATAVG/orcl/datafile/his_adt_sp02.dbf 14 LIS_DATA+DATAVG/orcl/datafile/lis_data.dbf28 rows selected.SQL> select dbf.FILE#,BYTES/1024/1024 "M",tbs.NAME TBS_NAME,dbf.NAME DBF_NAME from v$tablespace tbs,v$tempfile dbf where tbs.TS#=dbf.TS#; FILE# M TBS_NAME---------- ---------- --------------------DBF_NAME------------------------------------------------------------ 1 32767 TEMP+DATAVG/standby/tempfile/temp.287.802083423SQL> set linesize 150;SQL> set pagesize 50;SQL> column TYPE format a8;SQL> column MEMBER format a60;SQL> select lf.GROUP#,l.THREAD#,lf.TYPE,l.BYTES/1024/1024 MB,lf.MEMBER from v$logfile lf,v$log l where lf.GROUP#=l.GROUP#; GROUP# THREAD# TYPE MB MEMBER---------- ---------- -------- ---------- ------------------------------------------------------------ 1 1 ONLINE 512 +DATAVG/orcl/onlinelog/group_1.279.879447445 2 2 ONLINE 512 +DATAVG/orcl/onlinelog/group_2.277.879447463 3 1 ONLINE 512 +DATAVG/orcl/onlinelog/group_3.278.879447453 4 2 ONLINE 512 +DATAVG/orcl/onlinelog/group_4.276.879447469 5 1 ONLINE 512 +DATAVG/orcl/onlinelog/group_5.296.879447083 6 2 ONLINE 512 +DATAVG/orcl/onlinelog/group_6.297.879447109 7 1 ONLINE 512 +DATAVG/orcl/onlinelog/group_7.298.879447309 8 2 ONLINE 512 +DATAVG/orcl/onlinelog/group_8.299.87944732111.恢复数据文件1)恢复数据文件nohup /orabak/backup1126/restore_db.sh & /orabak/backup1126/restore_db.sh#!/usr/bin/ksh. ~/.profile/u01/app/oracle/product/10.2.0/db_1/bin/rman target / cmdfile /orabak/backup1126/restore_db.rcv log=/orabak/backup1126/restore_db.txt /orabak/backup1126/backup.rcvrun{ allocate channel c1 device type disk;allocate channel c2 device type disk;allocate channel c3 device type disk;set newname for datafile 1 to '+NEWDATA';set newname for datafile 2 to '+NEWDATA';set newname for datafile 3 to '+NEWDATA';set newname for datafile 4 to '+NEWDATA';set newname for datafile 5 to '+NEWDATA';set newname for datafile 6 to '+NEWDATA';set newname for datafile 7 to '+NEWDATA';set newname for datafile 8 to '+NEWDATA';set newname for datafile 9 to '+NEWDATA';set newname for datafile 10 to '+NEWDATA';set newname for datafile 11 to '+NEWDATA';set newname for datafile 12 to '+NEWDATA';set newname for datafile 13 to '+NEWDATA';set newname for datafile 14 to '+NEWDATA';set newname for datafile 15 to '+NEWDATA';set newname for datafile 16 to '+NEWDATA';set newname for datafile 17 to '+NEWDATA';set newname for datafile 18 to '+NEWDATA';set newname for datafile 19 to '+NEWDATA';set newname for datafile 20 to '+NEWDATA';set newname for datafile 21 to '+NEWDATA';set newname for datafile 22 to '+NEWDATA';set newname for datafile 23 to '+NEWDATA';set newname for datafile 24 to '+NEWDATA';set newname for datafile 25 to '+NEWDATA';set newname for datafile 26 to '+NEWDATA';set newname for datafile 27 to '+NEWDATA';set newname for datafile 28 to '+NEWDATA';restore database;switch datafile all;release channel c1;release channel c2;release channel c3;}2)修改控制文件中redolog路径(注意一定要指定到新盘的确切路径下)alter database rename file '+DATAVG/orcl/onlinelog/group_1.299.896932437' to '+NEWDATA/orcl/onlinelog/group_1';alter database rename file '+DATAVG/orcl/onlinelog/group_3.297.896932441' to '+NEWDATA/orcl/onlinelog/group_3';alter database rename file '+DATAVG/orcl/onlinelog/group_2.298.896932439' to '+NEWDATA/orcl/onlinelog/group_2';alter database rename file '+DATAVG/orcl/onlinelog/group_4.296.896932443' to '+NEWDATA/orcl/onlinelog/group_4';alter database rename file '+DATAVG/orcl/onlinelog/group_5.276.896932445' to '+NEWDATA/orcl/onlinelog/group_5';alter database rename file '+DATAVG/orcl/onlinelog/group_6.277.896932445' to '+NEWDATA/orcl/onlinelog/group_6';alter database rename file '+DATAVG/orcl/onlinelog/group_7.278.896932447' to '+NEWDATA/orcl/onlinelog/group_7';alter database rename file '+DATAVG/orcl/onlinelog/group_8.279.896932449' to '+NEWDATA/orcl/onlinelog/group_8';alter database rename file '+DATAVG/orcl/onlinelog/group_21.286.879451249' to '+NEWDATA/orcl/onlinelog/group_21';alter database rename file '+DATAVG/orcl/onlinelog/group_22.285.879451285' to '+NEWDATA/orcl/onlinelog/group_22';alter database rename file '+DATAVG/orcl/onlinelog/group_23.284.879451325' to '+NEWDATA/orcl/onlinelog/group_23';alter database rename file '+DATAVG/orcl/onlinelog/group_24.283.879451333' to '+NEWDATA/orcl/onlinelog/group_24';alter database rename file '+DATAVG/orcl/onlinelog/group_25.282.879451339' to '+NEWDATA/orcl/onlinelog/group_25';3)将关库时备份出的归档注册到控制文件中catalog start with ‘/orabak/backup1126/’;4)查看所有数据文件scn号,是否一致set numwidth 20select checkpoint_change#,file# from v$datafile_header;5)跑归档恢复数据库nohup /orabak/backup1126/restor_arch.sh & /orabak/backup1126/restor_arch.sh#!/usr/bin/ksh. ~/.profile/u01/app/oracle/product/10.2.0/db_1/bin/rman target / cmdfile /orabak/backup1126/restor_arch.rcv log=/orabak/backup1126/restor_arch.txt /orabak/backup1126/restor_arch.rcvrun{ ALLOCATE CHANNEL disk1 DEVICE TYPE disk;recover database;release channel disk1;}6)查看所有数据文件scn号,是否一致set numwidth 20select checkpoint_change#,file# from v$datafile_header;7)对应数据文件SCN号查看日志文件,确认恢复的时间点(与关库时间点对应)归档备份查看list backup of archivelog all;归档日志SCN号及对应时间column name format a70;set linesize 300 pagesize 100;select l.name,l.THREAD#,l.SEQUENCE#,l.FIRST_CHANGE#,to_char(l.FIRST_TIME,'yyyy/mm/dd hh24:mi:ss') "First_Time",l.NEXT_CHANGE#,to_char(l.NEXT_TIME,'yyyy/mm/dd hh24:mi:ss') "Next_Time" from v$archived_log l order by l.FIRST_CHANGE# desc;8)再次查询数据文件和redolog位置set pagesize 200;column TBS_NAME format a20;column DBF_NAME format a60;select dbf.FILE#,tbs.NAME TBS_NAME,dbf.NAME DBF_NAME from v$tablespace tbs,v$datafile dbf where tbs.TS#=dbf.TS#;select dbf.FILE#,BYTES/1024/1024 "M",tbs.NAME TBS_NAME,dbf.NAME DBF_NAME from v$tablespace tbs,v$tempfile dbf where tbs.TS#=dbf.TS#;set linesize 150;set pagesize 50;column TYPE format a8;column MEMBER format a60;select lf.GROUP#,l.THREAD#,lf.TYPE,l.BYTES/1024/1024 MB,lf.MEMBER from v$logfile lf,v$log l where lf.GROUP#=l.GROUP#;9)确认数据恢复时间点没问题后,打开数据库(两个节点都要做)alter database open;alter database open resetlogs;12.后续操作1)替换tempfilealter tablespace temp add tempfile '+NEWDATA' size 32767M autoextend off;alter tablespace temp drop tempfile '+DATAVG/standby/tempfile/temp.287.802083423';select dbf.FILE#,BYTES/1024/1024 "M",tbs.NAME TBS_NAME,dbf.NAME DBF_NAME from v$tablespace tbs,v$tempfile dbf where tbs.TS#=dbf.TS#;2)修改归档路径到新盘archive log list;alter system set LOG_ARCHIVE_DEST_1='LOCATION=+NEWFAR';archive log list;3)检查数据库失效对象查询数据库失效对象,并比对与关库前是否一致set linesize 300 pagesize 150;column owner format a20;column object_name format a60;column status format a20;column object_type format a60;select owner,object_name,status,object_type from dba_objects where status='INVALID' and owner in ('ZYHIS','ABW','HIS_ADT');4)验证日志是否可用select * from v$log;create table t as select * from dbs_objects;alter system archive log current;alter system checkpoint;5)集群层面验证集群所有服务是否正常开启crs_stat –t –v crs_stat crsctl stat res –t可能会用到的操作srvctl start service -d orcl -s orclmzsrvctl start service -d orcl -s orclzy 09-21 06:08