There are many different parameter files associated with an Oracle database, from a tnsnames.ora file on a client workstation (used to “find” a server on the network), to a listener.ora file on the server (for the network listener startup), to the sqlnet.ora, cman.ora, and ldap.ora files, to name a few.
The most important parameter file, however, is the database’s parameter file—without this, we can’t even get an instance started. The remaining files are important; they are all related to networking and getting connected to the database. However, they are beyond the scope of our discussion.
For information on their configuration and setup, I refer you to the Database Net Services Administrator’s Guide. These files are typically set up by the DBA (and not the developer).
The parameter file for a database is commonly known as an init file, or an init. ora file. This is due to its historic default name, which is init<ORACLE_SID>.ora. I call it “historic” because Oracle has since implemented a vastly improved method of storing parameter settings for the database: the server parameter file, or simply SPFILE.
This file has the default name of spfile<ORACLE_SID>.ora. We’ll take a look at both kinds of parameter files.
Note For those who are unfamiliar with the term SID or ORACLE_SID, a full definition is called for. The SID is a site identifier. It and ORACLE_HOME (where the Oracle software is installed) are hashed together in UNIX/Linux to create a unique key name for creating or attaching a Shared Global Area (SGA) memory region.
If your ORACLE_SID or ORACLE_HOME is not set correctly and you are using a local (not network based) connection, you’ll get the ORACLE NOT AVAILABLE error, since you can’t attach to a shared memory segment that is identified by this unique key.
On Windows, shared memory isn’t used in the same fashion as on UNIX/Linux, but the SID is still important. You can have more than one database under the same ORACLE_HOME, so you need a way to uniquely identify the instance associated with each one, along with their configuration files.
Without a parameter file, you can’t start an Oracle database. This makes the parameter file fairly important, and Oracle’s backup and recovery tool Recovery Manager (RMAN) recognizes this file’s importance and will allow you to include the server parameter file (but not the legacy init.ora parameter file type) in your backup set.
However, since the init.ora file is simply a plain text file that you can create with any text editor, it is not a file you have to necessarily guard with your life.
You can re-create it, as long as you know what was in it (e.g., you can retrieve that information from the database’s alert log, if you have access to that, and reconstruct your entire init.ora parameter file).
We will now examine both types of database startup parameter files (init.ora and SPFILE) in turn, but before we do that, let’s see what a database parameter file looks like.