Chapter 10. Performing Routine DBA Tasks with the PDBA Toolkit

The Perl DBA Toolkit we introduced and installed in Chapter 9 contains dozens of Perl scripts that you can use to simplify — and even automate — the many routine tasks that Oracle DBAs wrestle with every day. We use these scripts daily in our own database administration work, and we think you will find that they make your work much more efficient.

This chapter focuses on the repetitive operations that Oracle DBAs tend to perform over and over again. In the following chapters we’ll focus on a few more specialized tasks: in Chapter 10 we’ll show how you can monitor your database using the toolkit scripts, and in Chapter 11 we’ll build a repository for storing database information.

If you have installed the PDBA Toolkit as described in Chapter 9, all of the scripts mentioned in this chapter will be on your system. If you’re running on a Unix system, you’ll find them in /usr/local/bin, and if you’re using Win32, you’ll find them in C:\Perl\bin (unless you chose alternative locations during the installation). We’ll examine the scripts in the following categories:

Managing user accounts

We’ll use the create_user.pl, create_user.conf, drop_user.pl, dup_user.pl, mucr8.msg, and mucr.pl scripts and files to create single users and groups of users, to drop users, and to perform account maintenance.

Maintaining indexes

We’ll use the idxr.pl and index_frag_test.sql scripts and files to inspect, tune, and rebuild database indexes. ...

Get Perl for Oracle DBAs now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.