Solved

Pfile and SPfile - Oracle

Posted on 2016-10-12
2
54 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
2 Comments
 
LVL 22

Accepted Solution

by:
Steve Wales earned 500 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 76

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need help with Oracle syntax 4 56
Parametric query in oracle 6 49
Oracle and DateTime math 6 25
Bash Script to Analyze Oracle Schemas 11 82
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

911 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now