Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Pfile and SPfile - Oracle

Posted on 2016-10-12
2
Medium Priority
?
127 Views
Last Modified: 2016-10-12
Hi,

  I have a few questions regarding Pfile and SPfile.    I am a bit confuse.

  a) How can i check if my database was started using spfile or pfile ?

  b) How can i check if both the Pfile and SPfile has the same configuration ?

  c) When starting a database using the sqlplus command "start"  --- does it uses the spfile or the pfile ?

  d) Where is the location of the spfile and the pfile ?

  e)  Does the Init file is the same as the pfile ?

  f)  When executing "Show Parameters " using SqlPlus  , it gets the information from the Pfile or from SPfile ?

Regards,

 Joe.
0
Comment
Question by:joe_echavarria
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
Steve Wales earned 2000 total points
ID: 41840408
a) Tom Kyte answers that one here: https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:6644781942843

Basically there's a system view v$spparameter that you can query - if all settings are false, no SPFILE, if any are true then yes, SPFILE.

You could also do "show parameter spfile" - if there's a value there, that's the spfile you started the instance with.

b) Only way I could think of would be to create a text version of your spfile:  create pfile=xx.txt from spfile - and compare to your pfile.

c) If an spfile exists in the default location it uses that, else pfile if it's in the default location

d) $ORACLE_HOME/dbs for Unix, %ORACLE_HOME%\database for Windows (same default for both pfile/spfile)

e) Yes, different name for the same thing.

f) It gets information from whichever of the parameter files you started the instance with.  By the time the instance is started, those parameters are in memory and that's what you're running the instance with.   That's what show parameter reports.
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 41840566
To add to the above post:

c) unless you specify the location on the start command itself.

d) it can be outside of the default location if the DBA wants it to be.

f) it also shows current values for your session.  

For example:
show parameter nls_date_format

That is the current format for your session.

If you:  alter session set nls_date_format='MM-DD-YYYY';

You will see that format and not the one in the pfile/spfile.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question