Eğer Oracle RAC opsiyonunu kullanıyor iseniz ve spfile’ in path’ ini değiştirmemiz gerekirse aşağıdaki adımları uygulayarak spfile ‘inizi farklı bir ASM diskgroup altına taşıyabilirsiniz.
Öncelikle herhangi bir path’ e initfile oluşturuyoruz ;
SQL> create pfile=’/u01/gi/oragrid/grid/11.2.0.4/dbs/initASM_move.ora’ from spfile;
File created.
Database’ i kapatıyoruz ;
[oragrid@Redhat701 ~]$ srvctl stop database -d tpdb
Sonrasında tek bir node ‘ dan database ‘ i mount modda açıyoruz;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
[oracle@Redhat701 dbs]$ sqla SQL*Plus: Release 11.2.0.4.0 Production on Tue May 26 14:41:54 2015 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to an idle instance. SQL> startup mount pfile ='/u01/ora/db/11.2.0.4/dbs/init_tpdb_kamil.ora'; ORACLE instance started. Total System Global Area 5227814912 bytes Fixed Size 2262368 bytes Variable Size 2936015520 bytes Database Buffers 2264924160 bytes Redo Buffers 24612864 bytes Database mounted. |
Spfile’ i olmasını istediğimiz path’ de create ediyoruz ;
SQL> create spfile=’+DATA02_0000′ from pfile=’/u01/ora/db/11.2.0.4/dbs/init_tpdb_kamil.ora’;
File created.
ASM üzerinden file’ i kontrol edebiliriz ;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
[oragrid@Redhat701 ~]$ asmcmd ASMCMD> cd DATA02* ASMCMD> ls TPDB/ test01-cluster/ ASMCMD> cd TPDB* ASMCMD> ls PARAMETERFILE/ ASMCMD> cd PARA* ASMCMD> ls spfile.257.880728233 ASMCMD> ls -l Type Redund Striped Time Sys Name PARAMETERFILE UNPROT COARSE MAY 26 14:00:00 Y spfile.257.880728233 ASMCMD> ls -l Type Redund Striped Time Sys Name PARAMETERFILE UNPROT COARSE MAY 26 14:00:00 Y spfile.257.880728233 ASMCMD> pwd +DATA02_0000/TPDB/PARAMETERFILE ASMCMD> |
Database’ i shutdown edelim ;
SQL> shu immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> exit
Database ‘i start etmeden önce son olarak srvctl komutu yeni spfile ‘imizin yerini burda da set edelim;
[oracle@Redhat701 dbs]$ srvctl modify database -d tpdb -p +DATA02_0000/tpdb/spfiletpdb.ora
[oracle@Redhat701 dbs]$
Database’ i açıp kontrol edelim ;
1 2 3 4 5 6 7 8 9 |
[oracle@Redhat701 dbs]$ srvctl start database -d tpdb [oracle@Redhat701 dbs]$sqla SQL> sho parameter spfile NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ spfile string +DATA02_0000/tpdb/spfiletpdb.ora SQL> |
Artık spfile’ imizi yeni lokasyonuna taşımış olduk.
Reference;
Recreating the Spfile for RAC Instances Where the Spfile is Stored in ASM (Doc ID 554120.1)