Monday, February 28, 2011

Multiplexing control files using SPFILE OR PFILE


Multiplexing Control file using SPFILE

SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      /u02/abcprod/db/tech_st/11.2.0
                                                 /dbs/spfilePROD.ora

SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
/u01/abcprod/db/apps_st/data/cntrl01.dbf
/u01/abcprod/db/apps_st/data/cntrl02.dbf
/u01/abcprod/db/apps_st/data/cntrl03.dbf

SQL> ALTER SYSTEM SET CONTROL_FILES = '/u01/abcprod/db/apps_st/data/cntrl01.dbf'
  2  ,'/u02/abcprod/db/tech_st/11.2.0/prod_controlfile/cntrl02.dbf',
  3  '/u03/abcprod/prod_controlfile/cntrl03.dbf' SCOPE = SPFILE;

System altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>

Using cp or mv command to copy or move the control file to their location.

$ cp cntrl02.dbf /u02/abcprod/db/tech_st/11.2.0/prod_controlfile/
$ cp cntrl03.dbf /u03/abcprod/prod_controlfile/


Start the database

SQL> startup

SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
/u01/abcprod/db/apps_st/data/cntrl01.dbf
/u02/abcprod/db/tech_st/11.2.0/prod_controlfile/cntrl02.dbf
/u03/abcprod/prod_controlfile/cntrl03.dbf

SQL>


Multiplexing Control file using PFILE

Shutdown the database

Edit the control_files parameter from init_ORACLESID.ora file

control_files='/u01/abcprod/db/apps_st/data/cntrl01.dbf',
'/u02/abcprod/db/tech_st/11.2.0/prod_controlfile/cntrl02.dbf',
'/u03/abcprod/prod_controlfile/cntrl03.dbf';

save the pfile

Now move or copy the control files to their appropraite locations using cp or mv command

Start the database



No comments:

Post a Comment