Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 SQL table update time out while updating

Author  Topic 

AshuRupani
Starting Member

2 Posts

Posted - 2009-12-19 : 04:42:53
Hi everyone,
I am facing this problem since quite long and tried many tricks but the problem persists.
Whenever user tries to update his/her record in this one particular table, the SQL Server time out exception occurs.
This problem occurs only for one particular table in the database.

I have set the SQLCommand Timeout property to 300 secs.

Please suggest a solution



With Thanks
Ashu

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2009-12-19 : 10:38:53
Can you share the update query? Also provide some info on the indexes and triggers on that table.
Go to Top of Page

AshuRupani
Starting Member

2 Posts

Posted - 2009-12-21 : 01:01:13
Hello Vijay,

It is a very basic update query thr ASP.Net which goes like this

Dim strUpdate As String = "Update emp_mast set password=@password,passwordhash=@passwordhash,salt=@salt,pass_chg=@pass_chg where emp_no=@emp_no"
Dim objUpdate As New SqlCommand(strUpdate, objSqlCon)

' ----Assign values to parameters

objUpdate.CommandTimeout = 300
objUpdate.ExecuteNonQuery()

It is not a huge table so no indexes have been maintained and it does not require triggers.

The problem is sometimes it updates the table while sometime it gives time out exception.

With Many Thanks,
Ashu

With Thanks
Ashu
Go to Top of Page

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2009-12-21 : 09:45:02
Have you tried running the update query from management studio? How long does it take to update the particular row?
Go to Top of Page
   

- Advertisement -