When you get, give. When you Know, Share. When we Give and Share, we get and acquire more.
Monday, 8 October 2012
Create SPFILE in ASM from file system
Please find below step by step create SPFILE in ASM from file system.
Step 1) Find Current Pfile or Spfile location *
************************************
SQL> show parameter pfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string /u01/app/grid/11gR2/dbs/init+ASM2.ora
In above spfile Located in File system
***************************************************
Step 2) Create temporary pfile from spfile *
***************************************************
SQL> create pfile='/tmp/init+ASM.ora' from spfile;
File created.
*********************************************************************************
Step 3) Now Create New SPFILE in ASM from temporary Init File which is created in above step *
*********************************************************************************
create spfile='+DATA' from pfile='/tmp/init+ASM.ora';
***********************************************************
Step 4) Use asmcmd to known where ASM SPFILE is stored *
***********************************************************
ASMCMD> spget
+DATA/XXXXXXX/asmparameterfile/registry.253.778613385
(OR)
Getting full name of SPFILE on ASM
olsnodes -c : show name of cluster
OUTPUT:-
------------
olsnodes -c
XXXXXXX
set linesize 100
col FILES_OF_CLUSTER for a60
select concat('+'||gname, sys_connect_by_path(aname, '/')) FILES_OF_CLUSTER
from ( select b.name gname, a.parent_index pindex, a.name aname,
a.reference_index rindex , a.system_created, a.alias_directory,
c.type file_type
from v$asm_alias a, v$asm_diskgroup b, v$asm_file c
where a.group_number = b.group_number
and a.group_number = c.group_number(+)
and a.file_number = c.file_number(+)
and a.file_incarnation = c.incarnation(+)
) WHERE file_type in ( 'ASMPARAMETERFILE','OCRFILE')
start with (mod(pindex, power(2, 24))) = 0
and rindex in
( select a.reference_index
from v$asm_alias a, v$asm_diskgroup b
where a.group_number = b.group_number
and (mod(a.parent_index, power(2, 24))) = 0
and a.name = LOWER('&CLUSTERNAME')
)
connect by prior rindex = pindex;
Enter value for clustername:malclu01
OUTPUT:-
FILES_OF_CLUSTER
------------------------------------------------------------
+DATA/XXXXXX/ASMPARAMETERFILE/REGISTRY.253.778613385
*********************************************************************************
Step 5) In order the ASM can use the new SPFILE and we need to restart the cluster or crs on local nodes *
*********************************************************************************
crsctl stop cluster -all
crsctl start cluster -all
**************************************************
Step 6) Check NEW SPFILE LOCATION NOW *
**************************************************
ASMCMD> spget
+DATA/malclu01/asmparameterfile/registry.253.778613385
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment