Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to determine db name for a connection
Select name
from v$database
can also check the other V$ views for additional information
Scott D. DeWitt wrote in message <384D2422.1D266F3B_at_us.ibm.com>...
>I need a way to determine the database name for a given connection. We
>have a situation in which we call a user DLL that could make a database
>connection to an Oracle database. However, in the calling application,
>we do not know the name of the database this DLL will connect to since
>it is specified by the user at runtime in the DLL. When we return to
>the calling DLL, we want to re-use the connection if it was
>established. It is easy enough to determine whether or not a connection
>exists by doing some dummy SQL and seeing if I get a -1012. However, if
>a connection does exist, I need to know the name of the database for
>this connection.
>
>Is there any way to obtain connection information about the current
>database connection if one exists?
>
>Your help would be appreciated.
>Thanks in advance,
>Scott DeWitt
Received on Tue Dec 07 1999 - 09:27:49 CST
![]() |
![]() |