HiveBrain v1.2.0
Get Started
← Back to all entries
snippetsqlModerate

How to compare two SQL Server 2008 configurations

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
2008sqlconfigurationstwohowservercompare

Problem

I have a problem with my application that works on my dev SQL Server 2008 (Developer Edition), but not on a production SQL Server 2008. Is there an easy way to export the settings from the production server and compare it to my server configuration?

What I found out is that I can export Facets in SQL Server Management Studio to XML files and compare them in a diff tool.

Is there any other/better way to export and compare settings of two SQL Server instances?

Solution

You really just have to get creative. As we all know, there are many places that settings are stored, depending on what exactly you're looking to compare. For instance, to compare instance-wide configuration settings, you can simple do an EXCEPT query (you may have to create a linked server, or export/import the data depending on how you want to approach that):

select *
from [YourProdInstance].master.sys.configurations

except

select *
from [YourDevInstance].master.sys.configurations


Use this same type of methodology for all other configuration settings that you will want to compare.

  • Find the root of the config data



  • Get both instances' config data in a common place



  • Write a query that will compare the data (whether it is XML, or not)

Code Snippets

select *
from [YourProdInstance].master.sys.configurations

except

select *
from [YourDevInstance].master.sys.configurations

Context

StackExchange Database Administrators Q#19924, answer score: 13

Revisions (0)

No revisions yet.