Command how to get the size of a database

Technote (FAQ)


Question

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

Answer

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


STEPS

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.


    Example:
    $ 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.

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Informix Servers

Software version:

10.0, 11.1, 11.5, 11.7, 12.1

Operating system(s):

UNIX

Reference #:

1156273

Modified date:

2013-04-03

Translate my page

Machine Translation

Content navigation