dbTalk Databases Forums  

Generate Exception file dynamically in DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Generate Exception file dynamically in DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mjones
 
Posts: n/a

Default Generate Exception file dynamically in DTS - 10-13-2003 , 04:11 PM







Is there a way to generate the exception file under the Option tab in
the DTS task dynamically? I want to generate a different exception file
every time I run the same pacakge. The file name can be anything as long
as it's different.



Thanks.



Matt.


--
Posted via http://dbforums.com

Reply With Quote
  #2  
Old   
rharmon
 
Posts: n/a

Default Re: Generate Exception file dynamically in DTS - 10-14-2003 , 08:06 AM






If you fire the dts package with dtsrun, you can seed the /L parameter with
a variable.

Rob

"mjones" <member43970 (AT) dbforums (DOT) com> wrote

Quote:
Is there a way to generate the exception file under the Option tab in
the DTS task dynamically? I want to generate a different exception file
every time I run the same pacakge. The file name can be anything as long
as it's different.



Thanks.



Matt.


--
Posted via http://dbforums.com



Reply With Quote
  #3  
Old   
Darren Green
 
Posts: n/a

Default Re: Generate Exception file dynamically in DTS - 10-14-2003 , 04:00 PM



In article <3421947.1066079478 (AT) dbforums (DOT) com>, mjones
<member43970 (AT) dbforums (DOT) com> writes
Quote:
Is there a way to generate the exception file under the Option tab in
the DTS task dynamically? I want to generate a different exception file
every time I run the same pacakge. The file name can be anything as
long
as it's different.

You could use the Dynamic Properties Task or more likely an ActiveX
Script Task to set the ExceptionFileName Property of the DataPump task.

Something like this-

Option Explicit

Function Main()
Dim oPkg, oDataPump
Dim sFilename

' Derive the new file name
sFilename = "something date based perhaps or fancy temp file"


' Get reference to the DataPump Task
Set oPkg = DTSGlobalVariables.Parent
Set oDataPump =
oPkg.Tasks("DTSTask_DTSDataPumpTask_1").CustomTask

' Set the filename
oDataPump.ExceptionFileName = sFilename

' Clean Up
Set oDataPump = Nothing
Set oPkg = Nothing

Main = DTSTaskExecResult_Success
End Function


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #4  
Old   
mjones
 
Posts: n/a

Default Re: Generate Exception file dynamically in DTS - 10-15-2003 , 05:04 PM




Thank both of you for the response. I will try those solutions and will
let you know if I have any question.



Matt


--
Posted via http://dbforums.com

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.