Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server DTS
|
SQL Server DTS Discussion specific to Data Transformation Service with SQL Server. General SQL Server discussions should use the general SQL Server forum. Readers of the book Professional SQL Server 2000 DTS with questions specific to that book should post in that book forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server DTS section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 31st, 2004, 12:17 PM
Authorized User
 
Join Date: Jun 2003
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default DTS Environment control

Some of our packages are self aware of the servers they are on and know whether to push/pull data based on that. If the package lives on a TEST server – it would know to work with test data whereas once the same DTS package was promoted to production – it would know to work with Prod data with no changes whatsoever to the package.

Using this sort of environment aware control we have been able to promote a single DTS package through each of our 4 tiers (dev, test, pre-prod, prod) without having to change any of the connections inside the DTS.

The solutions I have come up with isn't too terriably elegant - has anyone else came up with a solution to have their DTS packages environment self aware and reconfigures it's connections based on that?

_________________________
Joe Horton
Database Developer / Software Engineer
WISHA/Legal Services Software Development
Department of Labor and Industries
Voice (360) 902-5928 fax (360) 902-6200
__________________
_________________________
Joe Horton
Database Developer / Software Engineer
WISHA/Legal Services Software Development
Department of Labor and Industries
Voice (360) 902-5928 fax (360) 902-6200
 
Old April 7th, 2004, 09:14 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

I am interest on how you have done this can you post your information?

 
Old April 12th, 2004, 12:30 PM
Authorized User
 
Join Date: Jun 2003
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have come up with 2 solutions.

1st Solution:
Using a DSN to the DB. For example - our DB is called "WIN" - so our packages always referance a DSN called WIN - however - the DSN on DEV points to DEV, the WIN DSN on TEST points to TEST DB, the DSN called WIN on pre-prod points to pre-prod and the DSN called WIN on prodcution points to prod. This allows one package to be built and promoted up our 4 tiers with no connection changes. The drawbacks are - 1) developing is tricky. When developing on your local box - of course it will use the DSN on your box despite whatever server it is save ond. 2) Using DSN's as connections limits you to some of the higher features in a DTS package such as even using Parameterized queries in some instances. 3) Speed is not good for huge DB's with lots of transfer.

2nd solution:
Using an Environment Control table - I created records of connections. A DTS package, by using it's own name, would pull up the record and determine all the connections properties and using dynamic edit - reconfigure them at the front of the package. So one of the first queries was to determine what environment the package was running on. When the query would run, it would determine that it was living on the TEST environment and pull up all the connection records for that particular package and loop through resetting the connections for TEST. It was important to capture the @@ServerName immidiately in the package because @@ServerName will return the name of the current existing connection which would change as your package executes it's steps using different connections. Major drawback was having to store the user name/password in my control table - not very secure. Having to add a few steps in front of all the packages wasn't too clean. What I really wanted to do was built a component that I could call as the first step in a package - or call a sub-package. But I ran out of time to develop further and am mostly using solution #1.

_________________________
Joe Horton
Database Developer / Software Engineer
WISHA/Legal Services Software Development
Department of Labor and Industries
Voice (360) 902-5928 fax (360) 902-6200





Similar Threads
Thread Thread Starter Forum Replies Last Post
C# environment dhood C# 2 March 7th, 2007 07:57 PM
Environment variables dotnetprogrammer VS.NET 2002/2003 3 November 30th, 2004 10:10 AM
dts calls a lot of dts steffi_ma SQL Server DTS 2 May 24th, 2004 07:18 PM
Environment Variables cmiller PHP How-To 1 October 29th, 2003 06:53 PM
Getting started with the JAVA environment JFreeman JSP Basics 2 August 28th, 2003 03:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.