The Oracle spfile is a binary representation of the text0based init. ora file. by default, a new Oracle9i database will be working on a pfile, so the spfile must be created from the pfile at the SQL prompt. The spfile is created using the create spfile statement; this requires connecting as sysdba. Connect system/manager as sysdba; Create spfile from pfile; This command creates an spfile in a non-default location ($ ORACLE_HOME/database). However, you can fully-qualigfy the path name is the specified reate spfile? Statement: Create spfile = '/u01/admin/Prod/pfile/file_mydb.ora' From Pfile =/u01/admin/Prod/pfile/initprod. ora '; Warning-after an spfile is created, When you bounce the database you may encounter an error. To get around this, you have to reconnect as sysdba and use the startup command. The addition of the spfile has changed the search path for the Oracle startup deck. Oracle9i now uses the following path:
Search for the spfile $ oracle_sid.ora file in the default location,
Look for the spfile. ora; and
Search for the pfile by name init $ oracle_sid.ora.
Specifying scope in Parameters Once you have an spfile, you can change any initialization parameter with the alter system? Command. However, there is an important scope parameter that you need to understand. The scope parameter has three values memory, spfile and both. Let's look at an example of each: Alter system set db_2k_cache_size = 100 m scope = spfile; If you want to make a change to a parameter in the spfile without affecting the current instance, you can do so using the scope = spfile option of the alter System statement. this is useful when you want to make a change starting from the next startup and not for the current instance. Alter system set db_2k_cache_size = 100 m scope = memory; In the example above, the scope = memory tells Oracle9i to make the change for the life of the instance, and to change it back to the default value the next time the database is bounced. Alter system set db_2k_cache_size = 100 m scope = both; When you specify scope = both, the change will be made immediately, and Oracle will also make the change permanent, even after the database is bounced. |