Solved

tablespace schema

Posted on 2014-04-22
4
383 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

Independent Software Vendors: 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

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
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.

733 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