Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm building VMs centrally and distributing subtly tweaked versions to different people. I've been doing this by mounting the virtual hard disk and editing files. I'm pretty confident I can do something similar with the registry. The next subtle tweak I'd like to make is to the SQL memory allocations.

I know you can change this by running a stored proc, but is there any way to do it that would work while the machine is offline? If not, is there a way I can push a sql command onto a queue somewhere so that it gets run the next time SQL starts up?

Much obliged,


share|improve this question
up vote 1 down vote accepted

What you can do is use the stored procedure sp_procoption to run a specified sp at startup. In this procedure you'll have to read your values from the registry, file or other linked server.

See: sp_procoption


share|improve this answer

You can run a stored procedure on startup - see Your stored procedure could then read in parameters from the file system. Bit nasty though.

share|improve this answer

A fun way to do this across many machines using the power of SQL 2008 is by using the new policy based management. Create a policy that sets the max memory to a number of your choosing. Apply your policy against the target server and your setting will change. If you don't have a SQL 2008 instance in-house yet you can download the 180-day trial of Enterprise Edition and try it out.

Try SQL 2008:

Policy Based Management team blog (great resource):

Blog regarding PBM against 2000/2005 servers:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.