ScriptSqlConfig
ScriptSqlConfig copied to clipboard
Script SQL Server configuration information in a format suitable for DR purposes or checking into a source control system
forked from spagetidba and change in order to work (tested with success on SQL 2016). Also add /hashpasswords tag in the help
1. Run gacutil.exe from local system: ``` E:\DB_scripts>gacutil /l Microsoft.SqlServer.Smo Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.0 Copyright (c) Microsoft Corporation. All rights reserved. The Global Assembly Cache...
Use assembly binding to support running against earlier versions of SMO: https://msdn.microsoft.com/en-us/library/7wd6ex19(v=vs.100).aspx http://stackoverflow.com/questions/10176001/assembly-binding-and-redirect http://stackoverflow.com/questions/7387959/net-redirecting-requested-assemblies-to-different-version http://stackoverflow.com/questions/17092928/assembly-binding-redirect-to-a-lower-version http://stackoverflow.com/questions/1461565/upgrade-a-reference-dll-in-a-c-sharp-project-without-recompiling-the-project
Only report the items where the value is different than the default value. Capture the query from SQL Server 2008 R2 dashboard and mimic it.
Scripts for jobs contain "@schedule_uid=N'c8576cb9-a455-4894-9ad6-b1734d004d67'" row (example) which should be just omitted - job scheduling GUIDs are usually different between servers unless you restore msdb on DR from backup of...
If I'm scripting a database, run the .Script() method on the database itself so that we capture all it's properties.