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.

70<br />

CHAPTER 3 ■ FILES<br />

It should be noted that the parameter file does not have to be in any particular location.<br />

When starting an instance, you may use the pfile=filename option to the startup comm<strong>and</strong>.<br />

This is most useful when you would like to try out different init.ora parameters on your database<br />

to see the effects of having different settings.<br />

Legacy parameter files can be maintained by using any plain text editor. For example, on<br />

UNIX/Linux, I would use vi; on the many Windows operating system versions, I would use<br />

Notepad; <strong>and</strong> on a mainframe, I would perhaps use Xedit. It is important to note that you are<br />

fully responsible for editing <strong>and</strong> maintaining this file. There are no comm<strong>and</strong>s within the<br />

<strong>Oracle</strong> database itself that you can use to maintain the values contained in the init.ora file.<br />

For example, when you use the init.ora parameter file, the issue of an ALTER SYSTEM comm<strong>and</strong><br />

to change the size of an SGA component would not be reflected as a permanent change<br />

in the init.ora file. If you would like that change to be made permanent—in other words, if<br />

you would like it to be the default for subsequent restarts of the database—it is up to you to<br />

make sure all init.ora parameter files that might be used to start this database are manually<br />

updated.<br />

The last interesting point of note is that the legacy parameter file is not necessarily<br />

located on the database server. One of the reasons the stored parameter that we’ll discuss<br />

shortly was introduced was to remedy this situation. The legacy parameter file must be present<br />

on the client machine attempting to start the database, meaning that if you run a UNIX<br />

server, but administer it using SQL*Plus installed on your Windows desktop machine over the<br />

network, then you would need the parameter file for the database on your desktop.<br />

I still remember how I made the painful discovery that the parameter files are not stored<br />

on the server. This goes back many years to when a br<strong>and</strong>-new tool called SQL*DBA was introduced.<br />

This tool allowed us to perform remote operations (specifically, remote administrative<br />

operations). From my server (running SunOS at the time), I was able to connect remotely to a<br />

mainframe database server. I was also able to issue the “shutdown” comm<strong>and</strong>. However, it<br />

was at that point I realized that I was in a bit of a jam—when I tried to start up the instance,<br />

SQL*DBA would complain about not being able to find the parameter file. I learned that these<br />

parameter files—the init.ora plain text files—were located on the machine with the client,<br />

not on the server. SQL*DBA was looking for a parameter file on my local system with which to<br />

start the mainframe database. Not only did I have no such file, but I also had no idea what to<br />

put into one to get the system started up again! I didn’t know the db_name or control file locations<br />

(even just getting the correct naming convention for the mainframe files would have<br />

been a bit of stretch), <strong>and</strong> I didn’t have access to log into the mainframe system itself. I’ve not<br />

made that same mistake since; it was a painful lesson to learn.<br />

When DBAs realized that the init.ora parameter file had to reside on the client’s machine<br />

that starts the database, it led to a proliferation of these files. Every DBA wanted to run the<br />

administrative tools from his desktop, <strong>and</strong> so every DBA needed a copy of the parameter file<br />

on his desktop machine. Tools such as <strong>Oracle</strong> Enterprise Manager (OEM) would add yet<br />

another parameter file to the mix. These tools would attempt to centralize the administration<br />

of all databases in an enterprise on a single machine, sometimes referred to as a “management<br />

server.” This single machine would run software that would be used by all DBAs to start<br />

up, shut down, back up, <strong>and</strong> otherwise administer a database. That sounds like a perfect<br />

solution: centralize all parameters files in one location <strong>and</strong> use the GUI tools to perform

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

Saved successfully!

Ooh no, something went wrong!