(BAll of the following solutions assume that you have added the prompt
(Bmodification code to your $ORACLE_HOME/sqlplus/admin/glogin.sql file.
(BPersonally I think that is playing with fire and keep a private glogin.sql
(Bfile and the path to it in my $SQLPATH.
(B
(BMake sure the $ORACLE_HOME/sqlplus/admin directory is in your $SQLPATH,
(Bthen once connected do @glogin to reset your path
(B
(Bor
(B
(BOnce you are reconnected type @?/sqlplus/admin/glogin
(B
(Bor
(B
(BCreate a script called connect.sql, place it in your $SQLPATH, then enter
(B@connect username/password@whereever;  the text of connect.sql should be:
(B
(B      connect &1
(B      @?/sqlplus/admin/glogin
(B
(B
(B
(B
(B
(B                                                                                       
(B                                             
(B                      "shuan.tay\(PCI$BE"(B                                          
(B                                                   
(B                      $Bc2?(B\)"                  To:       Multiple recipients of 
(Blist ORACLE-L <[EMAIL PROTECTED]>                
(B                      <[EMAIL PROTECTED]        cc:                                     
(B                                             
(B                      .id>                     Subject:  Re: how to make sql prompt 
(Blike USER@DATABASE> ?                           
(B                      Sent by:                                                         
(B                                             
(B                      [EMAIL PROTECTED]                                                 
(B                                             
(B                                                                                       
(B                                             
(B                                                                                       
(B                                             
(B                      02/17/03 04:53 PM                                                
(B                                             
(B                      Please respond to                                                
(B                                             
(B                      ORACLE-L                                                         
(B                                             
(B                                                                                       
(B                                             
(B                                                                                       
(B                                             
(B
(B
(B
(B
(Bmm...
(Bwhat if i logged in with SYSTEM first then "conn sys/pswd@db"?
(Bit's still show SYSTEM @db.
(B ----- Original Message -----
(B From: Rajesh Dayal
(B To: Multiple recipients of list ORACLE-L
(B Sent: Saturday, February 15, 2003 6:53 PM
(B Subject: RE: how to make sql prompt like USER@DATABASE> ?
(B
(B You can add following lines to your glogin.sql ($ORACLE_HOME/sqlplus/admin
(B directory) file.
(B
(B set heading off
(B set term off
(B set feedback off
(B spool myprompt.sql
(B select 'set sqlprompt "' || SYS_CONTEXT ('USERENV', 'session_user') || '@'
(B || SYS_CONTEXT ('USERENV', 'DB_NAME') || '>"'
(B from dual
(B /
(B spool off
(B @myprompt.sql
(B set heading on
(B set term on
(B set feedback on
(B
(B Alternatively you can create a file with above lines, put that file in bin
(B and call it anytime to make your prompt$B!D(B
(B
(B Cheers,
(B Rajesh
(B
(B       ----Original Message-----
(B       From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
(B       Salaheldin Aboali
(B       Sent: Saturday, February 15, 2003 2:14 PM
(B       To: Multiple recipients of list ORACLE-L
(B       Subject: how to make sql prompt like USER@DATABASE> ?
(B
(B
(B
(B       hi
(B
(B
(B       how to make sql prompt like USER@DATABASE> ?
(B
(B
(B       where USER: connected user
(B
(B
(B       DATABASE: database global name, or database local alias
(B       Regards,
(B       Salaheldin Aboali
(B       -------------------------------------------
(B       Senior Software Developer
(B       Management Information Systems
(B       http://www.mis-kuwait.com
(B       Phone:
(B       +965.240.64.25
(B       +965.240.67.98
(B       +965.240.80.92
(B       Ext. 235
(B       Fax. +965.240.81.53
(B       Cell. +965.790.31.65
(B
(B
(B
(B
(B-- 
(BPlease see the official ORACLE-L FAQ: http://www.orafaq.net
(B-- 
(BAuthor: 
(B  INET: [EMAIL PROTECTED]
(B
(BFat City Network Services    -- 858-538-5051 http://www.fatcity.com
(BSan Diego, California        -- Mailing list and web hosting services
(B---------------------------------------------------------------------
(BTo REMOVE yourself from this mailing list, send an E-Mail message
(Bto: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
(Bthe message BODY, include a line containing: UNSUB ORACLE-L
(B(or the name of mailing list you want to be removed from).  You may
(Balso send the HELP command for other information (like subscribing).


Reply via email to