Today I compiled a Microsoft ASP.Net code sample downloaded from a programming website. This error message was displayed:
“Generating user instances in SQL Server is disabled. Use sp_configure ‘user instances enabled’ to generate user instances.”
Being a Microsoft SQLServer novice, I wasn’t sure of the solution.
I executed the command “sp_configure ‘user instances enabled'” but nothing changed. Still got the error message.
After 30 minutes of Goggle trolling in development forums, I found the answer.
Here is how to fix the “user instances disabled” error:
- In SQL Server Management Studio Express (or any tool that allows you to execute an SQL command), enter this text (without the double quotes)
“sp_configure ‘user instances enabled’, 1”
- Execute the command by clicking the “Execute” button
- Next, delete the previous command and enter this text (without the double quotes):
- Execute the command
- Next, start and stop SQL Server (right click on the server name at the top of the tree list and select “Restart” from the context menu)
- If Visual Studio was open while you did this, close it, then reopen it before attempting to recompile (don’t ask why)