June 10, 2002 at 3:25 am
How can I read an ini file entry and pass this paramter to a stored procedure which will be run in a DTS Package?
Secondly, after a predefined time I want to delete extracted text files onto harddisk. The files are named as transactions_2001_05.txt and contain year and month in the file name. The file name should be verified and deleted if e. g. older than two years? Everything should run within DTS.
Thanks for your hints
mipo
June 10, 2002 at 3:42 am
For reading the ini file:-
Define a global variable.
Add a dynamic properties task.
Click add
Select your global variable.
Click set and speicfy the ini file as the source.
Then to pass it to a stored procedure:-
Add an execute sql task.
Write in exec sp_(SP name) ?
And click the parameters button and select your global variable.
To perform the deletion you could maybe use the file system object within a vb script. Or call the extended stored procedures xp_DirTree (to retrieve filenames)and xp_CmdShell (to perform the deletions) from another stored procedure, then call that from DTS.
Regards,
Andy Jones
.
June 11, 2002 at 2:16 am
Thanks for your reply.
Question - what is the correct syntax to pass over a parameter to a stored procedure in the window of an "Execute sql task" in DTS?
e. g. p_BackUpTransactions @KeepDaysInDatabase? But it comes up with an error.
Thanks for your help
mipo
June 11, 2002 at 2:28 am
exec p_BackUpTransactions ?
Then click the parameters button to assign @KeepDaysInDatabase to the dynamic parameter ?
Regards,
Andy Jones
.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply