Learn how to a build a cloud-first strategyRegister Now


DBA_Extents script

Posted on 2007-07-25
Medium Priority
Last Modified: 2008-02-01

Can ypu tell me what this script does? i need to run it after the database backup...
I am runnning  oracle 8 on window
Question by:jung1975
  • 3
LVL 143

Accepted Solution

Guy Hengel [angelIII / a3] earned 1000 total points
ID: 19568586
you run it just like that? that will just dump all the extends of that owner, excluding the very first extend_id
LVL 35

Assisted Solution

by:Mark Geerlings
Mark Geerlings earned 1000 total points
ID: 19569720
The script will simply give you a list of the records from the data dictionary view: dba_extents for the owner (schema) "test" if that object is not the first on in a tablespace.  Every Oracle database contains this view which lists: the Oracle owner/schema name; the object name; the tablespace_name; and some size information for every table and index in the database.

I cannot imagine what value this script would add.  But it can't do any harm, other than take a second or two of CPU time to answer a question that seems to have little value.
LVL 35

Expert Comment

by:Mark Geerlings
ID: 19569820
And, the version of Oracle (Oracle8 in your case) and the version of the server O/S (Windows) makes no difference.  This query works the same in any Oracle database on any O/S.

Author Comment

ID: 19570063
if the result found for query then, table must be rebuilt with larger size?
am i suppose to getting no data?
LVL 35

Expert Comment

by:Mark Geerlings
ID: 19573820
I just realized that there is an error in the query you posted.  It cannot run with "extent_id", that must be: "extents", then it can work.

No, you don't need to rebuild a table just because this query returns it.

If you get no data, that just means that one of these conditions is true:
1. There is no schema named: "test" (and if you run the query with lower case values ('test', not 'TEST') I would expect no rows to be returned because Oracle owner (schema) names are usually (if not always) uppercase values
2. The objects owned by 'TEST" all have only one extent (which is good).

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
Suggested Courses

810 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