Return-Path: <oracle-l-bounce@freelists.org>
Delivered-To: 2-oracle-l@orafaq.com
Received: (qmail 3917 invoked from network); 9 Sep 2007 00:04:41 -0500
Received: from freelists-180.iquest.net (HELO turing.freelists.org) (206.53.239.180)
  by 69.64.49.119 with SMTP; 9 Sep 2007 00:04:41 -0500
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id ABF4773B7F6;
 Sun,  9 Sep 2007 00:25:59 -0400 (EDT)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 07301-10; Sun, 9 Sep 2007 00:25:59 -0400 (EDT)
Received: from turing (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 25BD273B63D;
 Sun,  9 Sep 2007 00:25:59 -0400 (EDT)
Received: with ECARTIS (v1.0.0; list oracle-l); Sat, 08 Sep 2007 23:41:29 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 1017F73BF8A
 for <oracle-l@freelists.org>; Sat,  8 Sep 2007 23:41:29 -0400 (EDT)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 03432-03 for <oracle-l@freelists.org>;
 Sat, 8 Sep 2007 23:41:28 -0400 (EDT)
Received: from kbspmxp1.starhub.net.sg (kbspmxp4.starhub.net.sg [203.116.61.214])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 3097573BE9B
 for <oracle-l@freelists.org>; Sat,  8 Sep 2007 23:41:27 -0400 (EDT)
Received: from kbsmtao2.starhub.net.sg (kbsmtao2.starhub.net.sg [203.116.2.167])
 by kbspmxp1.starhub.net.sg (8.13.7+Sun/8.13.7) with ESMTP id l894FQQP028312
 for <oracle-l@freelists.org>; Sun, 9 Sep 2007 12:15:27 +0800 (SGT)
Received: from windows01 ([218.212.240.110]) by kbsmtao2.starhub.net.sg
 (Sun Java System Messaging Server 6.2-4.03 (built Sep 22 2005))
 with ESMTPP id <0JO30028U2PG8150@kbsmtao2.starhub.net.sg> for
 oracle-l@freelists.org; Sun, 09 Sep 2007 12:20:05 +0800 (SGT)
Date: Sun, 09 Sep 2007 12:19:54 +0800
From: Tanel Poder <tanel.poder.003@mail.ee>
Subject: RE: SQL*Plus Client on Windows
In-reply-to: <20070909003355.2B60273B709@turing.freelists.org>
To: Michael.Coll-Barth@VerizonWireless.com,
        "'oracle-l'" <oracle-l@freelists.org>
Message-id: <045801c7f298$ac9f72b0$6701a8c0@windows01>
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
Content-Type: text/plain; charset=us-ascii
X-archive-position: 1366
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-to: oracle-l-bounce@freelists.org
X-original-sender: tanel.poder.003@mail.ee
Precedence: normal
Reply-to: tanel.poder.003@mail.ee
List-help: <mailto:ecartis@freelists.org?Subject=help>
List-unsubscribe: <oracle-l-request@freelists.org?Subject=unsubscribe>
List-software: Ecartis version 1.0.0
List-Id: oracle-l <oracle-l.freelists.org>
X-List-ID: oracle-l <oracle-l.freelists.org>
List-subscribe: <oracle-l-request@freelists.org?Subject=subscribe>
List-owner: <mailto:steve.adams@ixora.com.au>
List-post: <mailto:oracle-l@freelists.org>
List-archive: <http://www.freelists.org/archives/oracle-l>
X-list: oracle-l
X-Virus-Scanned: Debian amavisd-new at localhost.localdomain

If you are using the command prompt version of Sqlplus, then you can use the
cmd.exe's TITLE command for that.

Here's my i.sql which I use both for identifying where I'm logged on before
doing any changes to database, plus it is called through login.sql. The
window title change happens on the last line:

---------------------- cut here ----------------------

define mysid=unknown

col username for a12
col i_sid head SID for a6 new_value mysid
col serial# for 999999
col opid for 999999
col spid for 999999
col host_name for a25
col i_ver head VER for a10
col i_startup_day head STARTED for a8

select 
	s.username, 
	i.instance_name, 
	i.host_name, 
	(select substr(banner, instr(banner, 'ease ')+5,10) from v$version
where rownum =1) i_ver,
	to_char(startup_time, 'YYYYMMDD') i_startup_day, 
	to_char(s.sid)		i_sid, 
	s.serial#, 
	p.spid, 
	p.pid			opid, 
	s.saddr, 
	p.addr			PADDR
from 
	v$session s, 
	v$instance i, 
	v$process p
where 
	s.paddr = p.addr
and 
	sid = (select sid from v$mystat where rownum = 1);

host title &_user@&_connect_identifier [&mysid]

---------------------- cut here ----------------------

And the output is:

SQL*Plus: Release 10.2.0.3.0 - Production on Sun Sep 9 12:16:15 2007

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options


USERNAME     INSTANCE_NAME    HOST_NAME                 VER        STARTED
SID    SERIAL# SPID            OPID SADDR    PADDR
------------ ---------------- ------------------------- ---------- --------
------ ------- ------------ ------- -------- --------
SYS          prod01           WINDOWS01                 10.2.0.3.0 20070907
148       2003 3480              19 343371B4 3425173C

SQL>


--
Regards,
Tanel Poder
http://blog.tanelpoder.com
 

> -----Original Message-----
> From: oracle-l-bounce@freelists.org 
> [mailto:oracle-l-bounce@freelists.org] On Behalf Of 
> Michael.Coll-Barth@VerizonWireless.com
> Sent: Sunday, September 09, 2007 09:09
> To: oracle-l
> Subject: SQL*Plus Client on Windows
> 
> Hi all!
>  
> This is in reference to the 10g ( 10.2.0.1.0 ) SQL*Plus 
> client for Windows ( XP for me ).
>  
> Does anyone know if there is a way to change the bar at the 
> top of the SQL*Plus client window so it will display the 
> _CONNECT_IDENTIFIER and _USER variables.  This is the same 
> bar at the top of the client's window that has the Minimize, 
> Maximize and Close boxes in the upper right of the window.  
> If its a hack, so be it...
> 
> I am constantly connecting to different instances and 
> sometimes have to type 'DEFINE' to remember where I am.  
>  
> TIA,
> Michael
>  
>  
>  
>  
>  
> 
> 
> The information contained in this message and any attachment 
> may be proprietary, confidential, and privileged or subject 
> to the work product doctrine and thus protected from 
> disclosure.  If the reader of this message is not the 
> intended recipient, or an employee or agent responsible for 
> delivering this message to the intended recipient, you are 
> hereby notified that any dissemination, distribution or 
> copying of this communication is strictly prohibited.
> If you have received this communication in error, please 
> notify me immediately by replying to this message and 
> deleting it and all copies and backups thereof.  Thank you.
> 
> --
> http://www.freelists.org/webpage/oracle-l
> 
> 

--
http://www.freelists.org/webpage/oracle-l


