DBA_Extents script

SELECT * FROM DBA_EXTENTS WHERE OWNER='test AND EXTENT_ID>1

Can ypu tell me what this script does? i need to run it after the database backup...
I am runnning  oracle 8 on window
jung1975Asked:
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
0
 
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.
0
 
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.
0
 
jung1975Author Commented:
if the result found for query then, table must be rebuilt with larger size?
am i suppose to getting no data?
0
 
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).
0
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.