There are several properties for current, minimum, maximum and peak cache size but how can I query the initial size? (Other than looking at the server's starting console log entries or checking whether option -c was contained in the engine's command line, which is available as property...) |
Hi, Volker. The server does not provide a property to query the initial cache size. It doesn't even keep track of the value after startup. |
As a workaround, one might create a DatabaseStart event that captures CurrentCacheSize when db_id() returns 0, i.e. when the database is the first started on the server. I guess that may not always return the initial cache size because the event is called when the database has been loaded which might have already adjusted the cache size - but it is good enough for my purpose... |