如何找到visual studio的服务器名称? [英] How do I find my server name for visual studio?

查看:411
本文介绍了如何找到visual studio的服务器名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在visual studio 2012中创建我的第一个数据库,但它不断出现提供者:命名管道提供程序错误:40 - 无法打开与sql服务器的连接的错误。我怀疑错误是因为我没有在创建新的SQL数据库对话框中插入正确的服务器名称。



我尝试了什么:



我正在研究的书说要在那个框中输入(本地)(我已经完成了)。我没有遵循的唯一指令是下载Microsoft SQL Server Express Edition,但我不能,因为该文件太大而不能满足我的带宽成本。此外,从下载页面,我可以推断它是一个数据库管理工具,而不是服务器本身。此外,在我的程序和功能,即安装的程序,我可以找到Microsoft SQL Server 2012 Express LocalDB。所以这不是这个相同的程序,因为它与视觉工作室一起发货(如果我错了,请纠正我)。



旁注,我下载了QueryExpress,因为它实现了相同的目标,尺寸较小,这可能证明我的问题与数据库管理工具无关。



来自此页默认和命名实例的文件位置的SQL Server | Microsoft Docs [ ^ ]我可以在驱动器上看到文件夹110。然后它说



在SQL Server安装过程中,会生成一个实例ID



这个设置是否只完成何时下载并运行266mb express版本?有没有其他方法来设置我的服务器或摆脱错误?为什么服务器名称字段不接受localhost?每个程序在逻辑上都接受localhost,为什么这个不同?谢谢。

I'm trying to create my first database in visual studio 2012 but it keeps giving errors along the lines of "provider: named pipes provider error: 40 - could not open a connection to the sql server". I suspect the error is arising because I'm not inserting a correct server name in the "Creat new SQL database" dialog box.

What I have tried:

The book I'm studying says to enter "(local)" in that box (which I have done). The only instruction of theirs I haven't followed is to download Microsoft SQL Server Express Edition but I couldn't because the file is too large for my bandwidth cost. Besides, from the download page, I can deduce it's a database management tool, not a server in itself. Moreover, in my programs and features i.e installed programs, I can find Microsoft SQL Server 2012 Express LocalDB. So isn't this the same program that got here because it ships along with visual studio (correct me if I'm wrong).

On a side note, I downloaded QueryExpress as it achieves the same aim with a lesser size which probably proves my problem isn't related to db management tools.

From this page File Locations for Default and Named Instances of SQL Server | Microsoft Docs[^] I can see the folder 110 on my drive. Then it says

During SQL Server Setup, an instance ID is generated

Is this setup only done when the 266mb express edition is downloaded and run? Is there any other way to setup my server or get rid of the error? Why doesn't that server name field simply accept localhost? Every program logically accepts localhost so why is this different? Thanks.

推荐答案

好吧,如果你已经安装了SQL Server Express,服务器名称就是.\SQLEXPRESS。



不知道你是否安装了它?根据Windows的版本打开程序和功能或应用程序和功能,然后查找Microsoft SQL Server 版本 Express LocalDB。这是数据库引擎。



QueryExpress不是数据库引擎。它是一个用于对数据库引擎运行查询的查询工具。它需要Visual Studio想要的完全相同的信息。
Well, if you have SQL Server Express installed already, the server name would just be ".\SQLEXPRESS".

Don't know if you have it installed? Open "Programs and Features" or "Apps and Features" depending on the version of Windows, and look for "Microsoft SQL Server version Express LocalDB". That's the database engine.

QueryExpress is NOT a database engine. It's a query tool used to run queries against a database engine. It's going to want the exact same information Visual Studio wants.


这篇关于如何找到visual studio的服务器名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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