Welcome to the Perl DBA Toolkit. This code was developed and written as we wrote the book Perl for Oracle DBAs, by Andy Duncan and Jared Still (O'Reilly & Associates, 2002). The PDBA Toolkit is a collection of Perl modules and scripts designed to help Oracle DBAs. The toolkit contains scripts of many different types. For example, you will find scripts used to set up a password server for securely retrieving passwords over the network. (pwd.conf, pwd.pl, pwc.pl pwc.conf). You will also find scripts to add and remove users, dump schemas into CSV files complete with SQL*Loader control files for loading the data (sqlunldr.pl), and a wide variety of other helpful scripts. The toolkit also contains a number of modules created in support of the scripts. You can use these in developing your own scripts if you wish: PDBA::CM: Database Connection Manager PDBA::ConfigFile: Configuration File locate and load PDBA::DBA: A number of methods to work with the Oracle Data Dictionary PDBA::Daemon: Create Daemons on Unix systems PDBA::GQ: The Generic Query module. Simple module for single table queries PDBA::LogFile: Create logfiles and write time-stamped log entries PDBA::OPT: Used to pass command-line options to the PDBA::PWC module PDBA::PWC: Password server client module PDBA::PWD: Password server module PDBA::PidFile: Used to create locked semaphore files The toolkit also contains Win32/NT specific versions of a few of the modules and scripts (e.g., PWDNT.pm). The Win32/NT modules and scripts only appear in the Win32 distribution of this toolkit (identified by the inclusion of 'NT' in the file name). For example, PDBA_1_0_Win32.tar.gz is the Win32/NT distribution, whereas PDBA-1.0.tar.gz is the Unix distribution. The main source of documentation for this code is the book. This README does not attempt to describe how to install and use the toolkit. However, there is also quite a bit of documentation included in the modules themselves You can view this documentation via the 'perldoc' command (e.g., perldoc PDBA::CM) Many of the scripts and modules make use of configuration files. These files are actually Perl code used to create data structures. They are fairly well documented in the configuration files themselves. Even if you don't know Perl well (yet), these should be simple to set up. If you have ever set up an Oracle TNSNAMES.ORA file, you should be able to set up a toolkit configuration file. You can check them for syntactical correctness via perl -cw myfile.conf. Installation of the toolkit is fairly straightforward. On Unix systems, you will use the standard: perl Makefile.PL make test make install On Win32, you will simply install via ActiveStage's PPM. Some of the tests you will need to run as a DBA account, or at least an account with 'SELECT ANY TABLE' privilege. Before running 'make test', set the environment variable ORACLE_USERID to the account name and password of a DBA account. For example: On Unix: export ORACLE_USERID='system/manager' On Win32/NT: set ORACLE_USERID="system/manager" If you're on Win32, you may have problems with the the Win32::TieRegistry module as follows: Win32::TieRegistry errors "cannot FETCH blah, blah, blah at line 1486 of Tie::Registry.pm" Be sure to use a version of 0.24+. 0.23 will not work properly. Requirements The following modules must be installed for the toolkit to work: DBI DBD::Oracle DDL::Oracle Crypt::RC4 Date::Format Date::Manip Digest::MD5 Mail::Sendmail These are all available via CPAN, http://search.cpan.org On Win32 systems, you must also have the following module: Win32::Daemon This can be downloaded from CPAN, or from www.roth.net. Bugs, Comments, Change Requests: Send requests for new functionality to pdbarfc@yahoo.com Send bug reports to pdbabugs@yahoo.com Patches are welcome for both. :) A Final Note You may find a few scripts in the distribution that don't appear in the book. It wasn't possible to put everything in the book, and we keep coming up with new ideas for scripts. :)