Hi Guys and Gals...
I have a script that runs every night to pull some data from Delphi. For some strange reason the past month it has been failing on the inital running of the script but when I close off all of the error boxes and hit the script again it runs just fine... Please find enclosed the script . Can anyone tell me whe it is wrong... thanks in advanceWhat is the very first error message that you get?|||it is a follows:
Line:67
Char:1
Error: ODBC SQL Server Driver Timeout error
Code:80004005
Source: OLE DB provider for IDBC Drivers
The second and continuing errors are:
Line:49
Char:1
Permission Denied
error:800a0046
VB Script runtime error
This program runs at midnight. All the errors appear but yet when I close all of them and hit the script again it runs.....
Any help|||Is there any other activity going on with the database server at midnight?
Nightly maintenance, for instance?|||No other items are running that database around or after midnight.. This is a strange as hell...
Runs fine during the day but when it changes to another day errors.....|||What if you set it to run at 12:05 am, so that its execution does not span midnight?
Honestly, I haven't looked at the details of your dynamic SQL. You should really consider creating this as a stored procedure and dropping the cursor. That would probably effectively solve the problem on its own.|||I would expect that this is being caused by SQL needing to read in all the data you are after from disk. Once the first query times out, the second query gets the advantage of having all the data pre-populated in memory. Simple fix, just up your command timeout value. Still, you should look into the query(s) to see if improvements can be made. Especially if the query is taking over 30 seconds as it is.|||My programmer just left yesterday for holidays...
Can anyone give me the lines needed to add the "command timeout " into my script.... And where it would be best to place it...
Total anal when it comes to VB... Great with DOS though...
many thanks
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment