Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12345»»»

SSIS multi-environment configuration in a single SQL Server table Expand / Collapse
Author
Message
Posted Wednesday, June 3, 2009 8:38 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Yesterday @ 6:27 AM
Points: 554, Visits: 1,192
I recently posted about Package Configurations throwing Warnings rather than Errors. I don't suppose you've solved that problem as well? My current solution treats all warnings as errors.

http://www.sqlservercentral.com/Forums/Topic724499-148-1.aspx#bm724516
Post #728258
Posted Wednesday, June 3, 2009 9:11 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 10:02 AM
Points: 916, Visits: 992
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



Post #728299
Posted Wednesday, June 3, 2009 9:24 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Wednesday, July 16, 2014 3:01 PM
Points: 3,843, Visits: 3,836
Great article Scott. I love your approach. Just curious, what are you using for your Package Protection Level, server storage?



John Rowan

======================================================
======================================================
Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
Post #728313
Posted Wednesday, June 3, 2009 11:55 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, July 18, 2014 12:13 PM
Points: 2,837, Visits: 1,138
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.



Post #728416
Posted Monday, June 8, 2009 5:59 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Monday, July 21, 2014 8:42 AM
Points: 535, Visits: 750
Great article. I think Microsoft should built in something like this into the next release of SQL Server (and pay royalties to Scott )


Post #731051
Posted Tuesday, June 9, 2009 11:24 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

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!
Post #731717
Posted Tuesday, June 9, 2009 12:04 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, July 18, 2014 12:13 PM
Points: 2,837, Visits: 1,138
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.



Post #731761
Posted Tuesday, June 9, 2009 12:34 PM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Saturday, April 12, 2014 12:17 AM
Points: 282, Visits: 2,208
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
Post #731783
Posted Tuesday, June 9, 2009 3:33 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, July 18, 2014 12:13 PM
Points: 2,837, Visits: 1,138
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




Post #731903
Posted Tuesday, June 9, 2009 3:52 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 12:18 PM
Points: 30, Visits: 293
Would you be willing to share your SSIS template? That could really help the push for SSIS in my space.

Thanks



Post #731920
« Prev Topic | Next Topic »

Add to briefcase ««12345»»»

Permissions Expand / Collapse