The issue is that there are certain users that keep certain applications open instead of shutting down their PCs overnight - this keeps locks on tables and that has an impact on other systems that rely on the tables being in an 'unlocked' state to do their updates etc.
I want to kill all USER connections (only) to a database. I will need to run this as a job on a nightly basis. I don't want to use:
ALTER DATABASE xxx SET SINGLE_USER WITH ROLLBACK IMMEDIATE
As I do not want to destroy the integrity of the database transaction logging.
Any ideas as to how this may be accomplished?
Thanks in advance,
JR