11.2.0.4
Redhat linux
Just did an RMAN restore to move a DB to a new server.
I am having issues moving the spfile to ASM. I can't figure out what I am doing wrong.
Only thing I change in the init.ora is set cluster_database=true. I did a restore, then set cluster_database=true, after spfile moves to ASM, I add to RAC with srvctl. One thing I see is that the init.ora on the OS has the instance number at the end, but I create an spfile without an instance number
I was able to open the DB with reset logs. Migration worked.
My steps to move the spfile to ASM
-- shutdown immediate before this
-- trued created the SPFILE the same way as below before startup nomount same issue
-- DB starts, but uses spfile from $ORACLE_HOME/dbs
Steps
- Startup nomount pfile=’mynewinit.ora’ -- pfile i have from after the migration.
- Show parameter sp to show no spfile
- Create spfile from pfile=’mynewinit.ora’
- Shutdown immediate
- Startup nomount
- Show parameter spfile. Showing spfile being used from file system and not ASM?
Show parmeter. No SPFILE (after step 1)
spfile string
-- create spfile in ASM
create spfile='+DATA01/mynewdb/spfilemynewdb.ora' from pfile='/mypath/mynewdb_pfile_after_restore.ora';
File created.
-- check again to see if there is an spfile.
SYS@bdctmqa1 AS SYSDBA > show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string
-- BOUNCE THE DB
SYS@mynewdb AS SYSDBA > shutdown immediate
SHUTDOWN IMMEDATE
SYS@mynewdb AS SYSDBA > startup nomount -- also tried starting up completely.
ORACLE instance started.
Total System Global Area 1570009088 bytes
Fixed Size 2253584 bytes
Variable Size 788532464 bytes
Database Buffers 754974720 bytes
Redo Buffers 24248320 bytes
-- check again still use OS spfile?
-- See instance number at the end of the spfile?
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string /myoraclehome/dbs/spfilemynewdb1.ora
Select name from v$database; -- verify DB name does not have '1' at the end
name
----
mynewdb