|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 9:22 AM
Points: 551,
Visits: 1,150
|
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 10:29 AM
Points: 890,
Visits: 931
|
|
Well written article and new way of working with Configuration tables. I like the trigger used to track changes in the configuration table. To me, though, the data and security risks of having all the configurations in one table far out-way a little extra work on my part to manage configuration tables by application and server. I require the separation of production, QA and test data and even separation of data by application. I actually require that the configuration tables be loaded into a separate (non-dbo) schema. This allows me to easily control security by schema. All of this allow the developers to access their own configuration tables for testing but cannot even see the QA and production configuration tables... nor can they see the configuration table for other applications.
The migration of configuration data from test to QA and prod has to go through the DBA, which then modifies the data as needed to update passwords, folders, etc. From what I've seen, configurations are not changed that often so once they are set up, the maintenance and SSIS migrations are fairly simple. We use environmental variables to define which server and development environment the package is running in. This is easy to set up and simple way to allow developers to jump between different development environments.
David
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Tuesday, January 29, 2013 10:54 AM
Points: 3,837,
Visits: 3,821
|
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 1:39 PM
Points: 2,818,
Visits: 1,038
|
|
John Rowan (6/3/2009) Just curious, what are you using for your Package Protection Level, server storage? I prefer to use the DontSaveSensitive setting, because I may want to deploy packages to a file location rather than a server. All passwords are going to be configured, so this is not a limitation.
In our environment, our security needs are satisfied by limiting rights on the configuration table to the developers, SQL Server, and SQL Server Agent logins. We have no reason (so far) to restrict some settings to only certain developers, DBAs, or sysadmins, although I appreciate that other people in larger teams may have such problems.
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 5:54 PM
Points: 525,
Visits: 617
|
|
Great article. I think Microsoft should built in something like this into the next release of SQL Server (and pay royalties to Scott )
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Saturday, November 14, 2009 5:07 PM
Points: 15,
Visits: 41
|
|
Hi Scott, great articles for the SSIS configuration.
I was testing your code on my machine and found out that: When I try to add a new variable in the package and map it to configuration using BIDS configuration wizard, it will update all the config value from the variables default - This is actually the default behavior. The problem is there will be administrators using BIDS and try to fix something on the production server (don't ask me why - ok the answer is because it's convenient) they will inadvertently reset all the production value to development value settings from the package... This is true happen on file base configuration too, it's just that I got myself into this problem before and luckily I have the config file backup. In your new SSIS config settings we'll need to get it back from history table so writing a restore script might be a good idea.
My 2 cents is "Do not try to add configuration changes on production server using BIDS."
Cheers!
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 1:39 PM
Points: 2,818,
Visits: 1,038
|
|
sqlJunkies2 (6/9/2009) they will inadvertently reset all the production value to development value settings from the package This is a good argument for using a lot of small configuration sets, to limit the damage.
You could also use a trigger to reject UPDATEs that didn't come from a "SQL Server Management Studio" connection. Then new configuration sets could be created in BIDS, but updates would have to be done using the stored procs.
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Today @ 2:11 PM
Points: 282,
Visits: 2,122
|
|
I have been toying with using this sort of thing in our environment. One problem I ran into was the using the stored procs to update the table and figuring out the best way to automate it as much as possible for dba's or developers.
I came up with this script that will generate the EXEC statement based on it being one environment. You just have to put in your ConfigurationFilter. It works for me but feel free to add or take away.
--Generate SQL for setting the values --EXEC dbo.SSIS_Config_SetValues 'Filter',N'Path',N'New value'
SET NOCOUNT ON
DECLARE @sql varchar(1000), @filter varchar(1000), @rc int, @PackagePath varchar(1000)
--insert your filter here SET @filter = 'InsertYourConfigurationFilterHere'
SELECT ConfigurationFilter, PackagePath INTO #Config FROM dbo.SSIS_Config_base WHERE ConfigurationFilter = @filter
SELECT @rc = 1, @PackagePath = MIN(PackagePath) FROM #Config
WHILE @rc <> 0 BEGIN --dynamic sql to generate the statements --EXEC dbo.SSIS_Config_SetValues 'Filter',N'Path',N'New value' SELECT @sql = '' SELECT @sql = @sql + 'EXEC ' + 'dbo.' + 'SSIS_Config_SetValues ' SELECT @sql = @sql + '''' + @filter + '''' + ',N' + '''' + @PackagePath + '''' SELECT @sql = @sql + ',N' + '''' + 'newvalue' + '''' PRINT (@sql)
SELECT TOP 1 @PackagePath = PackagePath FROM #Config WHERE PackagePath > @PackagePath ORDER BY PackagePath
SET @rc = @@ROWCOUNT
END DROP TABLE #Config
MCITP, Database Administrator A hodgepodge of Information Technology and Life LinkedIn Profile My Twitter
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 1:39 PM
Points: 2,818,
Visits: 1,038
|
|
That's an interesting idea. I think I would have it script out the command with the current values:
DECLARE @filter NVARCHAR(100)
SET @filter = N'InsertYourConfigurationFilterHere'
SELECT REPLACE( N'EXEC dbo.SSIS_Config_SetValues N''' + ConfigurationFilter + ''',| N''' + PackagePath + '''' + CASE WHEN GlobalValue IS NULL THEN '' ELSE ',| @AllValues = N''' + GlobalValue + '''' END + CASE WHEN ProductionValue IS NULL THEN '' ELSE ',| @ProdValue = N''' + ProductionValue + '''' END + CASE WHEN DevelopmentValue IS NULL THEN '' ELSE ',| @DevValue = N''' + DevelopmentValue + '''' END + CASE WHEN TestValue IS NULL THEN '' ELSE ',| @TestValue = N''' + TestValue + '''' END, '|', CHAR(10)) FROM dbo.SSIS_Config_AllEnv WHERE ConfigurationFilter = @filter
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Yesterday @ 12:18 PM
Points: 30,
Visits: 239
|
|
Would you be willing to share your SSIS template? That could really help the push for SSIS in my space.
Thanks
|
|
|
|