Finding Size of Instance Database

Mike McCall
Giga Guru

Is there a way to see the size of the database being used for your instance? Before I open a support ticket with this question, I thought I'd check if anyone knew an on-demand method available to administrators.

Obviously, I would appreciate granularity (size per table, etc.), but even just a single number would be great (e.g., "your instance's database is currently 1.2 GB").

1 ACCEPTED SOLUTION

nyancer3
Tera Expert

I realize this is an older thread, but I had a similar question posed to me in regard to sizing an on-prem database for replicating the instance data for reporting usage.

I am not sure exactly what version introduced it, but there is now a count gauge on the Instance Usage > Application Usage Overview page that shows the current total size of the database for your instance. If you edit the widget and go into the code for the counter, you can see the API used to gather the metric: SNC.UsageAnalyticsScriptUtils.getCount('Primary DB size (MB)', 'Primary DB size of this instance (in MB)');

Hope that helps.

find_real_file.png

View solution in original post

27 REPLIES 27

PriyankaC
Kilo Expert

This was a really useful thread and I was able to find the "current" size of my Database. How can I determine the max size of database that I can scale up to ? Are there any limits on the # of records that I can have in a single custom table ?

The max size of your db is depending of your contract. The size can be scaled in the DC and SN is taking care - you only need to pay for it 😉

There is no real limit of records, but if you store too many records in one table you will decrease the performance of the table. You can avoid this by creating indexes and/or table extension.

Here is a good explanation of table rotation and expansion: https://community.servicenow.com/community?id=community_question&sys_id=cdda0b6ddb5cdbc01dcaf3231f96199a#:~:text=Basic%20difference%20between%20table%20rotation,based%20on%20a%20extension%20schedule

You can also archive and/or delete not needed records from the table. Be aware that with using the SN internal archiving solution you will not decrease the size of your instance db.

Dhanraj Poojari
Mega Guru

More recent documentation on finding the DB size sorted by tables is shared below . This works if you have access to the Support(HI) portal

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0819668