This content has been marked as final. Show 4 replies
I did some tests:
Connected as user1, go into workspace W1, then issue a long run query. Before the query finished, closed sqlplus, disconnected the session.
At this point, I could see the session had gone, but this user still showed in dba_workspace_sessions for this workspace. It took seconds to clean up.
Then I tried to connect with another user to try to grab the session id, to see if it's possible to grab the session id while it's still showing in dba_workspace_sessions. But either I'm not fast enough, or Oracle did check dba_workspace_sessions and wait till it's clean to let the session id to be reused.
So far I can't reproduce the error I posted.
. . . .Do you have the statement used to create the DbLink? Specifically, did it use "CONNECT TO" (and identify that user who keeps showing up in your workspaces)?
. . . .Is it possible to change the remote-user's database credentials (e.g., change username)? If so, does the remote-user still show up in your workspaces?
Yes, DBLink is using "connect to". This doesn't happen often, I should say, very seldom. I can't reproduce the problem so far.
Because there are hundres connections through this DBLink, so that I think it's just coincidently this id shows in the workspace. And I believe it's more a background process issue more than customized code because if we have to specify a workspace's name to go into it, there's no way the customized code can figure out a way to find this name of the new created workspace by some other users, and go into it.
Thanks for the reply!
The database manages all of the connections without using the dba_workspace_sessions view. So, if a connection was being used, it would not be anything Workspace Manager related. OWM just uses the provided session/transaction views to construct dba_workspace_sessions.
However, you mentioned that the user should not even be able to access the workspace. Could you list the privileges the user does have, as well as the privileges on the workspace that the user is accessing?
SQL> select * from dba_workspace_privs where workspace='<workspace>' ;
SQL> select * from dba_wm_sys_privs where grantee='<user>';
Also, are there any system logon triggers defined that are placing the user in the workspace?
There is also the possibility that there is a conflict on the distinct ids that Workspace Manager uses to obtain the lock. It would be possible for another session to issue dbms_lock.request with the same id as the one used for the particular workspace, to make it appear (through the view) that the user is in the workspace, while in reality they are not in the workspace. The user would not have any access to the data within the workspace. Are you aware of any other applications obtaining locks using the dbms_lock package that could be creating such a conflict?