• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 137
  • Last Modified:

slow sql from time to time

Hi,
I was wondering if EE could give me some directions.  We have a database that will hang from some to time, there is no pattern.

When a user logs in, there is a update statement that will log the time, most of the time, it is fine, but sometimes, after user clicks on OK after entering username and password, it will take over a min to login, once it is in, everything is normal again.  I donot know what would cause this.  This is the test server which mean there is only 2 people are on the server.

thx
0
mcrmg
Asked:
mcrmg
2 Solutions
 
HuaMinChenBusiness AnalystCommented:
Please check if any SqlCommand has been run during the logon time. If yes, further check if you can add index to the table.
0
 
David ToddSenior DBACommented:
Hi,

Has the database got autoclose set to true?

Is this every user? What happens if there is a user already logged in?

What is page-life expectancy like? That is, are these pages being purged from the cache?

Regards
  David
0
 
mcrmgAuthor Commented:
Hi,

Where can I see the setting?  thanks
0
 
David ToddSenior DBACommented:
Hi,

In the database properties, go to the option tab.

Or the other thing is have you done database maintenance - rebuilding/defragging indexes etc? Has it been a while? That could be causing slow downs. Or is the login-tables needing to be pruned? (Because the application wasn't designed for tables this big ...)

Regards
  David
0
 
NARANTHIRANCommented:
Since you say sometimes it works fine, Check whether the tabel is locked.
In these case a user has to wait till the tabel is unlocked or if the waiting time exceeds the limit
it will get "time out also..

To view the locked table use the command sp_lock in the query analizer or SSMS active monitor..
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now