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

Mike,



Was this enhancement implemented?   If so, how does one access this information?



I get this question about "how much data do we have in our SN instance" occasionally.



Thanks,
Jeff


Well, look at that: the enhancement was actually cancelled, hah.



I think something got mixed up (possibly during one of the HI upgrades/transitions) because the Caller and original Created date were apparently lost on the ticket.



However, this hasn't really come up for us over the last four years, so I'm afraid I won't have any answers for you. Good luck!


gaidem
ServiceNow Employee
ServiceNow Employee

You could do a character count.


HugoFirst
Kilo Sage

I can post this short message, but I get a error saying I'm logged off if I post a 20 line reply.


What gives? I tried summarizing my reply in 5 lines and I get the same error.   Sigh...


How about I try this in multiple replies?   ( Sorry for being terse, but maybe that's the point! )


Step 1: Choose a set of tables that you want to index.


Step 2: Use the record number of the last record to estimate the number of records in the table.