Initialization Parameter File (init) and Server Parameter File (spfile)
To start an instance, Oracle must read either an initialization parameter file (init) or a server parameter file (spfile). Init file is in text format which is human readable while spfile is in binary format.
These files contain a list of configuration parameters for that instance and database. Initialization parameters stored in a server parameter file are persistent, in that any changes made to the parameters while an instance is running can persist across instance shutdown and startup. In case of init file, we have to bounce the instance to reflect the changes.
Format: Example, database name is PROD
- initPROD.ora (initialization parameter file)
- spfilePROD.ora (server parameter file)
Location: Parameter file location in Oracle Home.
Example,
Oracle Home location (LINUX/ SOLARIS/ HP/ AIX) = /u01/app/oracle/product/12.0.1/dbhome_1
Oracle Home location for WINDOWS based = e:\app\oracle\product\12.0.1\dbhome_1
- UNIX Based: /u01/app/oracle/product/12.0.1/dbhome_1/dbs
- WINDOWS: e:\app\oracle\product\12.0.1\dbhome_1\database
Groups: Most initialization parameters belong to one of the following groups:
- Parameters that name things, such as files
- Parameters that set limits, such as maximums
- Parameters that affect capacity, such as the size of the SGA, which are called variable parameters
Content: Among other things, the initialization parameters tell Oracle:
- The name of the database for which to start up an instance
- How much memory to use for memory structures in the SGA, PGA
- What to do with filled redo log files
- The names and locations of the database control files
- The names of undo tablespaces in the database
Queries:
- Which file Oracle read first while starting instance?
spfile, in case spfile is not available, it will ready init file.
- What will happen if we delete both init file and spfile while database is running?
Nothing, but it will not start once shutdown.
- How to start database when someone accidentally deleted both parameter files?
Make new parameter file from database alert log file. Whenever database starts, it puts parameter entries in alert log file.