Lokeshaggarwal's DBA

Live the life you love. Love the life you live

Controlfile Multiplexing using ASM


SQL> show parameter control

NAME                                 TYPE        VALUE
———————————— ———– ——————————
control_file_record_keep_time        integer     7
control_files                        string      +DATA/dbtest/controlfile/curre
nt.261.720140771
SQL> alter system checkpoint;

System altered.

SQL> select name from v$controlfile;

NAME
——————————————————————————–
+DATA/dbtest/controlfile/current.261.720140771

SQL> alter system set control_files=’+DATA/dbtest/controlfile/current.261.720140771′,’+DATA’ scope=spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.

Total System Global Area  167772160 bytes
Fixed Size                  2019288 bytes
Variable Size              88080424 bytes
Database Buffers           71303168 bytes
Redo Buffers                6369280 bytes
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options
-bash-3.2$ export ORACLE_SID=+ASM
-bash-3.2$ asmcmd
ASMCMD> cd data
ASMCMD> cd dbtest
ASMCMD> ls
ARCHIVELOG/
CONTROLFILE/
DATAFILE/
FLASHBACK/
ONLINELOG/
PARAMETERFILE/
TEMPFILE/
spfiledbtest.ora
ASMCMD> cd controlfile
ASMCMD> ls
Current.260.720140773
Current.261.720140771
backup.311.723005013
backup.324.722927111
ASMCMD> ls -l
Type         Redund  Striped  Time             Sys  Name
CONTROLFILE  HIGH    FINE     JUN 29 05:00:00  Y    Current.260.720140773
CONTROLFILE  HIGH    FINE     JUN 30 02:00:00  Y    Current.261.720140771
CONTROLFILE  HIGH    FINE     JUN 30 02:00:00  Y    backup.311.723005013
CONTROLFILE  HIGH    FINE     JUN 29 05:00:00  Y    backup.324.722927111
ASMCMD> exit
-bash-3.2$ sqlplus “/as sysdba”

SQL*Plus: Release 10.2.0.1.0 – Production on Wed Jun 30 02:45:48 2010

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

alte
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options
-bash-3.2$ export ORACLE_SID=dbtest
-bash-3.2$ sqlplus “/as sysdba”

SQL*Plus: Release 10.2.0.1.0 – Production on Wed Jun 30 02:46:12 2010

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> alter database open;

Database altered.

SQL> alter system set control_files=’+DATA/dbtest/controlfile/current.261.720140771′,’+data/dbtest/controlfile/backup.311.723005013′ scope=spfile;

System altered.

SQL> select name from v$cnotrolfile;
select name from v$cnotrolfile
*
ERROR at line 1:
ORA-00942: table or view does not exist

SQL> select name from v$controlfile;

NAME
——————————————————————————–
+DATA/dbtest/controlfile/current.261.720140771
+DATA/dbtest/controlfile/backup.311.723005013

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

Total System Global Area  167772160 bytes
Fixed Size                  2019288 bytes
Variable Size              92274728 bytes
Database Buffers           67108864 bytes
Redo Buffers                6369280 bytes
Database mounted.
Database opened.
SQL> select name from v$controlfile;

NAME
——————————————————————————–
+DATA/dbtest/controlfile/current.261.720140771
+DATA/dbtest/controlfile/backup.311.723005013

SQL>

Advertisements

June 30, 2010 - Posted by | ASM

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: