学习笔记: 添加删除controfile (spfile)
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string /home/oracle/app/product/11.2.
0/db_1/dbs/spfileorcl.ora
SQL> select * from v$controlfile;
STATUS NAME IS_ BLOCK_SIZE FILE_SIZE_BLKS
------- ------------------------------------------------------------ --- ---------- --------------
/home/oracle/app/oradata/orcl/control01.ctl NO 16384 594
/home/oracle/app/fast_recovery_area/orcl/control02.ctl NO 16384 594
SQL> show parameter control
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string /home/oracle/app/oradata/orcl/
control01.ctl, /home/oracle/ap
p/fast_recovery_area/orcl/cont
rol02.ctl
control_management_pack_access string DIAGNOSTIC+TUNING
SQL> alter system set control_files='/home/oracle/app/oradata/orcl/control01.ctl','/home/oracle/app/fast_recovery_area/orcl/control02.ctl','/home/oracle/app/oradata/orcl/control03.ctl' scope=spfile;
SQL> shutdown immediate
[oracle@localhost ~]$ cd /home/oracle/app/oradata/orcl/
[oracle@localhost orcl]$ ls
control01.ctl redo01.log redo02.log redo03.log sysaux01.dbf system01.dbf temp01.dbf undotbs01.dbf users01.dbf
[oracle@localhost orcl]$
[oracle@localhost orcl]$ cp control01.ctl control03.ctl
SQL> startup
SQL> select * from v$controlfile;
STATUS NAME IS_ BLOCK_SIZE FILE_SIZE_BLKS
------- ------------------------------------------------------------ --- ---------- --------------
/home/oracle/app/oradata/orcl/control01.ctl NO 16384 594
/home/oracle/app/fast_recovery_area/orcl/control02.ctl NO 16384 594
/home/oracle/app/oradata/orcl/control03.ctl NO 16384 594