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...)

asked 25 Jan '18, 08:04

Volker%20Barth's gravatar image

Volker Barth
39.7k358546815
accept rate: 34%

edited 25 Jan '18, 08:07


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.

permanent link

answered 25 Jan '18, 08:13

John%20Smirnios's gravatar image

John Smirnios
11.7k394161
accept rate: 37%

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...

permanent link

answered 26 Jan '18, 04:20

Volker%20Barth's gravatar image

Volker Barth
39.7k358546815
accept rate: 34%

converted 26 Jan '18, 04:20

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×260
×26
×24

question asked: 25 Jan '18, 08:04

question was seen: 1,172 times

last updated: 26 Jan '18, 04:20