Results 1 to 3 of 3

Thread: Database size

  1. #1
    Join Date
    Jul 2003
    Location
    Calcutta, India
    Posts
    42

    Question Unanswered: Database size

    Hi! All

    How can I get the total size of the database either using SMI tables or using any inbuilt utility.

    Thanks & Regards
    adityanlal

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

    Re: Database size

    Originally posted by adityanlal
    Hi! All

    How can I get the total size of the database either using SMI tables or using any inbuilt utility.

    Thanks & Regards
    adityanlal
    Hi adityanal,

    To get the total size of the database

    database sysmaster
    select sum(ti_nptotal), sum(ti_npused)from systabnames, systabinfowhere partnum = ti_partnumorder by 1

    Regards,

    lloyd

  3. #3
    Join Date
    Sep 2003
    Location
    Philippines
    Posts
    10

    Wink Re: Database size

    Hi
    You can also do first "onstat -d" to give you how many pages used within chunks. The page size depends on the OS (either 4K or 2K).
    To verify the page size, run "onstat -b" & "buffer size" will indicate
    the page size used. The used pages may not necessarily mean the number of pages used by your database, because it also includes pages used by other DB's (e.g. sysmaster, sysutils, etc.), unless the database is exclusive within the dbspace.

    You can also use this sql statement to get an approximate size of the
    database:
    1. run UPDATE STATISTICS to update system catalog tables.
    2. SELECT SUM(rowsize * nrows) FROM systables

    This is also approximate bec rowsize is the maximum rowsize for each row & does not include pages used by blobs in blobspaces.

Posting Permissions

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