Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    1

    Unanswered: 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?

  2. #2
    Join Date
    Aug 2003
    Location
    India
    Posts
    262

    Re: Which tables write to which dbspaces

    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

  3. #3
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •