Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

User Tablespace Association (Beginner)

Shashank KaneriaFeb 10 2014 — edited Feb 11 2014

Hi everybody,

I was working on 11gR2 database and executed two queries. Following is the problem I faced:

SQL> select username, default_tablespace from dba_users where username = 'HR';

USERNAME     DEFAULT_TABLESPACE                              

------------           -------------------                       

HR                   USERS                                           

SQL> select distinct owner, tablespace_name from dba_segments where owner= 'HR';

OWNER      TABLESPACE_NAME                                                     

----------         -----------------                                     

HR               EXAMPLE

Both query have given me the different tablespace name.

I want to know which tablespace and datafile associated to which user (this is what i wanted to do, to find out user,tablespace_name,datafile).

Can anybody explain me the difference between above queries? I am still not able to understand.

And can you please provide me the appropriate query to find out the user, his tablespace and corresponding datafile.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 11 2014
Added on Feb 10 2014
15 comments
7,344 views