|
8a实验:
控制文件在磁盘组上找不到了,需要recovery catalog,找到controlfile的备份:
rman target / catalog u80/oracle_4U[url=]@rcat[/url]
RMAN>set dbid ....
RMAN>list backup of controlfile;
RMAN>restore controlfile (根据参数文件里control_files的规定,会正确地放在+data/+fra中)
RMAN>alter database mount;
如果数据文件也坏了:
RMAN>list backup of database; (这个database是指*.dbf的意思)
如果catalog太陈旧,则:
rman target /
RMAN>list backup of database;
RMAN>restore database; (会自动拷贝到新建的+DATA里)
如果中间出现8号文件没备份找不到之类的问题,sqlplus里alter database create datafile 8 as '+data';
或者在RMAN里打“recover database”
或者直接在sqlplus里打“recover database using backup controlfile”,这里的“using backup controlfile”指的是恢复之前采集(日志文件、数据文件)数据,因为备份的控制文件一定略旧。而RMAN里没有“using backupv controlfile”或“until cancel”之类的语法。
最后要回答在线日志的地址。
-----------------------------------------------------------------------------------------------------
快速镜像重同步,如果失败,就drop force:
- [oracle@station80 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 12 22:03:59 2019
- Copyright (c) 1982, 2013, Oracle. All rights reserved.
- SQL> conn / as sysasm
- Connected.
- SQL> alter diskgroup data offline disk disk01 drop after 3.6h ;
- Diskgroup altered.
- SQL> alter diskgroup data online disk disk01;
- Diskgroup altered.
- SQL> alter diskgroup data offline disk disk01 drop after 3.6h ;
- Diskgroup altered.
- SQL> alter diskgroup data online disk disk01;
- alter diskgroup data online disk disk01
- *
- ERROR at line 1:
- ORA-15032: not all alterations performed
- ORA-15282: ASM disk "DISK01" is not visible cluster-wide
- SQL> alter diskgroup data drop disk disk01 ;
- alter diskgroup data drop disk disk01
- *
- ERROR at line 1:
- ORA-15032: not all alterations performed
- ORA-15084: ASM disk "DISK01" is offline and cannot be dropped.
- SQL> alter diskgroup data drop disk disk01 force ;
- Diskgroup altered.
- SQL> alter diskgroup data add failgroup fg1 disk 'ORCL:ASMDISK01' name disk01 ;
- Diskgroup altered.
- SQL>
复制代码
--------------------------
ASM迁移:
- select * from v$datafile;
- select * from v$controlfile;
- select * from v$logfile;
- select * from v$log;
- select * from v$parameter where name='spfile';
- alter database drop logfile group 1;
- alter system set db_recovery_file_dest='+fra';
- alter system set db_create_file_dest='+data';
- alter database add logfile group 1;
- alter database drop logfile group 3;
- alter database add logfile group 3;
- alter system switch logfile;
- alter system checkpoint;
- alter database drop logfile group 2;
- alter database add logfile group 2;
复制代码
|
|