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?
"Glen A Stromquist" <gstrom_at_nosppamtelusplanet.net> wrote in message
news:q4Yt8.10421$6G4.218921_at_news1.telusplanet.net...
> select name from v$database
>
> better yet, configure your sqlplus prompt to show which db you are in by
> editing your glogin.sql script, you can even have it show who you are
logged
> in as. A google search will bring you lots of possibilities here
There is an FAQ on this at Jonathan Lewis' site. Bear in mind that ifd (like me) you issue
conn username/password_at_newdb alias
then the glogin does NOT get rerun and your sql prompt is giving you misleading information. There are workarounds but I don't trust myself to be doing something in development , connect to prod just to make sure the schema hasn't altered in dev and so my code is valid, get interrupted by the phone or whatever come back note the prompt fail to reconnect to dev and run the code on prod. It is obviously personal preference just thought I'd raise the possibility.
-- Niall Litchfield Oracle DBA Audit Commission UK ***************************************** Please include version and platform and SQL where applicable It makes life easier and increases the likelihood of a good answer ******************************************Received on Mon Apr 15 2002 - 02:48:03 CDT