login script
Date: 1995/03/30
Message-ID: <3lfbot$nve_at_lucy.infi.net>#1/1
I'm always asking questions, so I thought I'd post a helpful script I use
to set my sqlprompt var to tell me the time, server, and dbname. It's
really useful if you have multiple instances and servers and are
continually connecting all over the place across SQL*Net.
login.sql
set term off
set trim off
set feedback off
set echo off
set output off
column name1 new_value prompt1
column name2 new_value prompt2
select name name1 from v$database;
select substr(program,instr(program,'_at_')+1,instr(program,'
')-1-instr(program,'_at_')) name2 from v$process where program like
'%SMON%';
set sqlprompt "(&&prompt2)-&&prompt1 SQL> "
set time on
set pause "PRESS RETURN TO CONTINUE > "
set feedback on
set term on
criticism welcome.
-- Glenn Travis DBA Circuit City Stores, Inc. Richmond, VA USA gtravis_at_richmond.infi.net gtravis_at_aol.comReceived on Thu Mar 30 1995 - 00:00:00 CEST