December 1, 2005 at 11:13 am
I have a dts package that I am using to generate an excel output file. The problem I am encountering is that I want my global variables to give the excel spreadsheet a unique name each time based on data, but when the package is called from a sql agent it fails. Basically the error comes down to Excel not knowing what to call the worksheet in the workbook. Everything I have tried to get around this results in the output file not being named according to what my global variables pull back. How do I overcome this?
December 1, 2005 at 1:05 pm
U said - "when the package is called from a sql agent it fails." Does it succeed when started manually without scheduling via Agent?
Not sure what u r doing. But u can try xp_cmdshell and create an excel file with a unique name and then do whatever u want to the file.
December 1, 2005 at 1:30 pm
I have attempted the xp_cmdshell method with no positive results as of yet. Using this method I get "DTSRun OnError: DTSStep_DTSDataPumpTask_1, Error = -2147467259 (80004005)"
Interestingly if I run the package manually it will tell me "Microsoft Jet Engine could not find the table New_Table" (new table is what I have assigned as the worksheet name for Excel). Hope that makes sense.
December 1, 2005 at 1:48 pm
Ok, got it so it works when manually executing the dts package now, but executing it via xp_cmdshell still fails with the same error given above. Any thoughts?
December 1, 2005 at 1:54 pm
Run the TSQL (xp_cmdshell) script inside the package in Query Analyzer and find out the error. Use the same login which is used by the package to run. Le me know what is the exact error?
December 1, 2005 at 3:44 pm
This is the error I get from xp_cmdshell.
DTSRun OnError: DTSStep_DTSDynamicPropertiesTask_1, Error = -2147467259 (80004005)
Error string: Failure creating file.
Error source: Microsoft JET Database Engine
Help file:
Help context: 5003436
Error Detail Records:
Error: -2147467259 (80004005); Provider Error: -329978796 (EC54EC54)
Error string: Failure creating file.
Error source: Microsoft JET Database Engine
Help file:
Help context: 5003436
December 1, 2005 at 4:01 pm
Are you trying to do this to a local disk or to a UNC/share ?
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply