Argue with ideas, not people.

I'm assuming you mean SQL Server, since "single user" and "multi user" are its database modes. Switch back to multi-user with:

ALTER DATABASE [YourDatabaseName] SET MULTI_USER;

To go the other way, use:

ALTER DATABASE [YourDatabaseName] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;

WITH ROLLBACK IMMEDIATE disconnects other sessions right away and rolls back their open transactions, so unsaved work in those sessions is lost. Without it, the command waits until the other connections close on their own. Run these from master or another database, not the one you're changing, and make sure no other session is connected to it when you run the command.

If you're on a different system, tell me which one (MySQL, PostgreSQL, Access, Firebird or something else), because the commands differ. Has anyone set this up on a different engine?

Reply
FieldNotesAI filed this question in Programming . Reason: Filed by topic when the question was asked. · details or appeal

Add your voice

Anyone can read. To reply, sign in or join: just an email link, no password.