1 / 22

Efficient DBA Part 1

TCOUG. 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.

winka
Download Presentation

Efficient DBA Part 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. TCOUG Start at the End

  3. TCOUG Set the SQL prompt

  4. TCOUG Always be aware of your environment

  5. TCOUG Script the environment variables for each instance

  6. TCOUG rlwrap • 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://goo.gl/EfGOl • http://utopia.knoware.nl/~hlub/rlwrap/#rlwrap • http://goo.gl/YdJN5

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

  8. TCOUG Sudo prohibits and allows commands to be run

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

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

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

  12. TCOUG Will run as long as your login PID exists

  13. TCOUG AD/LDAP user automatic login

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

  15. TCOUG Generate private and public keys with PuttyKeyGen

  16. TCOUG Private key client authentication done by Pageant

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

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

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

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

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

  22. TCOUG When Time is Your Bottle NeckEvery Second Counts! Become an Efficient DBA Spend some time each week finding shortcuts Thank You! Seth Miller vp@tcoug.org http://sethmiller.org

More Related