geoff hopkins
Ten Centuries
Points: 1147
More actions
November 11, 2005 at 6:36 am
#89837
Is it possible to delete certain files on the SQL Server box dependant on a parameter passed into a SPROC?
peterhe
SSChampion
Points: 11469
November 11, 2005 at 7:42 am
#603415
you can call the extended procedure xp_cmdshell in your stored procedure:
DECLARE @sql nvarchar(1000)
SET @sql='DEL "'+@YourFile+'"'
exec master..xp_cmdshell @SQL
Make sure your app login has the privilege to run xp_cmdshell.
November 14, 2005 at 8:46 am
#603697
ta
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply