Re: error: "Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.



Found the problem after checking the error log. Since this is the first
time the user creates a User Instance connection, it appears that the system
was trying to copy some system databases in [c:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Template Data] to the user's application data folder at
[C:\Documents and Settings\...\Microsoft SQL Server Data\SQLEXPRESS]. The
problem is: I didn't install Sql Express in the default [c:\Program
Files\Microsoft SQL Server] directory. After copying the Template Data
folder to the Microsoft supposed "default" folder, the connection problem
went away. Is this a bug or what?

While connection problem is solved, another problem pops up: can read but
can't write to the database. The error reads:
Failed to update database "C:\INETPUB\WWWROOT\MYAPP\APP_DATA\MYDATABASE.MDF"
because the database is read-only.
I've checked the permissions and found that the ASPNET user not listed on
the APP_DATA folder. After adding it, I can write to the database. So
it looks like I have to add that user to every App_Data folder manually.
Thank you for your info; it's very helpful in solving this Write issue.


"Roger Wolter[MSFT]" <rwolter@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:Ol3Qink%23GHA.3348@xxxxxxxxxxxxxxxxxxxxxxx
The most common cause for this is that the user doesn't have execute
permissions on sqlservr.exe or write permissions on its user directory.
Both of these conditions are very rare however. Setup should set the
permissions as long as setup is run as an administrator. If you're
running an Asp.Net page through IIS, the user that needs the permissions
is the ASP.Net user not the user running the browser.

--
This posting is provided "AS IS" with no warranties, and confers no
rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"E. Kwong" <ekwong999AThotmail.com> wrote in message
news:uus%23Lqf%23GHA.3480@xxxxxxxxxxxxxxxxxxxxxxx
Am new to Sql Server Express but using it doesn't seem "easy" . When
executing a very simple sample program in Visual Studio 2005, this
message occurs:
Failed to generate a user instance of SQL Server due to a failure in
starting the process for the user instance. The connection will be
closed.
The mdf is a local database inside a App_Data folder. Everything (VS
2005, SQL Express, IIS, ...) resides on my local XP workstation.

I've read in some forum that mentions deleting the SQL Server folder in
the Documents and Settings folder. Tried that but still doesn't work.

This is getting extremely frustrating. Any insight much appreciated.
Thanks.





.



Relevant Pages

  • Re: Database Backup
    ... Have you checked the actual permissions for the folder? ... Columnist, SQL Server Professional ... > I am trying to backup the database, ...
    (microsoft.public.sqlserver.security)
  • Re: Location for shared Access database
    ... Can anyone tell me where I should put a simple Access database file in order to be accessible for every computer in the network? ... I don't think that the "Programs" folder is the right place. ... For a network-shared database, use SQL Server instead: ... This will work on Vista as well, although you'll need to adjust the local folder permissions since users don't have write permissions on c:\ by default. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: An error has occurred while establishing a connection to the server
    ... Like I said all may aspx pages works perfect except the ones resides ... there is no problem with sql connection with pages out of this folder. ... SQL Server 2005, by default, the named pipes provider is not enabled. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Access to data folder on network drive
    ... As far as connection itself, he will be connecting from India, and I ... files on the data drive of our SBS2003 folder. ... When I set up a server, I like to create my own AD security ... Authenticated Users for NTFS permissions. ...
    (microsoft.public.windows.server.sbs)
  • Re: (Newbie)Application Roles
    ... level: the database itself. ... SQL Server accommodates these needs through the use of application ... the user's connection through a specific application. ... the connection permanently loses all permissions applied to ...
    (microsoft.public.sqlserver.security)