Link to home
Start Free TrialLog in
Avatar of mordi
mordiFlag for Israel

asked on

Save a pfile in the same directory where the spfile is located

Hi,
I need to save a pfile in the same directory where the spfile is located, by means of the create pfile from spfile command.
The question is how to extract the directory from the spfile value in v$system_parameter, and then use it in order to create the pfile from spfile in that same directory.
Avatar of Aaron Shilo
Aaron Shilo
Flag of Israel image

hi

show parameter spfile;
select value from v$parameter where name = 'spfile';
Avatar of mordi

ASKER

I forgot to say: it should be done by a script which will be run on more than one instance.

create pfile  ='$oracle_home/database/pfileINSTANCENAME.ora' from spfile.

ASKER CERTIFIED SOLUTION
Avatar of johnsone
johnsone
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mordi

ASKER

Many thanks.
p.d. In windows you search for a backslash instead.