Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: simple ? question
Stephane,
Well spoken- my bad. Our developer threw me this question when I was just
leaving from work. ( I copied from her email) Now I am at home to look it over.
I am not clear what she asked for. I think she wants to pass a variable based
on the @xxx to access this schema. I will make it clear tomorrow. Tomorrow is
going to be a long day for me. Too many projects going on at once and we have a
very tight schedule.
Thanks,
Joan
Quoting Stephane Faroult <sfaroult_at_oriole.com>:
> Joan Hsieh wrote:
> >
> > Hi Listers,
> >
> > I am trying to find a way to know the schema name. Say, if I logged in
> > as jjin01_at_ngd. When I run a program, how can I get the schema name
> > which should be "ngd"? If I logged in as bkrasnof_at_pr, in this case, the
> > schema name will be "pr".
> >
> > Thanks in advance,
> >
> > Joan
>
> Joan,
>
> Beware of vocabulary: what is usually called the 'schema name' is the
> name of the Oracle account which owns the tables.
>
> select global_name from global_name;
>
> will return the name of the database. But beware that the name of the
> database has no link to your @ngd which is just your tns alias (locally
> defined very often). Most people give as tns alias the name of the SID
> which is in turn the name of the database, but this is just a common
> sense rule - nothing mandatory here. It's usually pretty clean on Unix,
> but under NT a lot of databases have 'ORCL' has their SID, are of course
> referred to under different names in TNSNAMES.ora and _may_ not have a
> significant global name (can be changed with 'alter database').
>
> Great opportunity to set up company standards.
>
> --
> Regards,
>
> Stephane Faroult
> Oriole Software
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Stephane Faroult
> INET: sfaroult_at_oriole.com
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Joan Hsieh INET: joan.hsieh_at_tufts.edu Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Thu Oct 24 2002 - 19:23:53 CDT
![]() |
![]() |