-
Which data dictionary view could you query to display the number of extents allocated to the employee table?
A. DBA_EXTENTS
B. DBA_FREE _SPACE
C. USER_TABLES
D. DBA_TABLES
E. DBA_TABLESPACES
I don't think there is a right answer!
MCSE/MCDBA, OCP DBA 8i
Working on SCJP -> SCJD
-
-
Yes, DBA_EXTENTS using the SEGMENT_NAME column for the name of the table, SEGMENT_TYPE for 'TABLE', and possibly OWNER if you knew whose schema it belonged to.
You'll have to do a little math based on the storage setting of the table, but DBA_EXTENTS will give you BYTES and BLOCKS.
Edward Haskins, OCP
OraKnowledge, Inc.
www.oraknowledge.com--"Live" Instructor-led Online Training for Oracle9i, Java and XML--
-
So we have to know the storage parameters for the table to calculate the num of extents by bytes or blocks??? I don't know if it is a real exam question, only saw it somewhere and wrote it down.
MCSE/MCDBA, OCP DBA 8i
Working on SCJP -> SCJD
-
No, you don't need any information on storage parameters of a table to get the number of its extents from the DBA_EXTENTS view. The most simple query from it will give you the answer:
SELECT COUNT(*) AS number_of_extents
FROM dba_extents
WHERE owner = 'THE_OWNER'
AND segment_name = 'THE_TABLE';
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
Thx a lot, clear now. :-) I'm still a little bit mess for data dictionary view.
MCSE/MCDBA, OCP DBA 8i
Working on SCJP -> SCJD
-
O.K., somebody smack me if I'm not seeing what JMODIC is attempting to do with the COUNT(*) above. I know it's late...1:20am (and I did drink a couple beers tonight), but COUNT(*) on the dba_extents view to obtain the number of extents allocated to a particular table?? Maybe it will make sense in the morning!
Edward Haskins, OCP
OraKnowledge, Inc.
www.oraknowledge.com--"Live" Instructor-led Online Training for Oracle9i, Java and XML--
-
he is just showing it how can you obtain number of extents from dba_extents
-
ooops, my bad...much clearer now that it's morning! ;-)
Edward Haskins, OCP
OraKnowledge, Inc.
www.oraknowledge.com--"Live" Instructor-led Online Training for Oracle9i, Java and XML--
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|