If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Which tables write to which dbspaces

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-31-04, 17:49
Daedalus Daedalus is offline
Registered User
 
Join Date: Mar 2004
Posts: 1
Which tables write to which dbspaces

I need to know what command I can run to get a read out of all tables which write to a particular dbspace. Can anyone help?
Reply With Quote
  #2 (permalink)  
Old 03-31-04, 21:53
lloydnwo lloydnwo is offline
Registered User
 
Join Date: Aug 2003
Location: India
Posts: 262
Re: Which tables write to which dbspaces

Quote:
Originally posted by Daedalus
I need to know what command I can run to get a read out of all tables which write to a particular dbspace. Can anyone help?
Hi,

Run this sql -

database sysmaster;
select tabname, trunc(systabnames.partnum/1048576) dbspace,
sysdbspaces.name
from systabnames,sysdbspaces
Where sysdbspaces.dbsnum = trunc(systabnames.partnum/1048576)
and systabnames.owner="Owner"

-- where Owner is the name of the user

Regards,

Lloyd
Reply With Quote
  #3 (permalink)  
Old 04-03-04, 12:16
RobP RobP is offline
Registered User
 
Join Date: Mar 2004
Location: Netherlands
Posts: 183
You could also do the following:

database sysmaster;
select tabname, dbinfo("DBSPACE",partnum)
from systabnames
where systabnames.owner="Owner"

The big idea is the same, only you use the internally built in function dbinfo instead of joing with sysdbspaces.


Greetz,


Rob Prop
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On