-
user session ID
if I have a regular user who only have CONNECT, RESOURCE grant to him, how can he see ONLY his own session ID without seeing any other session ID.
If SYS grant him SELECT on v$SESSION, he will see all of the session ID in the database which I don't want that.
what I need to do for that user only see his own session???
thanks
-
-
SQL> create user mike identified by mike;
User created.
SQL> grant connect,resource to mike;
Grant succeeded.
SQL> conn mike/mike
Connected.
SQL> select * from v$session;
select * from v$session
*
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> select * from v$mystat;
select * from v$mystat
*
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> conn system/manager
Connected.
SQL> grant select on v$mystat to mike;
grant select on v$mystat to mike
*
ERROR at line 1:
ORA-01031: insufficient privileges
SQL> conn sys/oracle
Connected.
SQL> grant select on v$mystat to mike;
grant select on v$mystat to mike
*
ERROR at line 1:
ORA-02030: can only select from fixed tables/views
-
Code:
SQL> conn mike/mike
Connected.
SQL> SELECT SYS_CONTEXT('USERENV','SESSIONID') from dual;
SYS_CONTEXT('USERENV','SESSIONID')
-----------------------------------------------------------
1388
-
I was going to say and I agree with Stecal and Thank you Pando as always
Last edited by mike2000; 12-12-2002 at 03:16 PM.
-
Originally posted by stecal
SQL> create user mike identified by mike;
User created.
SQL> grant connect,resource to mike;
Grant succeeded.
SQL> conn mike/mike
Connected.
SQL> select * from v$session;
select * from v$session
*
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> select * from v$mystat;
select * from v$mystat
*
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> conn system/manager
Connected.
SQL> grant select on v$mystat to mike;
grant select on v$mystat to mike
*
ERROR at line 1:
ORA-01031: insufficient privileges
SQL> conn sys/oracle
Connected.
SQL> grant select on v$mystat to mike;
grant select on v$mystat to mike
*
ERROR at line 1:
ORA-02030: can only select from fixed tables/views
SQL> grant select on v_$mystat to lsc;
Grant succeeded.
v$mystat is synonym not table or view
sessionid is not SID rather AUDSID in v$session, if you want aidsid then fine, if you want sid then it's incorrect
-
Pando you are awesome, wish I know as much as you. As always is joy reading your posts
-
Originally posted by pando
SQL> grant select on v_$mystat to lsc;
Grant succeeded.
v$mystat is synonym not table or view
I know I knew that; why didn't I do that?
-
Originally posted by Sweetie
Pando you are awesome, wish I know as much as you. As always is joy reading your posts
agree, short and precise answers
-
I agree 110% with you guys about Pando's knowledge. They used to have couple guy in here like Pando too but I haven't seen them lately b/c I guess they get discouraged by some silly questions or the laziness of not look into the doc before asking in here.
I hope guys like Pando Jeff is going to be here for a while
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|