-
I issue
Select schemaname, username from V$Session;
Why do I always get at 8 users (without name) logged on to the SYS Schema? Are these some Oracle Background processes?
My second query is more basic. How can one have more than one user in the same schema? I mean when we create an Oracle user, his schema is automatically created with the same name. So why have two different columns (Scemaname and Username) in the V$Session view?
-
Hi,
The sessions with no username are background processes. To check look at the 'type' field in the v$session table.
Are you running on Windows or NT?
Cheers
Moff.
-
Hi,
You are right about the Oracle background processes. the count depends upon the no of Oracle background processes.
The foll. command gives a count of the no. of Oracle background processes in Unix :-
ps -ef | grep ora_ | grep -v grep | wc -l
I'm not sure about the Schemaname and Username - looks pretty much the same. Can anyone throw some light on it ?
Vinit
-
Hello
Those are Oracle processes you need not worry about them.
regards
hrishy
-
Originally posted by Raminder
My second query is more basic. How can one have more than one user in the same schema? I mean when we create an Oracle user, his schema is automatically created with the same name. So why have two different columns (Scemaname and Username) in the V$Session view?
With appropriate privileges user can isue the following command: ALTER SESSION SET current_schema = [some_other_schema];
I'm not going into details why this might be usefull, but this is exactly the reason why there are two columns in V$SESSION.
If in the abowe example the connected user is SYSTEM and he isue:
ALTER SESSION SET current_schema = SCOTT;
then querying the V$SESSION for his session would return 'SYSTEM' as username and 'SCOTT' as schemaname.
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
Thanks a lot Jurij. It was indeed a revealation.
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
|