Monday, February 28, 2011

Multiplexing Redolog files:



Steps for Renaming Redo Log Members

Shut down the database.

SHUTDOWN

Copy the redo log files to the new location.

Operating system files, such as redo log members, must be copied using the appropriate operating system commands.


Note:

You can execute an operating system command to copy a file (or perform other operating system commands) without
exiting SQL*Plus by using the HOST command. Some operating systems allow you to use a character in place of the
word HOST. For example, you can use an exclamation point (!) in UNIX.
The following example uses operating system commands (UNIX) to move the redo log members to a new location:

mv /diska/logs/log1a.rdo /diskc/logs/log1c.rdo
mv /diska/logs/log2a.rdo /diskc/logs/log2c.rdo

Startup the database, mount, but do not open it.

CONNECT / as SYSDBA
STARTUP MOUNT

Rename the redo log members.

Use the ALTER DATABASE statement with the RENAME FILE clause to rename the database redo log files.

ALTER DATABASE
  RENAME FILE '/diska/logs/log1a.rdo', '/diska/logs/log2a.rdo'
           TO '/diskc/logs/log1c.rdo', '/diskc/logs/log2c.rdo';

Open the database for normal operation.

The redo log alterations take effect when the database is opened.

ALTER DATABASE OPEN;

Query to check that redolog files locations.

Sql> select GROUP#,member from v$logfile;




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