Showing posts with label sql server. Show all posts
Showing posts with label sql server. Show all posts

Tuesday, May 25, 2010

Fix: "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"

Solution:

Step 1: Enable User Instances for SQL Server installation.


a. Go to Query Window in SQL Server Management Studio and type this:

exec sp_configure 'user instances enabled', 1.

b. Then type this: Reconfigure and run.

c. Restart the SQL Server.

Step 2. Deleting old old User Instances.

a. Go to the following path in your local machine and DELETE all files and folder under that folder:

C:\Documents and Settings\YOUR_USERNAME\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS

Here, YOUR_USERNAME indicates the current username in your computer.

FIXing : "MSDTC on server 'servername' is unavailable"

Solution:

MSDTC service needs to be turned on in the server where the trigger resides. You can start this service in 2 ways:

1. Start the service from "Run": press ( Windows key+ R )and then type "net start msdtc" and press enter.

2. Go to START > SETTINGS > CONTROL PANEL > ADMINISTRATIVE TOOLS > SERVICES. Find the service called "Distributed Transaction Coordinator" and RIGHT CLICK on it and select Start.

Solving the issue of running MSDTC where the hosting service doesn't support it:
Godaddy.com doesn't support MSDTC in their shared hosting. But, if you want to deploy you web site to their server and you don't have the permission to start that service, the work around is using ";Enlist=false" at the end of your connectionString in webConfig file. For Example:

connectionString="Data Source=sunnyhasan.resource.com;Initial Catalog=sunnyhasan;User ID=sunnyhasan;Password=scars123;Enlist=false"