Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. 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

SQL server configuration manager is used to configure certain settings like connection protocols, service start up, etc... Is it possible to make these changes that is done in SQL server configuration manager by using TSQL statements, or in the SSMS?

share|improve this question
up vote 5 down vote accepted

Most settings that can't be done via sp_configure are registry based

So, you can use xp_instance_regread etc to change them. You'll have to find a list of registry keys yourself sorry but most are under HKLM\Software\Microsoft\Microsoft SQL Server

One examples , protocols is under


and each of these has an Enabled value

One important note: you can stop SQL Server from xp_cmdshell or using SHUTDOWN but not start it of course...

share|improve this answer

Going to have to go with the good ol' "it depends on what you want to do"

You could use the xp_cmdshell or powershell to change or start some options. For example if you want to start your SQL agent do this:

xp_cmdshell 'net start sql server agent (instancename)'

If you want to change server protocols with powershell, check out -

Powershell is like it says, powerful.

share|improve this answer
I was looking at scripting these changes so that I can distribute it to the users, rather than being physically in front of the user's computer. Thanks for the powershell link. – StanleyJohns Jun 2 '11 at 17:04
If you set up powershell right, you can ship the scripts to use a txt file for specific parameters. Have the user just give it a nice little clickly click click and bam, you'll have your settings set up. – SqlSandwiches Jun 2 '11 at 21:15

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.