Link to home
Start Free TrialLog in
Avatar of walkerdba
walkerdba

asked on

tablespace location

How would I find the tablespace of a particular schema?

Please help..
ASKER CERTIFIED SOLUTION
Avatar of Steve Wales
Steve Wales
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of walkerdba
walkerdba

ASKER

SQL> select tablespace_name from dba_ts_quotas where username = 'SCOTT';

no rows selected

SQL> select tablespace_name from dba_ts_quotas where username ='SCOTT';

no rows selected

SQL>

Why it is like this.....?
This means that SCOTT has no tablespace as his default and has no quotas on any tablespaces.

If you want to see the tablespaces you do have:

select * from dba_tablespaces;
select * from dba_data_files;
select * from dba_temp_files;
How can a schema sit nowhere without tablespace?
Scott should be somewhere right?

My mission is to find out which tablespace SCOTT..
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
As slightwv mentioned, a schema in Oracle is just a user that owns objects.

It is possible to create a user that does not have any objects (and hence, all of the above queries would return nothing).

johnsone also makes a valid point, you'd need to check dba_sys_privs (to see which users have that system privilege):

select * from dba_sys_privs where privilege = 'UNLIMITED TABLESPACE';

It sounds like you misunderstand what a schema is in Oracle.  It is a different concept to SQL Server, for example.

It is very possible to have users without objects in Oracle.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I've requested that this question be closed as follows:

Accepted answer: 0 points for walkerdba's comment #a38731912

for the following reason:

yes
>> closed by accepting walkerdba's comment #a38731912 (0 points) as the solution for the following reason:  yes

I'm afraid I'll have to object to the way you want to close this.
Please accept the post or posts that assisted you in answering the question.

I suggest a split of the points since it appears several posts helped.