您的位置:首页 > 数据库 > Oracle

OMF添加控制文件_OCP学习笔记(3)

2010-06-24 15:41 323 查看
DBCA选择OMF管理方式,但没有添加多路复用。即
SQL> show parameter db_create
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_create_file_dest string d:\oracle\product\10.2.0\orada
ta
db_create_online_log_dest_1 string
db_create_online_log_dest_2 string
db_create_online_log_dest_3 string
db_create_online_log_dest_4 string
db_create_online_log_dest_5 string
只有db_create_file_dest有值,那么ORACLE会在db_create_file_dest目录创建一份(only one)控制文件:

SQL> select name from v$controlfile
2 /
NAME
------------------------------------------------------------------------
D:\ORACLE\PRODUCT\10.2.0\ORADATA\STUDY\CONTROLFILE\O1_MF_625GL8JB_.CTL
Oracle一般建议生成三份控制文件. 下面我们添加控制文件目录:
SQL> alter system set db_create_online_log_dest_1='d:\oracle\product\10.2.0\logs'
SQL> alter system set db_create_online_log_dest_2='d:\oracle\product\10.2.0\logs2'
SQL> alter system set db_create_online_log_dest_3='d:\oracle\product\10.2.0\logs3'
以上添加三个复用目录.
然后生成控制文件脚本:
SQL> alter database backup controlfile to trace;
再就是把control_files参数去除。本来想用reset清掉control_files。很不巧总报错。
只能用生PFILE文件,手工更改的方式:
SQL> create pfile='C:\anran.ora' from spfile.
打开anran.ora,remove control_files参数行。
SQL> STARTUP NOMOUNT pfile='C:\anran.ora'
剩下就是按trace文件脚本重建控制文件就可以了,这里有一点,TRACE文件里有两处脚本,noresetlogs/resetlog.我们最好选用前者。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  职场 休闲 ORACLE OMF