Memindahkan Control File Oracle 11g pada ASM

Tahukah anda ???

Bagaiman cara memindahkan controlfile oracle 11g pada ASM ?

1. periksa letak control_file
[oracle@rac1 ~]$ ORACLE_SID=rac1; export ORACLE_SID
[oracle@rac1 /]$ sqlplus / as sysdba
SQL> startup;
SQL> SHOW PARAMETER CONTROL_FILES;
NAME TYPE VALUE
—————————————————————————–
control_files string
+DATA1/rac/controlfile/current
.264.649098781
SQL> exit;

2. lakukan backup dengan rman
[oracle@rac1 ~]$ rman nocatalog target /
RMAN> backup current controlfile format ‘/home/oracle/control.bkp’;
Starting backup at 15-MAR-08
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 15-MAR-08
channel ORA_DISK_1: finished piece 1 at 15-MAR-08
piece handle=/home/oracle/control.bkp tag=TAG20080315T154017 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 15-MAR-08
RMAN> exit
Recovery Manager complete.

3. shutdown database dan startup dengan nomount
[oracle@rac1 /]$ sqlplus / as sysdba
SQL> shutdown immediate;
SQL> startup nomount;
SQL> exit;

4. restore controlfile ke lokasi baru
[oracle@rac1 ~]$ rman nocatalog target /
RMAN> restore controlfile to
‘+DATA3/rac/controlfile/current.264.649098781’ from
‘+DATA1/rac/controlfile/current.264.649098781’;
RMAN> exit
Recovery Manager complete.

5. periksa apakah file sudah ada di tempat yang baru ?

oracle@rac1 ~]$ ORACLE_SID=+ASM1; export ORACLE_SID
[oracle@rac1 ~]$ asmcmd -p
ASMCMD [+] > ls -la +DATA3/rac/controlfile/
Type Redund Striped Time Sys Name
CONTROLFILE UNPROT FINE MAR 15 15:00:00 Y none =>
current.258.649439353
ASMCMD [+] >

6. dari hasil no 5 ternyata nama file telah berubah dari :
current.264.649098781
menjadi :current.258.649439353

7. set dengan lokasi baru
SQL> startup nomount;
SQL> alter system set control_files=
‘+DATA3/rac/controlfile/current.258.649439353’ scope=spfile;
SQL> shutdown immediate;
SQL> startup;

8. periksa posisi controlfile sekarang
SQL> SHOW PARAMETER CONTROL_FILES;
NAME TYPE VALUE
—————————————————————————–
control_files string
+DATA3/rac/controlfile/current
.258.649439353

semoga bermanfaat.

By Setijo Agus

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s