Presentation is loading. Please wait.

Presentation is loading. Please wait.

Efficient DBA Part 1 Scripting Your Logins “Efficiency is intelligent laziness.” ~ David Dunham TCOUG.

Similar presentations


Presentation on theme: "Efficient DBA Part 1 Scripting Your Logins “Efficiency is intelligent laziness.” ~ David Dunham TCOUG."— Presentation transcript:

1 Efficient DBA Part 1 Scripting Your Logins “Efficiency is intelligent laziness.” ~ David Dunham TCOUG

2 Start at the End TCOUG

3 Set the SQL prompt TCOUG

4 Always be aware of your environment TCOUG

5 Script the environment variables for each instance TCOUG

6 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 http://sysdba.wordpress.com/2006/10/08/how-to-use-rlwrap- to-get-a-command-history-in-sqlplus/ http://sysdba.wordpress.com/2006/10/08/how-to-use-rlwrap- to-get-a-command-history-in-sqlplus/ http://goo.gl/EfGOl http://utopia.knoware.nl/~hlub/rlwrap/#rlwrap http://goo.gl/YdJN5

7 Put environment scripts in an easily accessible location and alias the most frequently used TCOUG

8 Sudo prohibits and allows commands to be run TCOUG

9 Sudo has a verification timeout before asking for your password again TCOUG

10 Only requires password once, then loops and executes command once every 10 seconds Note: Your company’s security department may not like this TCOUG

11 Add this script to your profile script Will execute automatically on login TCOUG

12 Will run as long as your login PID exists TCOUG

13 AD/LDAP user automatic login TCOUG

14 Shared Key Authentication is enabled on the server by default TCOUG

15 Generate private and public keys with PuttyKeyGen TCOUG

16 Private key client authentication done by Pageant TCOUG

17 The key generated will look similar to this Formatted like this will work with Linux SSHD

18 $HOME/.ssh should be set to 700 TCOUG $HOME/.ssh/authorized_keys should be set to 600

19 Once the public key is added, the server is ready to accept the paired keys TCOUG

20 Shared Key Authentication bypasses the need for a password on login TCOUG

21 Desktop Log into server using share-key authentication Sudo keep-alive loop started Switch User to Oracle Set environment variables Log into sqlplus Review

22 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 vp@tcoug.org http://sethmiller.org


Download ppt "Efficient DBA Part 1 Scripting Your Logins “Efficiency is intelligent laziness.” ~ David Dunham TCOUG."

Similar presentations


Ads by Google