“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)
This entry was posted in General and tagged , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.
blog comments powered by Disqus
  • About Gary Burge

    I am a graying web programmer, techno-activist, romantic idealist, who never quite left the sixties, even though I became quite successful in the Internet space.

    My business philosphy is different now than when I toiled in the bigco world. About a decade ago I experienced a life-altering epiphany: I was sacrificing my personal life and health to feed a corporate monster.

    More...