Wednesday, 17 November 2010

SQL 2008 - Restrict Memory Use

Sometimes it seems like SQL is using far too much memory and making the server itself very unresponsive. This is because SQL is designed to grab as much physical memory as it can, and it's very slow to release it back if the system gets overloaded (if indeed it ever does - don't start me on that one!).

So on, say, an 8GB system, you really want to restrict SQL to only using say 6GB. Then we have plenty of headroom for the SQL console, ApexSQL log, backups and any other software you need.

To do this, execute the following SQL commands:
EXEC sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE
EXEC sp_configure 'max server memory (MB)', 6000
RECONFIGURE WITH OVERRIDE

Monday, 15 November 2010

VMWare Server / Windows - Cannot Lock File

We tried to move a couple of WVWare VMs today to a new copy of VM Server (because the old hardware had failed). The server errored, telling us that it couldn't lock the (copied) files.

Solution: delete any .lck files/folders from the VM folder and it works!