This code will allow you to generate RedGate Multiscript Distribution Lists dynamically based on a list of databases in a view
- Replace all of the VALUES lines in dbo.View_DBConnectionConfig with the correct values for your system
- Alter the VALUES lines in dbo.dbo.View_RedgateMultiScriptDatabaseGroups to have the correct values for the distribution lists you want to create
- You can keep the current GroupGuid values, as long as they remain unique
- AdditionalAvailableGroupGuids.txt has more guids already generated from MultiScript
- There are comments at the top of this view indicating what to do if you need more GroupGuid values than the view currently has
- Update the allowed environment values in
- dbo.View_Environment
- Constants.cs (Environment_Codes, Environment_ShortNames)
- Update the database types in
- Constants.cs (Database_Types)
- Update the allowed domain value lists/comments/whatever in
- dbo.usp_RedGateMultiScriptDatabaseGroups_ErrorChecks (@Domain)
- Constants.cs (MultiScript_DomainList_Valid)
- Replace "DeployUser" in all scripts with your sa or service account user's name
- dbo.View_RedgateMultiScriptDatabaseGroups
- dbo.usp_RedGateMultiScriptDatabaseGroups_Get
- dbo.usp_DBConnectionConfig_GetByRedgateMultiscriptFormat
- Constants.cs (MultiScript_SqlUserNamesList)
- View_RedgateMultiScriptDatabaseGroups.cs (sqlUserList)
- usp_DBConnectionConfig_GetByRedgateMultiscriptFormat.cs (domainList_Valid)
- Remember to update
- The comments in all of the objects that indicate the allowed values
- The default values of any parameters, variables, etc... so they are accurate for your system
- Deploy the SQL objects to your desired database
- Copy the appsettings.test.json.templatefile
- Rename it to appsettings.test.json
- Update it so it is connecting to the correct database
- MSSQL.Extension - Contains supplimental helper methods to assist with testing
- MSSQL.Models - Contains the models used for CRUD operations in tests (these models are tightly coupled with Database tables)
- *.Tests - Contains all unit tests for this DB Type