• Take a look in the Activity Monitor in SSMS on the SQL Server at the moment the clients query seems to hang. Look at all the processes/queries that are executed against the database and look for the wait resources and/or blocking processes.

    Detaching and attaching the database should not be the solution. When this work-around solves your problem it is probably because your query is being blocked. Detaching and attaching the database effectively kills all connections to the database, after which your query can be started again. You should however investigate which other process is blocking your query en subsequently investigate why that other process keeps on running or is running too long or runs at that particular moment.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **