2 Spfiles during restoration through RMAN on a different server

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

2 Spfiles during restoration through RMAN on a different server

Cyborg
Hi,

I have restored the spfile using the command:
RMAN> restore spfile from '..../___.bkp'

Now I have 2 spfiles (one from the already created db and the other that is restored) in  .../dbs directory.
If i run the command:

create pfile from spfile;

i want it to take the spfile that was restored from the backup. What is the right way to do this?

Regards
Reply | Threaded
Open this post in threaded view
|

Re: 2 Spfiles during restoration through RMAN on a different server

ErmanArslansOracleBlog
Administrator
Put the restored spfile in the correct place.
Restart the db, and your spfile that was restored from the backup, will be used. by Oracle.
Reply | Threaded
Open this post in threaded view
|

Re: 2 Spfiles during restoration through RMAN on a different server

Cyborg
Isnt ORACLE_HOME/dbs/___spfile.ora the default path for the file?

It is already there with an other spfile.
Reply | Threaded
Open this post in threaded view
|

Re: 2 Spfiles during restoration through RMAN on a different server

Cyborg
In reply to this post by ErmanArslansOracleBlog
can i create the pfile by

sql> CREATE PFILE FROM SPFILE = '/path/of/the/restored/file/spfile.ora'

??
Reply | Threaded
Open this post in threaded view
|

Re: 2 Spfiles during restoration through RMAN on a different server

ErmanArslansOracleBlog
Administrator
In reply to this post by Cyborg
It may change according to your env.
You may be using ASM .. what is os and what is the Oracle version ...

Anyways, execute

sqlplus "/as sysdba"

Then execute;

SQL > show parameter spfile (this will show you your current spfile location)

Then, shutdown your database, backup your current spfile; put your restored spfile to this location with the same name as the current spfile), start your database..
Reply | Threaded
Open this post in threaded view
|

Re: 2 Spfiles during restoration through RMAN on a different server

Cyborg
Both servers are oracle linux 7. Backup is of the 11g and i am restoring it on 12c.

the command:
SQL > show parameter spfile

didnt give any value/path for the spfile. Does it mean it isn't using any?
Reply | Threaded
Open this post in threaded view
|

Re: 2 Spfiles during restoration through RMAN on a different server

Cyborg
In reply to this post by ErmanArslansOracleBlog
and no. i am not using ASM
Reply | Threaded
Open this post in threaded view
|

Re: 2 Spfiles during restoration through RMAN on a different server

ErmanArslansOracleBlog
Administrator
If your "show parameter spfile" returns an empty output, you are not currently using a spfile.
So your database is currently using a pfile.

Put your spfile in $ORACLE_HOME/dbs folder, with the appropriate name.
Restart your db and your database will use that spfile.

The name of the sfile should be spfile<SID>.ora

Ex: If your ORACLE_SID=TEST, then spfile should be named as spfileTEST.ora
Reply | Threaded
Open this post in threaded view
|

Re: 2 Spfiles during restoration through RMAN on a different server

Cyborg
i restarted the db after putting the spfile in the told location.
now i am getting:

ORA-00845: MEMORY_TARGET not supported on this system.
Tried resolving that it gave umount target is busy.
Reply | Threaded
Open this post in threaded view
|

Re: 2 Spfiles during restoration through RMAN on a different server

ErmanArslansOracleBlog
Administrator
Memory target required /dev/shm.

If you want to use memory target, then configure your OS accordingly..

If you don't want to use memory target, you can replace that parameter with sga_max_target and sga_max_size parameters..
Reply | Threaded
Open this post in threaded view
|

Re: 2 Spfiles during restoration through RMAN on a different server

Cyborg
i increased the /dev/shm  now its giving
ORA-27102-out of space
linux error 12: cannot allocate memory

How can i replace memory target with sga_max_target and sga_max_size parameters?
Reply | Threaded
Open this post in threaded view
|

Re: 2 Spfiles during restoration through RMAN on a different server

ErmanArslansOracleBlog
Administrator
If you have enough ram, then you need to increase the kernel parameters according to your memory_target.

"Some" of the Kernel parameters are:

semmsl
semmns
semopm
semmni
shmall
shmmax --> this limits your shared memory.. In order to adress the shared memory, this should be set to an appropriate value according to your memory_target...


Why don't you follow a guide?

You are asking the fundementals here..
Reply | Threaded
Open this post in threaded view
|

Re: 2 Spfiles during restoration through RMAN on a different server

Cyborg
yeah i know.
i was hoping i would get short and to the point solution from the forum.
Well, i think during oracle work it's actually the experience(which i lack) with the fundamentals that is a quick problem-solver.

I really appreciate your in-time responses.

Regards