Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How can I find out which database i'm currently in?
As well as the edited glogin I also use a script called "connect.sql" and
when I want to connect to another DB I run @connect, quite handy actually,
shows who you are logged in as as well as which DB...
script is as follows:
connect &1
set verify off
set termout off
column value new_value _sid
column user_value new_value _user
select substr(global_name,1,instr(global_name,'.') - 1) as value, user as
user_value from global_name;
set sqlprompt '&_user@&_sid>'
set termout on
set verify on
"James Williams" <willjamu_at_mindspring.com> wrote in message
news:3cba0ff9.162627231_at_nntp.mindspring.com...
> On 14 Apr 2002 04:46:30 -0700, frankzaum_at_yahoo.de (Frank Zaum) wrote:
>
> Hopefully the global name will match the db name which is not always
> the case.
>
> >couldnt you just select global_name from global_name?
> >
> >
> >Frank Zaum, Salzgitter
>
Received on Mon Apr 15 2002 - 11:11:08 CDT
![]() |
![]() |