Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 13th, 2008, 12:03 PM
Authorized User
 
Join Date: Apr 2008
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL Server Connection and Database Problem

I am using C# Express and Web Development Express. When I am setting up a local database connection and a local SQL Server database the following error message is displayed "Failed to generate a user instance of SQL server due to a failure in starting process for the user instance. The connection will be closed.

The connection and the database are not connected.

Thank you in advance for your assistance.
 
Old November 13th, 2008, 03:26 PM
Authorized User
 
Join Date: Apr 2008
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is how I fixed my problem from a solution I found on the Internet.

OK. First know that the error message you are getting is very often caused (if not by the issues described by my original post) by using Terminal Server to get into the box and then using SSE. There is a fix for the TS bug posted by Windows.

But, the error message is fairly general; it catches a number of different issues. Your original bug description didn't mention TS and you are *currently* able to get into SSE under a different profile.

So, here's some additional info about how SSE runs under this mode. When you first run SSE this way, it makes a local copy of master etc. in C:\Documents and Settings\<your user account name>\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS. That's why it's so slow the very first time it loads under a new user profile. It may even timeout the first time you ever use it under a given profile.

Based on your description, it's very possible something went bad in those files for some reason. So, I would first make a backup and then delete the SQLExpress directory under C:\Documents and Settings\<your user account name>\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data. That will get rid of the local copy of master, etc. Then, reboot.

When you run under your user account again and try to connect to SSE, it will recopy all of the appropriate files (master, etc.) to your local settings. It should work after that. You shouldn't worry about the recopy of master etc. Generally, unless you are adding logins, etc, (which you don't need to if you are working with UserInstance=true) the recopy of master should be fine.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Database connection with SQL Server yubaraj JSP Basics 3 May 29th, 2007 04:39 AM
Problem with my sql server express connection saif44 ASP.NET 2.0 Basics 9 June 13th, 2006 05:07 PM
sql server connection problem in msde oldbig89 SQL Server 2000 1 February 8th, 2006 05:46 PM
SQL server connection problem rajanikrishna Classic ASP Databases 1 February 18th, 2004 08:22 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.