Moving control file [message #445219] |
Fri, 26 February 2010 09:03 |
caprikar
Messages: 226 Registered: March 2007
|
Senior Member |
|
|
Hi,
We have 3 node oracle 10g RAC database running on Unix with ASM. I want to move the control file to a different disk group. can someone tell me what steps are involved in it?
Thanks
|
|
|
|
|
|
Re: Moving control file [message #445254 is a reply to message #445253] |
Fri, 26 February 2010 11:55 |
caprikar
Messages: 226 Registered: March 2007
|
Senior Member |
|
|
Operating System (OS) name & version for DB server system.
HP-UX 11.23
SELECT * from v$version
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for HPUX: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
|
|
|
|
|
Re: Moving control file [message #445257 is a reply to message #445256] |
Fri, 26 February 2010 12:40 |
|
Michel Cadot
Messages: 68729 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Try this:
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP NOMOUNT;
SQL> alter system set control_files='<ASM location1>,<ASM location2>' scope=spfile sid='*';
Then, use RMAN to actually create the new control files in ASM.
RMAN> restore controlfile from '<your current location>';
Regards
Michel
[Updated on: Fri, 26 February 2010 12:41] Report message to a moderator
|
|
|
Re: Moving control file [message #445260 is a reply to message #445257] |
Fri, 26 February 2010 14:24 |
caprikar
Messages: 226 Registered: March 2007
|
Senior Member |
|
|
Thanks Michel. Just want to make sure I understand it right
Step 1.
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP NOMOUNT;
SQL> alter system set control_files='<ASM NEW location1>,<ASM NEW location2>';
--We don't user spfile
$ rman nocatalog
RMAN>connect target /
RMAN> restore controlfile from '<ASM OLD location1>';
Step 2.
sql> alter database mount;
sql> alter database open;
Step 3. Change the init.ora parameter file, remove the old control file location and add new control file location
[Updated on: Fri, 26 February 2010 14:25] Report message to a moderator
|
|
|
|
Re: Moving control file [message #445579 is a reply to message #445262] |
Tue, 02 March 2010 13:52 |
babuknb
Messages: 1736 Registered: December 2005 Location: NJ
|
Senior Member |
|
|
C:\>SET ORACLE_SID=CMDB
C:\>SQLPLUS "/AS SYSDBA"
SQL*Plus: Release 10.2.0.4.0 - Production on Wed Mar 3 00:43:56 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show parameter control
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string +DATAGROUP/cmdb/controlfile/cu
rrent.260.712629463
SQL>
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'E:\CMDB_%F';
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'E:\CMDB_%F';
new RMAN configuration parameters are successfully stored
RMAN> backup current controlfile;
Starting backup at 03-MAR-10
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
channel ORA_DISK_1: starting piece 1 at 03-MAR-10
channel ORA_DISK_1: finished piece 1 at 03-MAR-10
piece handle=F:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\03L7JNQR_1_1 tag=TAG20100303T004827 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 03-MAR-10
Starting Control File and SPFILE Autobackup at 03-MAR-10
piece handle=E:\CMDB_C-1036482901-20100303-01 comment=NONE
Finished Control File and SPFILE Autobackup at 03-MAR-10
RMAN>
RMAN> shutdown immediate
database closed
database dismounted
Oracle instance shut down
RMAN> exit
Recovery Manager complete.
C:\>SET ORACLE_SID=+ASM
C:\>asmcmd
ASMCMD>
ASMCMD> cd +DATAGROUP/cmdb/controlfile
ASMCMD> pwd
+DATAGROUP/cmdb/controlfile
ASMCMD> ls
Current.260.712629463
ASMCMD> rm Current.260.712629463
ASMCMD> exit
C:\>set oracle_sid=cmdb
SQL> alter system set control_files='+FRAGROUP' scope=spfile;
System altered.
SQL> show parameter control
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string +DATAGROUP/cmdb/controlfile/cu
rrent.260.712629463
SQL> startup force nomount
ORACLE instance started.
Total System Global Area 612368384 bytes
Fixed Size 1298160 bytes
Variable Size 167772432 bytes
Database Buffers 436207616 bytes
Redo Buffers 7090176 bytes
SQL>
SQL> show parameter control
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string +FRAGROUP
SQL>
C:\>rman target /
Recovery Manager: Release 10.2.0.4.0 - Production on Wed Mar 3 00:53:24 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: CMDB (not mounted)
RMAN> restore controlfile from 'E:\CMDB_C-1036482901-20100303-01';
Starting restore at 03-MAR-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=157 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
output filename=+FRAGROUP/cmdb/controlfile/current.256.712630439
Finished restore at 03-MAR-10
RMAN> recover database;
Starting recover at 03-MAR-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=157 devtype=DISK
starting media recovery
archive log thread 1 sequence 2 is already on disk as file +DATAGROUP/cmdb/onlinelog/group_2.262.712629467
archive log filename=+DATAGROUP/cmdb/onlinelog/group_2.262.712629467 thread=1 sequence=2
media recovery complete, elapsed time: 00:00:03
Finished recover at 03-MAR-10
RMAN> alter database open resetlogs;
database opened
SQL> show parameter control
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string +FRAGROUP/cmdb/controlfile/cur
rent.256.712630439
- Babu
|
|
|