views:

327

answers:

1

Ok so I had first downloaded SQL Server Express 2008 and Wed Developer Express 2008, and I could not integrate the two together. Was getting error messages that were wasking for the correct version of SQL Server 2005, so....

I uninstalled SQL Server Express 2008, and installed SQL Server Express 2005.

Now I open the Visual Web Developer and tried to add an item (SQL Database) to the App_Data folder in a web site project, and now I am getting the below error.

"generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances."

Ok so I know I can create databases, and tables in the SMS Express, however I have a bunch of training material that is based on the above approach. SO can someone please help me with the above error please??? Thanks very much.....

also should note that the above are installed on my home computer for learning purposes.

+1  A: 

The following asp.net forum post has a possible solution:

http://forums.asp.net/p/1035148/1429516.aspx

You have to run the following query

sp_configure 'user instances enabled', 1; RECONFIGURE

This can be done in SMS express.

Waleed Al-Balooshi
thanks for the help!! ok so i ran that query and it solved that problem however now i am getting an error that says "failed to generate a user instance of sql server due to a failure in the starting process for the user instance. the connection will be closed." so i am not sure what the problem is now
Justin
hence i am still not able to accomplish adding a database to the app_data file??
Justin
Try step two in this page:http://www.aspdotnetfaq.com/Faq/fix-error-Failed-to-generate-a-user-instance-of-SQL-Server-due-to-a-failure-in-starting-the-process-for-the-user-instance.aspxThis assumes windows XP, but I am pretty sure you can find the directory for Vista or Windows 7. If this doesn't work you can try changing the Sql Server Service to run using Local or System account then restart it.
Waleed Al-Balooshi
You can also try some of the suggestions from this thread:http://forums.asp.net/t/1377174.aspx
Waleed Al-Balooshi
thanks Waleed!! I appreciate the help with this. Now i just have to find that folder in Vista..hehehe. Thanks!
Justin
In case you haven't found it I believe it will be here in Vista:C:\Users\<username>\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS
Waleed Al-Balooshi
thats it..i should delete this?!?! will the sql server management studio express still function properly if i do that??
Justin
You need to delete the SQLEXPRESS folder and everything under it. This folder holds data particular to SQL express and should not affect the management studio.
Waleed Al-Balooshi
i did that, and then it let me add a blank database to the app-data folder in the web developer, however then after I tried to modify anything at all, I am on to another error. Thanks though for your help. This is becoming more trouble than it is worth trying to set this up, just to learn some stuff.
Justin
What error are you getting?
Waleed Al-Balooshi
so i created a database called example just to test it. and it worked. Then in the database explorer i right clicked on tables just to simply add a table, and then got = 'Could not load file or assembly Microsoft.SqlServer.Management.Sdk.Sfc, Version 10.0.0.0, Culture=nuetral, PublicKeyToken=89845dcd8080cc91 or one of its dependancies. The system cannot find the file specified.' So I am not sure about this one either...man i am learning something on the account of errors at least! HEHE
Justin
Try the following link:http://chiragrdarji.wordpress.com/2009/05/14/could-not-load-file-or-assembly-microsoft-sqlserver-management-sdk-sfc/Basically you need to download the listed files from the link provided and install them. Hopefully this will fix the problem
Waleed Al-Balooshi
Actually try "Microsoft SQL Server 2008 Management Objects" first and if that doesn't work then try the other two files.
Waleed Al-Balooshi
Waleed!! thanks so much....looks like this is actually working now. it only took me two days to get this worked out. wished I had spoke with you earlier! THANKS VERY MUCH!
Justin
Cool. I am happy things are working now. Good luck with learning .Net
Waleed Al-Balooshi