3.4 OracOrac is a tool developed by one of your authors, Andy Duncan. It is based on Perl/Tk and its many widgets, and it employs Perl DBI to connect to the Oracle database. It is basically a GUI wrapper containing a large repository of prepared, configurable SQL scripts that allow Oracle DBAs to interrogate and manage their databases. Using Orac, users can rapidly apply these scripts to any target databases without having to copy them from one machine to another via complicated directory structure installs and environment variable setups. If these scripts are no longer up-to-date because of changes to the Oracle data dictionary, they can be modified or changed directly within the repository. Orac makes it easy for you to make changes to the scripts.
3.4.1 Installing OracYou can download the Orac tarball from here: 3.4.1.1 Installing Orac on UnixOnce Orac has been downloaded, unpack it, and set the environment. Once this is completed, we can then simply run it with a single command: $ gzip -d Orac-alpha-1.2.6.tar.gz $ tar xvf Orac-alpha-1.2.6.tar $ cd Orac-alpha-1.2.6 Before you actually run the program, make sure your environment can run both ordinary Perl DBI and Perl/Tk scripts. Ensure that ORACLE_HOME is set to make sure DBD::Oracle works correctly, underneath Perl DBI. $ export ORACLE_HOME=/u01/oracle/8.1.5 3.4.1.2 Installing Orac on Win32For Win32, simply unpack the tarball into its own directory with your favorite unzip program. If you have Perl DBI and Perl/Tk both working on your machine, Orac should be ready to fire up straight out of the box, once you've personalized it as described in the next section. (You may have to set ORACLE_HOME via the Registry, the system environment, or AUTOEXEC.BAT in order to get Perl DBI connecting to Oracle properly.) 3.4.2 Personalizing OracOn a server system, Orac allows each of its users to save his or her own personalized options, such as font, background color, and so on. It then stores these in various locations depending upon the operating system:
Alternatively, personal options can be stored in a named directory. To do this, set the following environment variable before running the program on Unix: $ export ORAC_HOME=/my_personal_options_directory/orac_profile To carry out a similar operation on Win32 (especially if you're on a non-USERPROFILE system like Win98), edit your AUTOEXEC.BAT file to preset your environment when booting up: DOS> set ORAC_HOME=C:\Temp\Orac 3.4.3 Running OracWithin the Win32 environment, double-click on the orac_dba.pl program icon, or on either Unix or Win32 command lines, run the following command: $ perl orac_dbal.pl Because Orac also works with other databases, the first time you log in to the program, choose Oracle as your default database. Following the subsequent user login dialog, you'll be given access to a wide range of menu-driven options designed for an Oracle DBA (see Figure 3-9) summarized in Table 3-1. Figure 3-9. Some of the options under Orac |