We've been using this sproc for quite some time now, but we've been having the occational problem with it.
Today my coleague suggested this:
ALTER DATABASE MyDB
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE
which we're going to try.
Is this wise?
Best regards,
Henrik