• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

MS SQL 2005 timeout problem

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    MS SQL 2005 timeout problem

    Hi
    I am working in the Management Studio on a MSSQL2005 and on a complex view I get a "Timeout expired" message after 30 seconds when I try to execute the query.

    I have looked in several places and changed the timeout settings from the standard 30 sec to something else like 120 sec but I still get the timeout problem.

    It is my own database so I can change settings without restrictions.

    Do you guys know the magic bullet for this problem?
    "Condoms should come with a free pack of earplugs."

    #2
    Seen this myself and can only offer a workaround.
    If you right click on an object like a table or view and return the resultset - it will always impose the 30 seconds timeout.
    I have tried changing the value in the client tool and the default on the database but neither affected this limit.
    The only thing to do is to run the query in a query window so type our 'SELECT* from ...' rather than the right click.

    Comment


      #3
      thanks - I will try this tonight
      "Condoms should come with a free pack of earplugs."

      Comment


        #4
        Originally posted by crack_ho View Post
        The only thing to do is to run the query in a query window so type our 'SELECT* from ...' rather than the right click.
        this works - thanks
        "Condoms should come with a free pack of earplugs."

        Comment


          #5
          Try upping value in registry of...

          HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\90\Tools\Shell\DataProject\SQLQueryTimeout

          Comment


            #6
            Originally posted by lightng View Post
            Try upping value in registry of...

            HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\90\Tools\Shell\DataProject\SQLQueryTimeout
            I had already done that.

            crack_ho's tip is working.
            Now I just need to learn how to "package" the execution of the view with a stored procedure or something similar
            "Condoms should come with a free pack of earplugs."

            Comment


              #7
              Originally posted by ThomasSoerensen View Post
              I had already done that.

              crack_ho's tip is working.
              Now I just need to learn how to "package" the execution of the view with a stored procedure or something similar

              Can't you do

              CREATE PROC GetViewData
              (@Param1 varchar(100))
              AS
              SELECT * FROM MySlowView WHERE Field1 = @Param1

              ?

              Comment


                #8
                I was having a similar problem, until I used "no lock" in the query. That fixed the problem and I haven't had any time out issues since.

                Comment

                Working...
                X