Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Customize my SQLPlus login

RE: Customize my SQLPlus login

From: <Brian_P_MacLean_at_eFunds.Com>
Date: Tue, 26 Mar 2002 10:36:03 -0800
Message-ID: <F001.00433AE0.20020326103603@fatcity.com>

Create yourself a script called "connect.sql" that looks like:

     connect &1
     @@glogin.sql

Keep it in your SQL_PATH just like your glogin.sql. Now when you connect to something else just precede your "connect" statement with a "@" as in:

     @connect un/pw_at_db02

Can't be much easier than that.

Brian P. MacLean
Oracle DBA, OCP8i

                                                                                                                              
                    "Boivin, Patrice                                                                                          
                    J"                      To:     Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>               
                    <BoivinP_at_mar.dfo-       cc:                                                                               
                    mpo.gc.ca>              Subject:     RE: Customize my SQLPlus login                                       
                    Sent by:                                                                                                  
                    root_at_fatcity.com                                                                                          
                                                                                                                              
                                                                                                                              
                    03/26/02 10:23 AM                                                                                         
                    Please respond to                                                                                         
                    ORACLE-L                                                                                                  
                                                                                                                              
                                                                                                                              




What happens if the user then issues a connect statement to connect to another database?

It would be nice if there was a .sql file run every time a new connection is
set, I don't know if that is the case in the 8i / 9i versions.

Regards,
Patrice Boivin
Systems Analyst (Oracle Certified DBA)

-----Original Message-----

Sent:           Tuesday, March 26, 2002 10:23 AM
To:        Multiple recipients of list ORACLE-L


in your oracle /bin directory - you need to alter (Or create) a login.sql file

here's what mine looks like - feel free to alter

/* **** start **** */
set heading on
set pause off
set pages 23
set lines 100
set verify off
set feedback on
set space 1
set serveroutput on size 1000000
set echo off

set termout off
column d_bname new_value d_bname
select user ||'@'||instance_name d_bname from v$instance ;
set sqlprompt '&d_bname.> '
set termout on
set pause on
/* **** end **** */

Brian.

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: Brian_McQuillan_at_gelco.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Boivin, Patrice J
  INET: BoivinP_at_mar.dfo-mpo.gc.ca
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: Brian_P_MacLean_at_eFunds.Com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Mar 26 2002 - 12:36:03 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US