“Generating user instances in SQL Server is disabled”

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:

  1. 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”
  2. Execute the command by clicking the “Execute” button
  3. Next, delete the previous command and enter this text (without the double quotes):
    “reconfigure”
  4. Execute the command
  5. 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)
  6. If Visual Studio was open while you did this, close it, then reopen it before attempting to recompile (don’t ask why)

One comment

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s