Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

finding the tables within a chunk

Status
Not open for further replies.

beksalur

Technical User
Jan 2, 2003
74
TR
how can i find the names of tables within a certain chunk? Simply, i want to find which tables or table fragments a chunk contain?is there a sql statement for it?

Thanks in advance.
 
Hi,

Chunks are physical collection of data steams made up of raw or cooked file system. They are subset to dbspaces. A particular dbspace might contain several chunks attached to it. However the database server identifies the objects stored in this area in terms of dbspace name than Chunk addresses.

The following SQL statement lists the table name and the dbspace name in which it has been created.

database sysmaster;
set isolation to dirty read;

select tabname, name, trunc(partnum/1048576) fchunk, nchunks
from systabnames, sysdbspaces
where sysdbspaces.dbsnum = trunc(partnum/1048576) and
tabname not matches 'TBL*' and
tabname not matches '_temp*' and
tabname not matches 'HASH*';

Dbspace and Chunks list can be obtained by:
onstat -d

Regards,
Shriyan
 
Thanks for your reply but i want to find out exactly which chunk contain which tables.

For example the output should contain the following columns
and records:

Dbsname chunk tabname
1.) datadbs /data_3/infdata/physdev/chunk_1 ttinv700400
2.) datadbs /data_3/infdata/physdev/chunk_1 ttcom510600

.....


is it possible?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top