Solved

Pfile and SPfile - Oracle

Posted on 2016-10-12
2
108 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 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 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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
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.
Suggested Courses

634 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