December 11, 2003 at 9:50 am
Hi There,
I have a trigger setup on my sql server database so when a field in a record
gets updated I trigger gets initiated. This trigger simply runs a FTP
program
SET @sCmd= 'cmd.exe /c d:\inetpub\ftproot\filename.bat'
EXEC master..xp_cmdshell @sCmd, no_output
This trigger is run on a frequent basis wich after a while times out the
databas so no more queries can be run on the database unless I restart the
SQL Server Service.
Can somebody recommend a resolution for this problem as it causes problems a
plenty.
The version details are:
Microsoft SQL Server 2000 - 8.00.679 (Intel X86) Aug 26 2002 15:09:48
Copyright (c) 1988-2000 Microsoft Corporation Standard Edition on Windows
NT 5.0 (Build 2195: Service Pack 4)
Thanks In Advance,
Kevin Humphreys
December 11, 2003 at 10:09 am
schduling a job to run the ftp later.
December 12, 2003 at 2:02 pm
I had exactly the same problem. What I did was the following. I still run a trigger which calls a batch file but all the batch file does is see if a text file exists on the file system, if it doesn't then it creates it.
Then on the server I set a scheduled task which runs a separate batch file and if the text file exists it runs the FTP task. It then deletes the text file.
Has worked well in my company for six months.
Steve.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply