DBA_Extents script


Can ypu tell me what this script does? i need to run it after the database backup...
I am runnning  oracle 8 on window
Who is Participating?
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you run it just like that? that will just dump all the extends of that owner, excluding the very first extend_id
Mark GeerlingsDatabase AdministratorCommented:
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.
Mark GeerlingsDatabase AdministratorCommented:
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.
jung1975Author Commented:
if the result found for query then, table must be rebuilt with larger size?
am i suppose to getting no data?
Mark GeerlingsDatabase AdministratorCommented:
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).
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.