![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Have you got the datapump to "Close Connection on completion" in the workflow. Do you "Know" that it is resetting the filename ? -- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org |
#4
| |||
| |||
|
|
Also note that even if you do loop this script then if the execution is too fast then the filename will be the same so in my example even though I looped 10 times I actually only got 2 files. -- ---------------------------- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote Is your script executed each loop ? If it isn't then you are setting the filename once and never again so it will remain static. I used this and put it in a loop Set up Loop AX Script (Loops 10*) Your settings script Datapump Loop returner Function Main() mydate = now() dim oConn sFilename = Right(Year(mydate), 4) If Month(mydate) < 10 Then sFilename = sFilename & "0" & Month(mydate) Else sFilename = sFilename & Month(mydate) End if If Day(mydate) < 10 Then sFilename = sFilename & "0" & Day(Mydate) Else sFilename = sFilename & Day(mydate) End if sFilename = DTSGlobalVariables("LogFilePath").Value & sFilename & "_" & Replace(Time(), ":", "_") & ".csv" Set oConn = DTSGlobalVariables.Parent.Connections("Destination File") oConn.DataSource = sFilename Set oConn = Nothing Main = DTSTaskExecResult_Success End Function -- ---------------------------- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Glenn Haworth" <a@b.com> wrote in message news:OwARr46aDHA.3768 (AT) tk2msftngp13 (DOT) phx.gbl... I've set the "Close Connection on completion" and still get the same problem. I wouldn't say it's reseting the file name but rather than generating a file with a new one, it keeps using the same file name. So it would generate a file with the following name "ProcessLog_20030826_09_30_00.csv", then it keeps using this one rather than generating a new one which has a time 5 minutes older. I know it's using the same file as the time in the modified column in explorer changes correctly. Here's a copy of the activex script i'm using: - Function Main() mydate = now() sFilename = "c:\ProcessReports\ProcessLog_" & Right(Year(mydate), 4) If Month(mydate) < 10 Then sFilename = sFilename & "0" & _ Month(mydate) Else sFilename = sFilename & Month(mydate) If Day(mydate) < 10 Then sFilename = sFilename & "0" & _ Day(Mydate) Else sFilename = sFilename & Day(mydate) sFilename = DTSGlobalVariables("LogFilePath").Value & sFilename & "_" & Replace(Time(), ":", "_") & ".csv" Set oConn = DTSGlobalVariables.Parent.Connections("Destination File") oConn.DataSource = sFilename Set oConn = Nothing Main = DTSTaskExecResult_Success End Function "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:OwIqaVMaDHA.1748 (AT) TK2MSFTNGP12 (DOT) phx.gbl... Have you got the datapump to "Close Connection on completion" in the workflow. Do you "Know" that it is resetting the filename ? -- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org |
![]() |
| Thread Tools | |
| Display Modes | |
| |