IBM Support What's New?

Command how to get the size of a database

Technote (FAQ)


How to find out the size of a given database on the instance?


If your operating system is UNIX®, you can use a command to determine the size of the database for a particular instance.


Input the command as follows:

    $ oncheck -pT database_name  | grep "Total Pages" |
  awk '{ s += $3 }  END
 { print "database size is (in pages): ",s}'

    Note: The information given in this document applies to the UNIX operating system.

    $ oncheck -pT stores7 | grep "Total Pages" |
 awk '{s += $3} END
 { print "Database size is (in pages): ",s}'

    Database size is (in pages): 344

The size of the database stores7 is 344 pages.

You can convert the size of the database from pages to Kbytes. You can multiply the total amount of pages by 2KB or 4KB. One page can equal to 2KB or 4KB (KB = kilobyte = 1024 bytes = 2 10 bytes) depending on your operating system.

Related information

A Japanese translation is available

Document information

More support for: Informix Servers

Software version: 10.0, 11.1, 11.5, 11.7, 12.1

Operating system(s): Platform Independent

Reference #: 1156273

Modified date: 2014-06-26