Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
431 views
in Technique[技术] by (71.8m points)

sql-server-2008 - 如何连接到SQL Server 2008 Express的本地实例(How to connect to local instance of SQL Server 2008 Express)

I just installed SQL Server 2008 Express on my Vista SP1 machine.

(我刚刚在Vista SP1计算机上安装了SQL Server 2008 Express。)

I previously had 2005 on here and used it just fine with the old SQL Server Management Studio Express.

(我以前在这里安装了2005,并在旧的SQL Server Management Studio Express中使用了它。)

I was able to connect with no problems to my PC-NAME\SQLEXPRESS instance (no, PC-NAME is not my computer name ;-).

(我能够毫无问题地连接到我的PC-NAME \ SQLEXPRESS实例(不,PC-NAME不是我的计算机名;-)。)

I uninstalled 2005 and SQL Server Management Studio Express.

(我卸载了2005和SQL Server Management Studio Express。)

I then installed SQL Server 2008 Express on my machine and elected to have it install SQL Server Management Studio Basic.

(然后,我在计算机上安装了SQL Server 2008 Express,并选择让它安装SQL Server Management Studio Basic。)

Now, when I try to connect to PC-NAME\SQLEXPRESS (with Windows Authentication, like I always did), I get the following message:

(现在,当我尝试连接到PC-NAME \ SQLEXPRESS(像往常一样使用Windows身份验证)时,收到以下消息:)

Cannot connect to PC-NAME\SQLEXPRESS.

(无法连接到PC-NAME \ SQLEXPRESS。)

A network-related or instance-specific error occurred while establishing a connection to SQL Server.

(建立与SQL Server的连接时发生与网络相关或特定于实例的错误。)

The server was not found or was not accessible.

(服务器未找到或无法访问。)

Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

(验证实例名称正确,并且已将SQL Server配置为允许远程连接。)

(provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476

((提供者:SQL网络接口,错误:26-错误指定服务器/实例的位置)(Microsoft SQL Server,错误:-1)有关帮助,请单击: http : //go.microsoft.com/fwlink?ProdName= Microsoft+SQL + Server&EvtSrc = MSSQLServer&EvtID = -1&LinkId = 20476)

When I installed SQL Server 2008, I had it use SQLEXPRESS as the local instance name.

(安装SQL Server 2008时,我使用SQLEXPRESS作为本地实例名称。)

As far as I can tell, through SQL Server Configuration Manager, SQL Server is configured to allow remote connections.

(据我所知,通过SQL Server配置管理器,SQL Server配置为允许远程连接。)

When I went to the help link it mentions, the help page suggests the following:

(当我转到其中提到的帮助链接时,帮助页面会建议以下内容:)

  • Make sure that the SQL Server Browser service is started on the server.

    (确保在服务器上启动了SQL Server浏览器服务。)

  • Use the SQL Server Surface Area Configuration tool to enable SQL Server to accept remote connections.

    (使用SQL Server外围应用配置器工具,可以使SQL Server接受远程连接。)

    For more information about the SQL Server Surface Area Configuration Tool, see Surface Area Configuration for Services and Connections.

    (有关SQL Server外围应用配置器的更多信息,请参见服务和连接的外围应用配置。)

Well, as far as I can tell, there is no SQL Server Browser service on my system (looked in MMC for one, couldn't find one).

(好吧,据我所知,我的系统上没有SQL Server Browser服务(在MMC中查找了一项,找不到了)。)

And the SQL Server Surface Area Configuration tool doesn't exist in SQL Server 2008. So good job there with your help documentation, Microsoft ;-).

(而且,SQL Server 2008中不存在SQL Server外围应用配置器工具。在您的帮助文档中,Microsoft ;-)很好。)

I'm at a loss for what to do right now.

(我不知道该怎么办。)

I had a lot of work I was hoping to get done today after upgrading to 2008 (the person I'm working with got it up and running with no problem and told me it would be easy - he's also far better with database stuff that I am).

(升级到2008年之后,我有很多工作希望在今天完成(与我一起工作的人可以毫无问题地启动并运行它,并告诉我这很容易-他在处理数据库方面也要好得多上午)。)

Does anyone have any idea what might be wrong?

(有人知道什么地方可能出问题吗?)

I'd really appreciate it.

(我真的很感激。)

If I can't get this working in a few hours, I'm going back to SQL Server 2005 (if that will even work, gah...).

(如果几个小时后仍无法正常工作,我将返回到SQL Server 2005(如果可以正常使用,等等)。)

Edit: I have tried turning Windows Firewall off, and that did not help.

(编辑:我曾尝试关闭Windows防火墙,但没有帮助。)

Also, I noticed that I do not have a "Data" directory under my SQL Server 2008 install directory tree - could I have possibly set something up wrong when I installed it?

(另外,我注意到我在SQL Server 2008安装目录树下没有“数据”目录-安装时是否可能设置了错误?)

  ask by Rob translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Please check the ServerName which you provided.

(请检查您提供的ServerName。)

It should match with the below shown Name in the UserName textbox, and that name should followed with \SQLEXPRESS :

(它应该与UserName文本框中显示的以下名称匹配,并且该名称后应带有\SQLEXPRESS :)

连接对话框


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...