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
mcrmgAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

HuaMin ChenProblem resolverCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Naranthiran DSystem AdministratorCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.