idle>col name format a50
idle>select * from v$controlfile;
STATUS NAME IS_REC BLOCK_SIZE FILE_SIZE_BLKS
-------------- -------------------------------------------------- ------ ---------- --------------
/opt/oracle/oradata/oracle/control01.ctl NO 16384 432
/opt/oracle/oradata/oracle/control02.ctl NO 16384 432
/opt/oracle/oradata/oracle/control03.ctl NO 16384 432
--1。查看控制文件信息
idle>alter system set control_files='/opt/oracle/oradata/oracle/control01.ctl','/opt/oracle/oradata/oracle/control04.ctl' scope=spfile;
System altered.
--2。修改控制文件,指定到spfile中
idle>shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
--3。关闭数据库
idle>!cp /opt/oracle/oradata/oracle/control01.ctl /opt/oracle/oradata/oracle/control04.ctl
--4。拷贝生成新的控制文件
idle>!chmod 660 /opt/oracle/oradata/oracle/control04.ctl
--5。修改控制文件,赋予读写权限
idle>startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 117442128 bytes
Database Buffers 163577856 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
--6。启动数据库
idle>select name from v$controlfile;
NAME
--------------------------------------------------
/opt/oracle/oradata/oracle/control01.ctl
/opt/oracle/oradata/oracle/control04.ctl
--7。查看控制文件信息,验证是否添加成功
阅读(502) | 评论(0) | 转发(0) |