Solved

tablespace schema

Posted on 2014-04-22
4
382 Views
Last Modified: 2014-04-24
How will find out the tablespaces associated with a particular schema?
0
Comment
Question by:vangogpeter
4 Comments
 
LVL 22

Accepted Solution

by:
Steve Wales earned 500 total points
ID: 40015444
To find out the default tablespace for a schema:

select username, default_tablespace from dba_users;

To find out all the objects that a schema has and where they are:

select segment_name, segment_type, tablespace_name
from dba_segments
where owner = 'SCHEMANAME';
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40015464
To add:
There really isn't a tablespace associated with a schema.  As mentioned above there is a 'default' but you shouldn't really use it.

Most databases have tablespaces for specific objects per application.  For example: tables go into a tables tablespace, indexes in another, etc...

So many schemas can share a common tablespace if so desired.

It is all up the the DBA on how it is set up.
0
 
LVL 23

Expert Comment

by:David
ID: 40015538
An aside, make the script modular if you want to reuse it.  Preface the SCHEMANAME with an ampersand "&SCHEMANAME" to be prompted each time (in SQL*Plus).
0
 

Author Closing Comment

by:vangogpeter
ID: 40020261
found out all the tablespace associated with a schema and degault..
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Converting a row into a column 2 53
Oracle SQL syntax check  without executing 6 55
Oracle encryption 12 31
Oracle Insert not working 10 28
Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
This video shows how to recover a database from a user managed backup
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question