I 创建ASM实例
创建CSS服务
删除原重做日志
alter database drop logfile '/oracle/oradata/neil10g/redo03.log';
alter database drop logfile '/oracle/oradata/neil10g/redo01.log';
alter system switch logfile;
alter system checkpoint;
alter database drop logfile '/oracle/oradata/neil10g/redo02.log';
VI 删除原文件系统上的文件
创建CSS服务
root用户执行
$ORACLE_HOME/bin/localconfig add
DBCA配置ASM实例以及创建磁盘组
II 修改SPFILE中控制文件路径
alter system set control_files='+DATA' scope=spfile;
alter system set db_create_file_dest='+DATA' scope=spfile;
$ORACLE_HOME/bin/localconfig add
DBCA配置ASM实例以及创建磁盘组
II 修改SPFILE中控制文件路径
alter system set control_files='+DATA' scope=spfile;
alter system set db_create_file_dest='+DATA' scope=spfile;
关闭数据库
shut immediate;
III 利用rman迁移数据库的控制文件和数据文件到ASM上
rman target /
startup nomount;
利用现有的控制文件在ASM中生成新的控制文件
restore controlfile from '/oracle/oradata/neil10g/control01.ctl';
利用rman将数据文件复制到ASM
III 利用rman迁移数据库的控制文件和数据文件到ASM上
rman target /
startup nomount;
利用现有的控制文件在ASM中生成新的控制文件
restore controlfile from '/oracle/oradata/neil10g/control01.ctl';
利用rman将数据文件复制到ASM
alter database mount;
run{
allocate channel ch1 device type disk;
allocate channel ch2 device type disk;
allocate channel ch3 device type disk;
allocate channel ch4 device type disk;
backup as copy database format '+DATA';
release channel ch1;
release channel ch2;
release channel ch3;
release channel ch4;
}
切换控制文件中记录的数据文件指针到ASM
switch database to copy;
做恢复
recover database;
打开数据库
alter database open;
IV 将临时文件迁移到ASM上
回到sqlplus环境
sqlplus / as sysdba
查看临时文件
col tf_name for a40
col ts_name for a15
select tf.name tf_name,ts.name ts_name,tf.status,tf.enabled from v$tempfile tf,v$tablespace ts where tf.ts#=ts.ts#;
添加临时文件到ASM
alter tablespace temp add tempfile '+DATA' size 100m;
删除原有临时文件
alter tablespace temp drop tempfile '/oracle/oradata/neil10g/temp01.dbf';
V 将重做日志文件迁移到ASM上
查看重做日志文件
run{
allocate channel ch1 device type disk;
allocate channel ch2 device type disk;
allocate channel ch3 device type disk;
allocate channel ch4 device type disk;
backup as copy database format '+DATA';
release channel ch1;
release channel ch2;
release channel ch3;
release channel ch4;
}
切换控制文件中记录的数据文件指针到ASM
switch database to copy;
做恢复
recover database;
打开数据库
alter database open;
IV 将临时文件迁移到ASM上
回到sqlplus环境
sqlplus / as sysdba
查看临时文件
col tf_name for a40
col ts_name for a15
select tf.name tf_name,ts.name ts_name,tf.status,tf.enabled from v$tempfile tf,v$tablespace ts where tf.ts#=ts.ts#;
添加临时文件到ASM
alter tablespace temp add tempfile '+DATA' size 100m;
删除原有临时文件
alter tablespace temp drop tempfile '/oracle/oradata/neil10g/temp01.dbf';
V 将重做日志文件迁移到ASM上
查看重做日志文件
col member for a40
select l.status,lf.member from v$log l,v$logfile lf where l.group#=lf.group#;
添加新重做日志文件到ASM
alter database add logfile '+DATA' size 10m;
select l.status,lf.member from v$log l,v$logfile lf where l.group#=lf.group#;
添加新重做日志文件到ASM
alter database add logfile '+DATA' size 10m;
alter database add logfile '+DATA' size 10m;
alter database add logfile '+DATA' size 10m;
删除原重做日志
alter database drop logfile '/oracle/oradata/neil10g/redo03.log';
alter database drop logfile '/oracle/oradata/neil10g/redo01.log';
alter system switch logfile;
alter system checkpoint;
alter database drop logfile '/oracle/oradata/neil10g/redo02.log';
VI 删除原文件系统上的文件
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7986761/viewspace-1697009/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7986761/viewspace-1697009/