|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, June 01, 2009 7:06 PM
Points: 172,
Visits: 11
|
|
| This article came along at an opportune time as I was working on a DTS package that will be moved to production. My only problem was with the diagram that showed the dynamic properties box directly connected to a connection object. My version of DTS would not allow this. I got an "Invalid precedence" error message. I was able to make it work when I connected the task to the the first "Execute SQL" task. I belive this has the same affect as the steps outlined in the article.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 7:34 AM
Points: 121,
Visits: 160
|
|
Great article!
Very easy to follow. I was looking for something like this several months ago and could not find it on the web. I end up writing a VB app to run it. Now I am going to change my DTS.
Thanks
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, October 17, 2012 7:25 AM
Points: 30,
Visits: 208
|
|
Good Article. I wish there was something like it when I first started doing portable DTS work. Chalk me up as another fan of UDL and INI files. To add to andyj93's comments, you can write a failirly simple vbscript to chop out the 1st and 2nd parts of the three part name and stick it into an ActiveX script in your package (runs early). That way you do not need to do the editting.
Best Regards,
Mark Tierney
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Tuesday, July 27, 2010 7:51 PM
Points: 1,244,
Visits: 3
|
|
This is exactly what we do where I work. For those that don't like the idea of running DTS packages from the command line, try scheduling a DTS package as a job. You'll find that the job itself uses DTSRun.exe, so there isn't much difference.
We wrap a substantial but not complicated DOS command scripts around the DTSRun call too. We get a lot of flexibility and our staff who don't know SQL can make script adjustments and updates without much problem.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, February 12, 2013 10:54 AM
Points: 137,
Visits: 116
|
|
Hey andyj93 How did you get rid of the three part naming in the tranformation? I have the source from ODBC AS400 and destination is the SQL server. I am able to set the global varible for the connections but not the transformation. Any inmput is appreciated. THanks.
rb
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Wednesday, January 25, 2012 8:14 AM
Points: 567,
Visits: 512
|
|
| Excellent, thanks. No more resetting of transformations, YES!!
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Tuesday, June 09, 2009 8:13 AM
Points: 75,
Visits: 3
|
|
Once again, the submission is SPOT ON. Good job and thanks for the very well written and easy to understand style! 
Cheers,
Alex
Rogue DBA
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, October 17, 2012 7:25 AM
Points: 30,
Visits: 208
|
|
Hi BankaR, I added this code in an ActiveX script at the top of my package: For i = 1 to oPackage.Tasks.Count ' Verify that this task is a transformation task by interrogating for default name If Left(oPackage.Tasks(i).Name, 19) = "DTSTask_DTSDataPump" Then PumpID = i set oTrans = oPackage.Tasks(PumpID) ' Get the Destination tablename and find the 2nd qualifier location oTask = oTrans.CustomTask.DestinationObjectName tst = InStr(1 ,oTask,"dbo") tst2 = tst - 2 ' Use calculated starting point to strip off the table creator and name ' from the server name tempname = Right(oTask,Len(oTask) - tst2) ' Apply stripped name back to destination name oTrans.CustomTask.DestinationObjectName = tempname set oTrans = nothing End If Next I use this loop to also change other aspects of the Tasks (just add new code to loop) when I have many of them in a single package. It allows you to avoid opening each Task. 
Best Regards,
Mark Tierney
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Monday, April 29, 2013 10:28 AM
Points: 46,
Visits: 262
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, December 03, 2007 5:48 AM
Points: 1,
Visits: 1
|
|
Very useful article.
Initially I had problems with saving the dts package as the article quotes
dtsrun /Fmydtspkg /Nmydtspkg
but /F is actually the full filename e.g c:\dtspackages\mypkg.dts and /N is the name of the package e.g. mypkg I also initially had problems realising that 'structured storage' simply means a disk file and that is what we are refering to.
Note that your structured storage holds a new version of the package each time it is saved so you need to delete the file before each save or dtsrun will tell you there are multiple packages to choose from
|
|
|
|