无法连接到Sql Server 2005 [英] Cannot connect to Sql Server 2005

查看:100
本文介绍了无法连接到Sql Server 2005的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生,
打开我的应用程序sql数据库时出现以下错误
由于该用户实例的启动过程失败,因此无法生成SQL SERVER的用户实例.该连接将被关闭."

解决方案

检查您的连接字符串:您可以访问它列出的服务器吗?
如果这确实是ASP.NET,您是否尝试在生产站点上访问开发服务器?或反之亦然?

您是否在应用程序可以访问的计算机上安装了SQL Server?


您好,
您曾经尝试在SQL Server 2005 Express(或更高版本)上从Visual Studio创建用户实例数据库,并收到此可怕的更令人困惑的消息吗?:

由于启动用户实例的过程失败,因此无法生成SQL Server用户实例.连接将关闭."

如果您这样做了,并试图找到解决方法,那么您可能在数小时内用Google搜索(或Binged),却找不到真正可行的解决方案.

好吧,让我们结束这一点.需要完成两个简单的事情:

步骤1.在您的SQL Server安装上启用用户实例
首先,我们要确保已启用SQL Server安装的用户实例.

转到SQL Server Management Studio中的查询窗口",然后键入以下内容:

exec sp_configure``已启用用户实例",1.
转到
重新配置

运行此查询,然后重新启动SQL Server.

步骤2.删除旧文件
现在,我们需要删除所有旧的用户实例.
转到C驱动器,找到并完全删除此路径(以及其中的所有文件):

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

(请不要忘记使用当前用户名替换路径中的YOUR_USERNAME(如果不确定,请转到C:\ Documents and Settings \路径进行查找).

删除此目录后,您可以转到Visual Studio,创建ASP.NET WebSite,然后单击您的App_Data文件夹,然后选择添加新项",然后选择"SQL Server数据库",它应该可以正常工作!!! >

Sir,
I have following error while opening my application sql database
"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."

解决方案

Check your connection string: can you reach the server it lists?
If this is really ASP.NET, have you tried to reach your development server on the production site? Or vice versa?

Do you have SQL Server installed on a machine the application can reach?


Hello,
you ever tried to create a user instance database from Visual Studio on SQL Server 2005 Express (or above) and got this terrible more confusing message?:

"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."

If you did and tried to find how to resolve this you probably Googled (or Binged) for hours without being able to find the solution that really works.

Well lets put an end to that. Two simple things need to be done:

Step 1. Enabling User Instances on your SQL Server installation
First we are gonna make sure we have enabled User Instances for SQL Server installation.

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

exec sp_configure ''user instances enabled'', 1.
Go
Reconfigure

Run this query and then restart the SQL Server.

Step 2. Deleting old files
Now we need to delete any old User Instances.
Go to your C drive and find and completely DELETE this path (and all files inside):

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

(Dont forget to replace the YOUR_USERNAME in the path with your current username (if you are not sure just go to C:\Documents and Settings\ path to figure it out).

After deleting this dir you can go to Visual Studio, create ASP.NET WebSite and click on your App_Data folder and choose Add New Item and then choose SQL Server Database and it should work!!!


这篇关于无法连接到Sql Server 2005的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆