SQL Server 2008 replication failing with: process could not execute ‘sp_replcmds’

When I had this problem, my database didn’t have an owner set properly. I had restored a database from another windows domain, right clicked the database -> properties and verified in the “general” tab that the owner was set correctly. However, in the “files” tab, owner was not set at all. As soon as I … Read more

How can I force a subquery to perform as well as a #temp table?

There are a few possible explanations as to why you see this behavior. Some common ones are The subquery or CTE may be being repeatedly re-evaluated. Materialising partial results into a #temp table may force a more optimum join order for that part of the plan by removing some possible options from the equation. Materialising … Read more