Efficient DBA Part 1 Scripting Your Logins “Efficiency is intelligent laziness.” ~ David Dunham TCOUG
Start at the End TCOUG
Set the SQL prompt TCOUG
Always be aware of your environment TCOUG
Script the environment variables for each instance TCOUG
rlwrap TCOUG Gives capability to re-execute commands in sqlplus and rman Command history program similar to bash’s history package Installable as RPM or compile from source Gives similar behavior to sqlplus in Windows Will run in Cygwin Very robust, but simple arrow up gives last command executed to-get-a-command-history-in-sqlplus/ to-get-a-command-history-in-sqlplus/
Put environment scripts in an easily accessible location and alias the most frequently used TCOUG
Sudo prohibits and allows commands to be run TCOUG
Sudo has a verification timeout before asking for your password again TCOUG
Only requires password once, then loops and executes command once every 10 seconds Note: Your company’s security department may not like this TCOUG
Add this script to your profile script Will execute automatically on login TCOUG
Will run as long as your login PID exists TCOUG
AD/LDAP user automatic login TCOUG
Shared Key Authentication is enabled on the server by default TCOUG
Generate private and public keys with PuttyKeyGen TCOUG
Private key client authentication done by Pageant TCOUG
The key generated will look similar to this Formatted like this will work with Linux SSHD
$HOME/.ssh should be set to 700 TCOUG $HOME/.ssh/authorized_keys should be set to 600
Once the public key is added, the server is ready to accept the paired keys TCOUG
Shared Key Authentication bypasses the need for a password on login TCOUG
Desktop Log into server using share-key authentication Sudo keep-alive loop started Switch User to Oracle Set environment variables Log into sqlplus Review
When Time is Your Bottle Neck Every Second Counts! TCOUG Become an Efficient DBA Spend some time each week finding shortcuts Thank You! Seth Miller