SQL Server Performance

Wicked asp/sql-problem

Discussion in 'General Developer Questions' started by frettmaestro, Jan 15, 2004.

  1. frettmaestro New Member

    I have an asp-page that calls an sp with a select, and dumps it out on a webpage. Plain and simple. The weird thing is that when I run the asp-page it hangs and I get an error message saying "Timeout expired". When I take the *exact* same sp with the same parameters and run it in QA with the same login-credentials it works like a charm, and when I run a different sp with different parameters from this same asp-page it works great. I have tried to run this procedure from several asp-pages but it just doesn't work...any pointers...?

    I just degraded my production servers from Win2k3 to Win2k SP4 and allthough I don't belive this to be the cause of anything I thaught it was worth mentioning. New disks with the new OS have been installed and the database was detatched and then attached again. The rest of the hardware is exactly the same.

    --
    Frettmaestro
    "Real programmers don't document, if it was hard to write it should be hard to understand"
  2. Luis Martin Moderator

    After attached, did you update statistics?


    Luis Martin

    ...Thus mathematics may be defined as the subject in which we never know what we are talking about, nor whether what we are saying is true.
    Bertrand Russell
  3. frettmaestro New Member

    No I didn't...but could the statistics cause such an error? When I run the sp from QA it all work perfectly...

    --
    Frettmaestro
    "Real programmers don't document, if it was hard to write it should be hard to understand"
  4. Luis Martin Moderator

    If you attach db to other SQL, is neccesary update statistics, because original ones remain in original SQL.

    I don't said statistics cause such error, but if I were you, update will my fist step.



    Luis Martin

    ...Thus mathematics may be defined as the subject in which we never know what we are talking about, nor whether what we are saying is true.
    Bertrand Russell
  5. Negative New Member

    You may also want to try recompiling the stored procedure, and qualify the stored procedure name in the call from the asp page. i.e. cn.execute("dbo.usp_MySp");
  6. frettmaestro New Member

    I must say I'm totally puzzled here because I would never have guessed that this would solve anything, but after updating statistics on all tables it worked! I serously don't know what I would have done without you guys...hopefully my knowladge will increase to a level where I too can provide the brilliant help that I have recieved from this site <img src='/community/emoticons/emotion-1.gif' alt=':)' /><br /><br />--<br />Frettmaestro<br />"Real programmers don't document, if it was hard to write it should be hard to understand"

Share This Page