Right, or that is how it *should* be anyway :)

Take a look at the following:

SQL> create user test identified by test default tablespace users quota
unlimited on users;

User created.

SQL> grant connect to test;

Grant succeeded.

SQL> desc V$Instance
 Name                                      Null?    Type
 ----------------------------------------- -------- -------------------
 INSTANCE_NUMBER                                    NUMBER
 INSTANCE_NAME                                      VARCHAR2(16)
 HOST_NAME                                          VARCHAR2(64)
 VERSION                                            VARCHAR2(17)
 STARTUP_TIME                                       DATE
 STATUS                                             VARCHAR2(7)
 PARALLEL                                           VARCHAR2(3)
 THREAD#                                            NUMBER
 ARCHIVER                                           VARCHAR2(7)
 LOG_SWITCH_WAIT                                    VARCHAR2(11)
 LOGINS                                             VARCHAR2(10)
 SHUTDOWN_PENDING                                   VARCHAR2(3)
 DATABASE_STATUS                                    VARCHAR2(17)
 INSTANCE_ROLE                                      VARCHAR2(18)

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
sales

SQL> connect test/test@sales
Connected.
SQL> select instance_name from v$instance;
select instance_name from v$instance
                          *
ERROR at line 1:
ORA-00942: table or view does not exist

SQL> connect sys/sys@sales
Connected.
SQL> create view instance as select instance_name from v$instance;

View created.

SQL> create public synonym instance for sys.instance;

Synonym created.

SQL> connect test/test@sales;
Connected.
SQL> select * from instance;

INSTANCE_NAME
----------------
sales

This is just one work around that I can think of now, not sure of any others
that there may be though..

HTH

Mark

-----Original Message-----
Kumar Muthu Kumaran
Sent: Thursday, September 20, 2001 13:50
To: Multiple recipients of list ORACLE-L


i cann't access V$ views as an ordinary user, rt?....

> -----Original Message-----
> From: Cale, Rick T (Richard) [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, September 20, 2001 3:20 PM
> To:   Multiple recipients of list ORACLE-L
> Subject:      RE: How to find the current instance name?
>
> You probably want to do the following.  v$database.name is the database
> name
> not the instance name. Although
> most name the same but not required.
>
> SELECT instance FROM v$thread;
>
> Rick
>
> -----Original Message-----
> Sent: Thursday, September 20, 2001 6:55 AM
> To: Multiple recipients of list ORACLE-L
>
>
> List,
>
> How to find the current instance name for the session?.
>
> From svrmgrl, i can using "SELECT name FROM v$database".
>
> What is the equivalant from the ordinary user?
>
> Regards
> Nirmal.
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Nirmal Kumar  Muthu Kumaran
>   INET: [EMAIL PROTECTED]
>
> Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California        -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (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: Cale, Rick T (Richard)
>   INET: [EMAIL PROTECTED]
>
> Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California        -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (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: Nirmal Kumar  Muthu Kumaran
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (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: Mark Leith
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (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).

Reply via email to