Asher/ 十月 18, 2009/ Experiments, Oracle/ 3 comments

1 Multiplexing the control file when using SPFILE Firstly, Obtain the information of your control file SQL> select * from v$controlfile;

STATUS NAME IS_ BLOCK_SIZE FILE_SIZE_BLKS
  /u01/oradata/helen/control01.ctl NO 16384 430
  /u01/oradata/helen/control02.ctl NO 16384 430

also you can issue this command show parameter control_files to get the information of your control file. Secondly, Make sure that your server is using the SPFILE SQL> show parameter spfile; Aafter this command is executed,we should get some value like this

NAME TYPE VALUE
spfile string /u01/app/oracle/dbs/spfilehelen.ora

if there is no result returned (a truly result for the VALUE column in the above table),it means that your server is now using a PFILE. :lol:  How to Multiplexing Control File when using PFILE ? We will describe it soon . Now,we will multiplex the Control File: ① Alter the SPFILE

SQL> alter system set control_files= '/u01/oradata/helen/control01.ctl','/u01/oradata/helen/control02.ctl','/u01/oradata/control03.ctl' scope=spfile;

SQL> alter system set control_files='/u01/oradata/helen/control01.ctl', '/u01/oradata/helen/control02.ctl', '/u01/oradata/control03.ctl' scope=spfile; System altered. ②  Shutdown the database SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. ③  Create the additional Control File [oracle@Linux10g ~]$ cp /u01/oradata/helen/control01.ctl /u01/oradata/control03.ctl ④  Startup the database SQL> startup; ORACLE instance started. Total System Global Area  343932928 bytes Fixed Size                  1219328 bytes Variable Size              79693056 bytes Database Buffers          260046848 bytes Redo Buffers                2973696 bytes Database mounted. Database opened. ⑤ Identifying our Control File again SQL> select * from v$controlfile;

STATUS NAME IS_ BLOCK_SIZE FILE_SIZE_BLKS
  /u01/oradata/helen/control01.ctl NO 16384 430
  /u01/oradata/helen/control02.ctl NO 16384 430
  /u01/oradata/control03.ctl NO 16384 430

NOw,we have multiplexed the Control File When using SPFILE. 2 Multiplexing the control file when using PFILE First of all, you should to know if your server is now using a PFILE ?

SQL> show parameter spfile; At here,we can get the conclusion that the server is now using a PFILE,cause the result of the value column is null.
NAME TYPE VALUE
spfile string  
 
Maybe you are confused about the result of the above SQL command,but in fact it's true.Next,
①  Shutdown the database.
②  Create Control Files at the target directory where you want multiplex and give the corrent names.
[oracle@Linux10g ~]$ cp /u01/oradata/helen/control03.ctl /u01/oradata/control04.ctl
③  Modify the PFILE ,to make it includes the Control Files which we have created just now.
Before we change the PFILE,it maybe looks like:
……
*.control_files='/u01/oradata/helen/control01.ctl','/u01/oradata/helen/control02.ctl','/u01/o
radata/control03.ctl'
……
But after we've modified the file,it as :
……
*.control_files='/u01/oradata/helen/control01.ctl','/u01/oradata/helen/control02.ctl','/u01/o
radata/control03.ctl','/u01/oradata/control04.ctl'
……
④   startup the database
SQL> startup pfile='/u01/app/oracle/dbs/pfilehelen.ora';
⑤ Identifying our Control File again,to see if  it works correctly. SQL> select * from v$controlfile;

STATUS NAME IS_ BLOCK_SIZE FILE_SIZE_BLKS
  /u01/oradata/helen/control01.ctl NO 16384 430
  /u01/oradata/helen/control02.ctl NO 16384 430
  /u01/oradata/control03.ctl NO 16384 430
  /u01/oradata/control04.ctl NO 16384 430
 
Yep,It's great.We can multiplex Oracle Control File weather the server is used a SPFILE or a PFILE.
 
顶一下
(1)
100%
踩一下
(0)
0%
Share this Post

3 Comments

  1. Thank you.I will continue to write more and more articles to log my experiences.
    BTW: banping, you are the one,you are the first one who commented on my site.

  2. 重温一下。

Leave a Comment

电子邮件地址不会被公开。 必填项已用*标注

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
*
*