DBA best practices: Configuring SQL*Plus

SQL*Plus is a powerful tool with lots of options, but out-of-the-box it’s a little clumsy. Gladly, there is the login.sql file which you can edit and will run automatically whenever you connect to a database. To edit the file, just type “ed login” (without quotes).

These are the options I use, in case you’re interested:

set pages 1000
set lines 350
set appinfo ‘Valter_Rehn: DBA@Brasil’
set serveroutput on size 1000000
set long 1000000
set feedback 5
set verify off
set trimspool on
set sqlprompt “_user _privilege’@’_connect_identifier> ”
set time on
set timing on
col bytes for 999,999,999,999 head Bytes
col username for a15 trunc

If you’re in doubt about any of these commands you can call for help – just type help and the command, like “help set”.

And there is also this nice post that has details about configuring the DOS version of SQL*Plus, which is of great help to avoid the default small b&w window 🙂 .

Advertisements
This entry was posted in Best Practices, Oracle and tagged , . Bookmark the permalink.

One Response to DBA best practices: Configuring SQL*Plus

  1. vitorjr81 says:

    Hello Master!
    I will copy this entire blog! hahaha
    Big hug!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s