如何在Visual Studio 2015中的SQL Server 2014中查找服务器名称? [英] How to find server name in SQL server 2014 in visual studio 2015?

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

问题描述

您好。

自安装Visual Studio 2015社区以来,它已经过了几个小时或者一天。



这个VS2015有自动安装的SQL ...当我连接到数据库时,ot需要一个服务器名称......

我在我尝试了所知道的所有服务器名称后,我一无所知。请帮我解决一下这个。提前谢谢。



我的尝试:



我试图谷歌我的问题,但似乎。安装在计算机上的每个sql都有自己的服务器名称,我认为我的服务器名称是唯一的。如果我错了,请纠正我。

Hi.
Its been an hours or day since I installed the Visual Studio 2015 community.

This VS2015 has its automatic installed SQL... When I conmect to the database, ot requires a Server Name...
I am clueless after I tried all the server names I knew. Please help me with this. Thank you in advance.

What I have tried:

I tried to google my problem, but it seems. every sql installed in a computer has its own server name which I think mine is unique.. correct me if Im wrong.

推荐答案

最简单的方法是创建一个新的连接:

1)打开服务器资源管理器窗格。

2)右键单击数据连接并选择添加连接

3)In在下面的对话框中,选择您的DataSource(Microsoft SQL Server(SqlClient)可能是正确的),然后打开服务器名称下拉列表 - 它将列出它可以找到的所有SQL Server实例。如果没有列出任何内容,请单击刷新并再试一次。

4)选择数据库,指定安全信息,然后按测试连接按钮。

4)当连接工作时,按确定

5)在服务器资源管理器窗格中突出显示数据库,然后查看属性窗格。将显示连接字符串的工作示例,您可以将其复制并粘贴到您的应用程序或配置文件中。



但我会安装一个单独的SQL Server Express您的开发机器上的实例 - 我不确定VS社区版本的SQL是否包含SSMS,这比内置到VS数据库管理更有用。
Simplest way is to create a new connection:
1) Open the Server Explorer pane.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource ("Microsoft SQL Server (SqlClient)" is probably right), then open the drop down by "Server name" - that will list all the SQL Server instances it can find. If it doesn't list any, click "Refresh" and try again.
4) Select database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.

But I'd install a separate SQL Server Express instance on your dev machine - I'm not sure that the VS Community version of SQL includes SSMS, which is much more useful than the "built in to VS" db management.


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

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