05.11.2015 Views

Apress.Expert.Oracle.Database.Architecture.9i.and.10g.Programming.Techniques.and.Solutions.Sep.2005

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 3 ■ FILES 69<br />

<strong>and</strong> even data values (see the upcoming section titled “Trace Files”), <strong>and</strong> ask yourself, “Do I<br />

really want any end user to have read access to that data?” The answer is most likely no.<br />

■Caution Use undocumented parameters only at the request of <strong>Oracle</strong> Support. Their use can be damaging<br />

to a database, <strong>and</strong> their implementation can—<strong>and</strong> will—change from release to release.<br />

You may set the various parameter values in one of two ways: either for the current<br />

instance or persistently. It is up to you make sure that the parameter files contain the values<br />

you want them to. When using legacy init.ora parameter files, this is a manual process. To<br />

change a parameter value persistently when using an init.ora file, to have that new setting be<br />

in place across server restarts, you must manually edit <strong>and</strong> modify the init.ora parameter<br />

file. With server parameter files, you’ll see that this has been more or less fully automated for<br />

you in a single comm<strong>and</strong>.<br />

Legacy init.ora Parameter Files<br />

The legacy <strong>Oracle</strong> init.ora file is a very simple file in terms of its construction. It is a series of<br />

variable key/value pairs. A sample init.ora file might look like this:<br />

db_name = "ora9ir2"<br />

db_block_size = 8192<br />

control_files = ("C:\oradata\control01.ctl", "C:\oradata\control02.ctl")<br />

In fact, this is pretty close to the most basic init.ora file that you could get away with in<br />

real life. If I had a block size that was the default on my platform (the default block size varies<br />

by platform), I could remove that. The parameter file is used at the very least to get the name<br />

of the database <strong>and</strong> the location of the control files. The control files tell <strong>Oracle</strong> the location of<br />

every other file, so they are very important to the “bootstrap” process of starting the instance.<br />

Now that you know what these legacy database parameter files are <strong>and</strong> where to get more<br />

details about the valid parameters that you can set, the last thing you need to know is where to<br />

find them on disk. The naming convention for this file by default is<br />

init$ORACLE_SID.ora<br />

init%ORACLE_SID%.ora<br />

(Unix environment variable)<br />

(Windows environment variable)<br />

<strong>and</strong> by default it will be found in<br />

$ORACLE_HOME/dbs (Unix)<br />

%ORACLE_HOME%\DATABASE (Windows)<br />

It is interesting to note that, in many cases, you will find the entire contents of this parameter<br />

file to be something like<br />

IFILE='C:\oracle\admin\ora10g\pfile\init.ora'<br />

The IFILE directive works in a similar fashion to an #include in C. It includes in the current<br />

file the contents of the named file. The preceding directive includes an init.ora file from<br />

a nondefault location.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!