Server Configuration Script

  • Does anyone have a script/utility for dumping out SQL Server configuration info?  Or for configuring all the various server-level configuration values?

    I'm not talking about configuration info stored in SQL.  It's easy enough to run sp_configure or read from sysconfigures table.  But a lot of SQL Server config is stored in the registry.  If you step through each tab of the Server | Properties page, many/most of those settings are not stored in SQL.  Same for SQLAgent properties, default backup location, #errorlogs, etc.

    A crude way to get a server's configuration is to use regedit & export a few registry keys.  Convert unicode to ansi, then can use fc or windiff to compare registry exports from one server to another.  I've done this before, but at this point (while I'm still optimistic) this approach is too crude, and involves too many manual steps.

    Googled and scanned SQLServerCentral for script that got this config info, found nothing helpful.  Set out to write one using SQL-DMO objects.  I am initially put off by number of different object properties for which I'd have to hard-code (e.g. Registry, Registry2 properties).  Maybe there's a simpler way to do this w/out hard-coding all the property names?  I don't know, DMO not my forte.

    With script like this in hand logical next step would be a companion script that sets these configuration values, so we could run one script & have a server fully-configured.

    Has anyone already done this or seen something like it?  Or maybe know of a very inexpensive commercial product that does it?

  • This was removed by the editor as SPAM

  • sqldiag might do this. It's installed with SQL Server.

  • Mike,

    I was wondering if you got any help on this?

    I am in the same position and I am looking for something simpler than going through each tab and record each setting.

    Thanks

    Oscar

  • Yeah, I'm in the same boat.

    Am hanging out for an answer to this one.

    Brian

  • I wound up exporting registry sections to text files.  This was not that elegant but allowed a) ready comparison of settings between 2 servers, and b) ability to script/automate server builds. 

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply