Solved

Pfile and SPfile - Oracle

Posted on 2016-10-12
2
33 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
Comment Utility
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)
Comment Utility
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.

Join & Write a Comment

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

763 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

10 Experts available now in Live!

Get 1:1 Help Now