|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Finding
a file on your Oracle server One
of the most confounding tasks for the Oracle professional is locating
relevant file on the Oracle server. These
files include trace files needed for diagnostics, locating the Oracle
alert log file, and locating miscellaneous files on the server. Some
of the common uses for the file location include:
Fortunately,
the UNIX syntax for locating files is constant on Linux, HP/UX, AIX and
Solaris, and uniform between Korn Shell Bourne shell and Bourne Again
Shell (bash). UNIX: find . –print|grep –I alert|more WINDOWS: dir /s alert*.log|more Finding
the most recent files in a directory Once
you have located the directory for a trace or dump file, the next step is
to locate the most recent file in the directory. UNIX: ls –alt *.trc|head WINDOWS dir *.trc/O-D|more You
can also use SQL*Plus scripts to accept values and use the SQL*Plus
“host” command to shell-out to the operating system to locate files.
Here is an example of such a script: prompt “please enter the name of the file to find: “ accept &filename host find / -print|grep –I &filename If
you like Oracle tuning, you might enjoy my latest book “Oracle Tuning: The DefinitiveReference” by Rampant TechPress. (I don’t think it is right to charge a fortune for books!) and you
can buy it right now at this link: http://www.rampant-books.com/book_1002_oracle_tuning_definitive_reference_2nd_ed.htm
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||