Sunday, February 26, 2012

error message!

Today a user just called me and said she got an SQL error
message when she tried to run a batch.
I changed the dex.ini file (found in the application root)
to log error messages.
Change the following statements from FALSE to TRUE.
SQLLogSQLStmt=TRUE
SQLLogODBCMessages=TRUE
SQLLogAllODBCMessages=TRUE
and a file called dexsql.log is created in the same
directory.
The errors that appeared in the log file where:
/* Date: 01/12/2004 Time: 11:07:45
stmt(26501640):*/
DELETE payrolldb.dbo.CPY30160
SELECT COUNT(*) FROM payrolldb.dbo.CPY30160
/*
/* Date: 01/12/2004 Time: 11:08:28
SQLSTATES1T00) Native Err0) stmt(26501640):*/
[Microsoft][ODBC SQL Server Driver]Timeout expired*/
/*
/* Date: 01/12/2004 Time: 11:08:28
SQLSTATE00000) Native Err0) stmt(26501640):*/
*/
/*
/* Date: 01/12/2004 Time: 11:08:28
SQLSTATE00000) Native Err0) status(55):*/
SWSTATUS DUMP*/
/*
--
/* Date: 01/12/2004 Time: 11:08:34
stmt(26519888):*/
DELETE payrolldb.dbo.CPY30161
SELECT COUNT(*) FROM payrolldb.dbo.CPY30161
/*
/* Date: 01/12/2004 Time: 11:09:05
SQLSTATES1T00) Native Err0) stmt(26519888):*/
[Microsoft][ODBC SQL Server Driver]Timeout expired*/
/*
/* Date: 01/12/2004 Time: 11:09:05
SQLSTATE00000) Native Err0) stmt(26519888):*/
*/
/*
/* Date: 01/12/2004 Time: 11:09:05
SQLSTATE00000) Native Err0) status(55):*/
SWSTATUS DUMP*/
---
I went into SQL Query analyzer and ran the statements
interactively and they both worked.
then she re-started the Batch Calculation and everything
ran fine.
Does anyone know why we got this errors?
Thanks in advance-RobYou are seeing a timeout error. You can find some general info on this at:
http://vyaskn.tripod.com/sql_odbc_timeout_expired.htm
http://vyaskn.tripod.com/watch_your_timeouts.htm
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Rob" <rob@.nul.ca> wrote in message
news:012301c3d93a$f2ebb510$a401280a@.phx.gbl...
Today a user just called me and said she got an SQL error
message when she tried to run a batch.
I changed the dex.ini file (found in the application root)
to log error messages.
Change the following statements from FALSE to TRUE.
SQLLogSQLStmt=TRUE
SQLLogODBCMessages=TRUE
SQLLogAllODBCMessages=TRUE
and a file called dexsql.log is created in the same
directory.
The errors that appeared in the log file where:
/* Date: 01/12/2004 Time: 11:07:45
stmt(26501640):*/
DELETE payrolldb.dbo.CPY30160
SELECT COUNT(*) FROM payrolldb.dbo.CPY30160
/*
/* Date: 01/12/2004 Time: 11:08:28
SQLSTATES1T00) Native Err0) stmt(26501640):*/
[Microsoft][ODBC SQL Server Driver]Timeout expired*/
/*
/* Date: 01/12/2004 Time: 11:08:28
SQLSTATE00000) Native Err0) stmt(26501640):*/
*/
/*
/* Date: 01/12/2004 Time: 11:08:28
SQLSTATE00000) Native Err0) status(55):*/
SWSTATUS DUMP*/
/*
--
/* Date: 01/12/2004 Time: 11:08:34
stmt(26519888):*/
DELETE payrolldb.dbo.CPY30161
SELECT COUNT(*) FROM payrolldb.dbo.CPY30161
/*
/* Date: 01/12/2004 Time: 11:09:05
SQLSTATES1T00) Native Err0) stmt(26519888):*/
[Microsoft][ODBC SQL Server Driver]Timeout expired*/
/*
/* Date: 01/12/2004 Time: 11:09:05
SQLSTATE00000) Native Err0) stmt(26519888):*/
*/
/*
/* Date: 01/12/2004 Time: 11:09:05
SQLSTATE00000) Native Err0) status(55):*/
SWSTATUS DUMP*/
---
I went into SQL Query analyzer and ran the statements
interactively and they both worked.
then she re-started the Batch Calculation and everything
ran fine.
Does anyone know why we got this errors?
Thanks in advance-Rob|||Hi Rob,
My name is Michael and I would like to thank you for using Microsoft
newsgroup.
Before we go any further, I would like to collect more information from you:
1. Can you please tell me how you run this batch? Do you run it in an ADO
application?
2. What is the connection string? Which provider you use to connect to SQL
Server?
3. When does the timeout error occur? Are you sure that the timeout error
occurred when your customer performed the batch?
In the following situations I agree with Vyas:
1. If you ran the batch in an ADO application
2. If the timeout error occurred, when your customer was running the batch
but not when they were connected to SQL Serer.
3. If the batch works fine using Query Analyzer.
As we know, there are two kinds of timeout in ADO: connection timeout and
query timeout. The default connectiontimeout is 15 seconds. The default
commandtimeout is 30 seconds. If the system is overloaded, the default
value may be too small, please increase these value to see if the problem
still occur.
con.connectiontimeout=150
con.commandtimeout=300
Also, the root solution is that you can improve the query performance to
decrease the execution time.
Thanks for using Microsoft newsgroup.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.|||Hi Michael,
I dont know how to increase the timeout?
where is the following settings?
con.connectiontimeout=150
con.commandtimeout=300
Thanks-Rob
quote:

>--Original Message--
>Hi Rob,
>My name is Michael and I would like to thank you for

using Microsoft
quote:

>newsgroup.
>Before we go any further, I would like to collect more

information from you:
quote:

>1. Can you please tell me how you run this batch? Do you

run it in an ADO
quote:

>application?
>2. What is the connection string? Which provider you use

to connect to SQL
quote:

>Server?
>3. When does the timeout error occur? Are you sure that

the timeout error
quote:

>occurred when your customer performed the batch?
>In the following situations I agree with Vyas:
>1. If you ran the batch in an ADO application
>2. If the timeout error occurred, when your customer was

running the batch
quote:

>but not when they were connected to SQL Serer.
>3. If the batch works fine using Query Analyzer.
>As we know, there are two kinds of timeout in ADO:

connection timeout and
quote:

>query timeout. The default connectiontimeout is 15

seconds. The default
quote:

>commandtimeout is 30 seconds. If the system is

overloaded, the default
quote:

>value may be too small, please increase these value to

see if the problem
quote:

>still occur.
>con.connectiontimeout=150
>con.commandtimeout=300
>Also, the root solution is that you can improve the query

performance to
quote:

>decrease the execution time.
>Thanks for using Microsoft newsgroup.
>Regards,
>Michael Shao
>Microsoft Online Partner Support
>Get Secure! - www.microsoft.com/security
>This posting is provided "as is" with no warranties and

confers no rights.
quote:

>.
>
|||Hi Rob,
Thanks for your feedback. CommandTimeout Property in ADO indicates how long
to wait while executing a command before terminating the attempt and
generating an error.
CommandTimeout Property
http://msdn.microsoft.com/library/d...-us/ado270/htm/
mdapro02_5.asp
Thanks for using Microsoft newsgroup.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

No comments:

Post a Comment