Blog

data loss might occur - SQL single user mode

I've been having challenges Publishing Lightswitch apps when selecting the option to "update an existing database".  For some reason, the Publish will at times run and run and never finish forcing me to kill Visual Studio.  I'm still working on the cause of that issue but when it does work, if you've deleted table rows in your LS app, you'll get an error when you try to Deploy on IIS that says:

Rows were detected. The schema update is terminating because data loss might occur.

Once you get this your database is now stuck in Single User Mode.  Here's the quick fix:

Open a query window in SQL Management Studio.

USE [master]

ALTER DATABASE [your locked DB] SET MULTI_USER WITH ROLLBACK IMMEDIATE

GO

 

 

Return TopTrackbackPrintPermalink

Comments

Got something to say? Join the discussion »

leave a reply

 [Quick Submit with Ctrl+Enter]

Remember my details
Notify me of followup comments via e-mail