Solved

tablespace schema

Posted on 2014-04-22
4
385 Views
Last Modified: 2014-04-24
How will find out the tablespaces associated with a particular schema?
0
Comment
Question by:vangogpeter
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 77

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

688 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