Hi, I have visual basic team 2005 beta that come with sql server express,
and i am trying to connect to a database on my local computer.
And i get this message "Failed to generate a user instance of SQL Server
due to a failure instarting the process for the user instance. The connection will be closed". If u ever heard of the Northwind database it is the one i am trying to
use I don't know much about how to configure server, but i am running this on
Window XP Pro and i am using a a user account with administrator privilages.
I even tried to create a new database and i get the same message.
I get the same problem, not sure if anyone is monitoring this forum tho'|||If you are trying to attach the Northwind database it is most likely failing because the database is still attached to your main SQL Server process. You could either run sp_detach_db 'northwind' to detach the database from the main instance or copy the northwinf mdf and ldf files to another location to play with.|||I'm not trying to connect to any database - I simply created a site to test out the new web portal controls in beta 2. Navigating to a page in the site that uses Web Parts fails with this error - all other pages work fine (including a page with databound controls tied to a Sql Server instance on another machine.)I understand that the issue is Sql Express is attempting to create a database in the App_Data directory, and that it cannot for security reasons.
I have given full rights for the directory to the Network Services, ASP.Net and IUSR accounts, but to no avail.
The error message indicates that it may be due to the Sql User permissions:
the logged-in user needs the dbcreator privilege in the appropriate SQL Server Express instance.
However there is no way (at least that I can find) to manage user security in SQL Express. I've installed the Express Manager (XM) but it doesn't have any security editing capabilities.
I cannot manage the instance using Enterprise Manager, and I cannot install SQL Server 2005 (believe me, I've tried) to use Sql Server Mansagement Studio.
I'm currently working on a review of the 2.0 Framework and I have a presentation to Management next week, so if anyone can shed some light on this it would be greatly appreciated.
Thanks,
Tyler|||Try changing Setting "User Instance=False" in your connection string and in the dialog.|||I was replying to the guy who was trying to attach Northwind and I assumed when you said you had the same problem you meant you were trying to attach a database also. If you are getting this error, you are trying to open a connection to a database with UserInstance = true and the database file specified in the connection string is in use. With an ASP page, the most common problem is that the IDE still has a connection to the database open and so it's user instance has the database file open with an exclusive lock. I don't know enough about the Web Portal controls to know what kind of databse access it is trying to do.|||No Worries Roger, I appreciate the help!
I'll give the userinstance setting a try and let you know what I find out...
Thanks!
Tyler|||Thanks Roger and Nutty -
Changing the setting to false was the trick! (it was set to true in Machine.config)
Appreciate your help!|||P.S. How do I mark a post as the ANSWER?|||the user instance must be set to false and make sure that your data source is .\SQLEXPRESS or (local)\SQLEXPRESS and not ComputerName\SQLEXPRESS.
SQL server 2005 express disables remote connections. see http://codebetter.com/blogs/sahil.malik/archive/2005/11/5.aspx
No comments:
Post a Comment