The forum is currently being migrated to a new host. While the migration happens, the old server is still available. Once the new machine is ready, I will copy the database to the new machine. Feel free to ask and answer questions in the meantime.

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
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
accept rate: 38%

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 25 Jan '18, 08:04

question was seen: 663 times

last updated: 26 Jan '18, 04:20