I've tried modifying my workflow to prevent this need but haven't had much luck in the process. Its been a while since I tried, I think it has something to do with some settings in SQL Server. What I am doing is updating layers from the county (parcels, addresses, centerlines). I discovered that the fastest and easiest way to avoid any locks was to simply stop services run the updates and then restart them. Running the scripts has been the only reasonable way to get this accomplished. Personally, I think Esri should just have a built in tool that allows you to do this and I wouldn't have this constant problem but I know there is a way to prevent these locks from happening, just haven't been able to figure it all out.
Josh White, AICP
Principal Planner
City of Arkansas City