Sql-server – Can i alter a database to single user which is configured in log shipping

compatibility-levellog-shippingsql serversql-server-2012

We are using a production database (SQL Server 2012) and database compatibility mode is 90 (SQL Server 2005).

  1. Can I alter the database to single user mode and change to 110?
  2. What will be the impact if run Alter database <DBNAME> SET SINGLE_USER with rollback immediate
  3. After changing the compatibility level and switching to multi user will Log shipping work?

Best Answer

There's several parts to this question:

Do I need to set the database to single user mode to change the compatibility level? No.

Will changing the compat mode from 90 to 110 break log shipping? No.

Can I change a log shipped database to single user mode? Yes, but don't do that unless you have to. Sometimes, you might not end up being the single user (like if someone else grabs the connection from you, like if your SSMS crashes after you set it to single user mode.)