Recently i came across a problem while creating spfile from pfile in RAC. Due to a wrongly added parameter in spfile db was unable to start. I created PFILE from SPFILE on local drive of one node.
SQL> create pfile=’d:\temp\initRACTEST.ora’ from pfile=’+DATA/RACTEST/spfileRACTEST.ora’
I changed the wrongly configured parameter sga_target to appropriate value and then created SPFILE from PFILE.
SQL > create spfile=’+DATA’ from pfile=’d:\temp\initRACTEST.ora’;
Now i checked directory from asmcmd
C:\Users\farhat>asmcmd -p
ASMCMD [+DATA] > ls
DB_UNKNOWN/
TESTRAC/
ASMCMD [+DATA] > cd db_unknown
ASMCMD [+DATA/db_unknown] > ls
PARAMETERFILE/
ASMCMD [+DATA/db_unknown] > cd parameterfile
ASMCMD [+DATA/db_unknown/parameterfile] > ls
SPFILE.259.858334053
OOPS….Something went wrong. Directory should be +DATA/RACTEST/PARAMETERFILE but here a new direcotry created with name DB_UNKNOWN
Lets delete it.
ASMCMD [+DATA/db_unknown/parameterfile] > rm *.*
You may delete multiple files and/or directories.
Are you sure? (y/n) y
ASMCMD [+DATA/db_unknown/parameterfile] > cd +data
ASMCMD [+data] > ls
TESTRAC/
after Google for a while i found that as instance was not started that’s why DB_UNKNOW direcotry is created and file is placed under this directory.
Lets start instance with pfile in nomount state
C:\Users\farhat>set oracle_home=D:\app\Oracle\product\11.2.0.4.0\dbhome_1
C:\Users\farhat>set oracle_sid=TESTRAC1
C:\Users\farhat>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Sep 15 09:49:12 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> create spfile=’+DATA’ from pfile=’d:\temp\testracp.txt’;
File created.
SQL> startup nomount pfile=’d:\temp\testracp.txt’;
ORACLE instance started.
Total System Global Area 1.0689E+10 bytes
Fixed Size 2290648 bytes
Variable Size 3355446312 bytes
Database Buffers 7314866176 bytes
Redo Buffers 16871424 bytes
SQL> show parameter spfile
NAME TYPE VALUE
———————————— ———– ——————————
spfile string
SQL> create spfile=’+DATA’ from pfile=’D:\temp\testracp.txt’;
File created.
Lets check file path again from asmcmd
C:\Users\farif>asmcmd -p
ASMCMD [+] > ls
DATA/
FLASH/
OCRVOTE/
OCRVOTENEW/
ASMCMD [+] > cd data
ASMCMD [+data] > ls
TESTRAC/
ASMCMD [+data] > cd testrac
ASMCMD [+data/testrac] > ls
CONTROLFILE/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
TEMPFILE/
ASMCMD [+data/testrac] > cd parameterfile
ASMCMD [+data/testrac/parameterfile] > ls
spfile.259.858334859
ASMCMD [+data/testrac/parameterfile] > exit
C:\Users\farif>srvctl modify database -d testrac -p +DATA/TESTRAC/PARAMETERFILE/spfile.259.858334859
C:\Users\farif>srvctl config database -d testrac
Database unique name: TESTRAC
Database name: TESTRAC
Oracle home: D:\app\Oracle\product\11.2.0.4.0\dbhome_1
Oracle user: nt authority\system
Spfile: +DATA/TESTRAC/PARAMETERFILE/spfile.259.858334859
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: TESTRAC
Database instances: TESTRAC1,TESTRAC2
Disk Groups: DATA,FLASH
Mount point paths:
Services:
Type: RAC
Database is administrator managed
C:\Users\farif>srvctl start database -d testrac