Re: Which DB am I connected to?
From: Andy (Andrzej7_at_hotmail.com)
Date: 01/20/05
- Next message: Zoury: "Re: Which DB am I connected to?"
- Previous message: Norm: "How to tell if Desktop visible"
- In reply to: Zoury: "Re: Which DB am I connected to?"
- Next in thread: Zoury: "Re: Which DB am I connected to?"
- Reply: Zoury: "Re: Which DB am I connected to?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 20 Jan 2005 11:36:31 -0800
Thanks, that works :)
I was snooping around the database (a little knowledge and
a few passwords are really dangerous... ) and have tried
this, too:
select * from GLOBAL_NAME;
I just don't know which one is more reliable?
--- Andy
>-----Original Message-----
>Hi Andy! :O)
>
>give this query a try :
>---
>select sys_context('userenv', 'db_name') from dual;
>---
>
>--
>Best Regards
>Yanick
>"Andy" <Andrzej7@hotmail.com> a écrit dans le message de
>news:0c8001c4ff21$c46bf6b0$a401280a@phx.gbl...
>> It is not really a VB question, but I will try
anyway....
>>
>> I have some stored procedures in ORACLE that run outside
>> my VB 6 app. When I connect to my DB from VB I know
which
>> DB I access.
>>
>> My stored procedures (in PL/SQL) run either against Test
>> or Production database. Sometimes there are small
>> differences that need to be implemented depending which
DB
>> I run my stored proc from, and I don't want to make
these
>> changes every time I move from test to production - I
just
>> have to remember to do the changes, and if somebody else
>> will have to do it in the future they may not know what
to
>> change. And I am not crazy about putting all of the
>> changes in comments.....
>>
>> I can get date by: select sysdate from dual
>> I can get user by: select user from dual
>>
>> Is there any way to know which DB I am accessing in
PL/SQL?
>>
>> like:
>> Select WHAT from dual ?
>>
>> To get either Test or PROD?
>>
>> --- Andy
>
>
>.
>
- Next message: Zoury: "Re: Which DB am I connected to?"
- Previous message: Norm: "How to tell if Desktop visible"
- In reply to: Zoury: "Re: Which DB am I connected to?"
- Next in thread: Zoury: "Re: Which DB am I connected to?"
- Reply: Zoury: "Re: Which DB am I connected to?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|