what is difference between username and schemaname?
when i list the v$session both have same values.
-Raja
Printable View
what is difference between username and schemaname?
when i list the v$session both have same values.
-Raja
where u select username,schemaname from v$session where status='ACTIVE'; u would see that under username all the users logged into db is not displayed, but under schemaname you can see all the users loged into db.
regards
anandkl
actually what do they mean?
:confused: :confused:Quote:
Originally posted by anandkl
where u select username,schemaname from v$session where status='ACTIVE'; u would see that under username all the users logged into db is not displayed, but under schemaname you can see all the users loged into db.
regards
anandkl
i think....
Create User command creates a user.
Collection of all objects owned by this user is a schema!!
aspdba has got it...a schema is a logical concept i.e collctn. of user objects !!
Hi,
When a USER is created an empty schema is created and the USER owns the schema.
Schema is nothing but a collection of database objects associated with a particular database user
So when u execute the below command
select username,schemaname from v$session where status='ACTIVE';
USERNAME SCHEMANAME
------------------------------ ------------------------------
SYS
SYS
SYS
SYS
SYS
SYS
SYS
SYS SYS
You see that few entries under USERNAME r blank, but under SCHEMA there is an entry.So i would consider using SCHEMANAME in the query
regards
anandkl
in which case username and schemaname be different?
if never means what is the need to have 2 different columns?
-Raja
U r seeing blank for username (logged user) coz they are background processes..Quote:
Originally posted by anandkl
Hi,
When a USER is created an empty schema is created and the USER owns the schema.
Schema is nothing but a collection of database objects associated with a particular database user
So when u execute the below command
select username,schemaname from v$session where status='ACTIVE';
USERNAME SCHEMANAME
------------------------------ ------------------------------
SYS
SYS
SYS
SYS
SYS
SYS
SYS
SYS SYS
You see that few entries under USERNAME r blank, but under SCHEMA there is an entry.So i would consider using SCHEMANAME in the query
regards
anandkl
i will giv u u a scenario wher u will have username and schemaname different and then u will realize why oracle have provided username and schemaname as 2 diff cols..
create a master detail table with FK enforced on detail table with CASCASE = TRUE...
and then delete recs from Master, see continuiously wass happening with the col schemaname in v$session.
Abhay.
No..its not different,
It just for SYS users, i feel.These might be some hidden users used for DOING some internal recursive DB calls.And the schema for those users might be SYS.
regards
anandkl