extent count: fix me up

extent count: fix me up

Post by Zuin Ch » Sat, 17 Apr 1999 04:00:00



hi everyone

I'm trying to get and transfer the number of extents to each table;

update MYTABLE mt
   set "nbr_of_extents" = ( select count(extents)
                         from user_segments
                         where segment_type = 'TABLE'
                         and segment_type = mt.table_name);

Is the information I'm accessing the correct information to query from?
Is this counting the extents for each of user_tables?
help me fix it up... please

Desired result:

table_name               nbr_of_extents
__________               ______________

books_on_hand             34
customer                  13
invoice                   19

thanks Zuin

 
 
 

extent count: fix me up

Post by Andrew Bab » Sat, 17 Apr 1999 04:00:00


Zuin,

User_Segments already stores the number of extents (i.e. books_on_hand =
34), so there is no need to perform a count. There is only one row per
object in user_segments.

Rgds
Andrew


> hi everyone

> I'm trying to get and transfer the number of extents to each table;

> update MYTABLE mt
>    set "nbr_of_extents" = ( select count(extents)
>                          from user_segments
>                          where segment_type = 'TABLE'
>                          and segment_type = mt.table_name);

> Is the information I'm accessing the correct information to query from?
> Is this counting the extents for each of user_tables?
> help me fix it up... please

> Desired result:

> table_name               nbr_of_extents
> __________               ______________

> books_on_hand             34
> customer                  13
> invoice                   19

> thanks Zuin


 
 
 

1. Extent Chain Errors: How to Fix?

Greetings,

I have a SQL Server 6.5 SP4 database that is reporting the following error
in the error log:

Error 1117: [SQL Server] Extent chain for object 1724897562 is not correctly
linked.

This object turns out to be a critical core table to the apps running off
the server.  My question is...  Is there any way other than reloading the
database or dropping/recreating the table to correct this problem?  Due to
business needs, it is not feasible to do a rebuild immediately or to
recreate the table.

Also, any suggestions on how to prevent these errors?

Thanks in advance!

Michael Petersen

2. Back up to another machine

3. Best way to fix extents of Baan db?

4. How to export data automatically?

5. fixed count of records

6. SQL backend

7. select fixed count of rows

8. San Jose, CA: Paradox for DOS Contract

9. Error: 1534 Severity: 20, State: 1 Extent:15480 not found in shared extent directory

10. Extent:15480 not found in shared extent directory

11. next extent-, exist extent-question

12. Extents and next extent size

13. Extent Size and Total amount of Extents