March 2, 2007 at 7:46 am
We have a table that is created nightly, on the server, through an outside process. This outside process is also set up to export the data to a txt file and then zip and rename it. It seems like it no longer has access to the file storage path so i've been running the export process manually (the file name changes every day).
Our network people have not been able to correct the permissions issue and are requesting that we move the process out of the windows service that should be running it.
My question is, in SQL Server, can I (or how would I) export the data to a .zip file, keeping in mind that the file name changes daily (ie: tbl02_02_2007, tbl02_03_2007, etc.). From what i've seen I can not pass the file name to a sp as a parameter: SELECT * FROM @tblName. And can you issued a .zip command/path in T-SQL?
Thank you
March 2, 2007 at 8:37 am
If you're doing this as part of a SQL Server Agent job, you can choose Operating System Command from the drop-down list in the job step box. But as for dynamically naming the file... you're probably best off doing this in a SSIS package, where you can use dynamic properties to change the file name daily. At least you could in DTS in SQL Server 2000 - I'm sure the functionality is still there in 2005, even if it's called something different now!
John
March 2, 2007 at 8:37 am
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply