2016 sqlserver的实例名称是什么 [英] What is the instance name of 2016 sqlserver

查看:762
本文介绍了2016 sqlserver的实例名称是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是安装SQL2016 VERSION.FOR连接到数据库问我服务器名称我提到了本地主机\ MSSQLSERVER但是它在连接数据库时显示错误消息。请告诉我什么是新版本SQL的实体名称。



我尝试过:



我尝试过这个服务器名:localhost \ MSSQLSERVER。

下次.\mssqlserver。

下次systemname \ mssqlserver

I AM JUST INSTALLING THE SQL2016 VERSION.FOR CONNECTING TO DB IT ASKS SERVER NAME I AM MENTIONED THE LOCALHOST\MSSQLSERVER BUT IT SHOWS ERROR MESSAGE WHEN CONNECT TO DB. PLEASE SUGGEST ME WHAT IS THE INSTANCE NAME OF NEW VERSION SQL.

What I have tried:

I am tried like this servername:localhost\MSSQLSERVER.
next time .\mssqlserver.
next time systemname\mssqlserver

推荐答案

这取决于您安装的SQL Server版本。如果您没有安装Express,则没有实例名称。您通过TCP / IP连接到它,这将只是localhost部分。您必须更改默认选项才能创建命名实例。



出于安全考虑,通过任何网络与新SQL Server的远程连接都将被关闭!您必须进入SQL Server配置管理器,在SQL Server网络配置项,MSSQLSERVER协议下,并启用TCP / IP。您可以在所有程序 - >下找到此工具。 Microsoft SQL Server 2016 - >配置工具。



现在,如果您安装了Express版本(安装程序看起来完全相同!),则默认实例名称为SQLEXPRESS。
That depends on the edition of SQL Server you installed. If you did NOT install Express, there is no instance name. You connect to it over TCP/IP, which would be just the "localhost" part. You would have to change the default option to create a named instance.

For security reasons, remote connections over any network to a new SQL Server are turned off! You have to go into the SQL Server Configuration Manager, under the SQL Server Network Configuration item, Protocols for MSSQLSERVER and enable TCP/IP. You can find this tool under All Programs -> Microsoft SQL Server 2016 -> Configuration Tools.

Now, if you installed the Express edition (the installer looks identical!) the default instance name is "SQLEXPRESS".


1)不要大喊大叫。使用所有大写字母被认为是在互联网上大喊大叫,粗鲁(使用所有小写字母被认为是幼稚的)。如果你想认真对待,请使用适当的大写字母。

2)我们不知道:你安装了它!



最简单的方法找出是使用SSMS(如果它安装在您的系统上)或Visual Studio(可能是)。它们中的任何一个都内置了scan for instances。

对于SSMS:

运行它,在连接到服务器对话框中,打开服务器名称 下拉菜单,然后选择<浏览更多...>

在出现的对话框中,选择网络服务器标签,完成后打开数据库引擎 分支。



对于VS:

打开服务器资源管理器窗格,查看服务器 - 您可能需要等待或刷新在它们变得可见之前。

您也可以从这里获取连接字符串:

尝试使用Server Explorer窗格在VS中建立连接:

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

2)在随后的对话框中,选择您的数据源和数据库,指定安全信息,然后按测试连接按钮。

3)连接工作时,按确定

4)在服务器资源管理器窗格中突出显示数据库,然后查看支持 erties窗格。将显示连接字符串的工作示例,您可以将其复制并粘贴到您的应用程序或配置文件中。
1) DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalization if you want to be taken seriously.
2) We don't know: you installed it!

The simplest way to find out is to use either SSMS (if it's installed on your system) or Visual Studio (which probably is). Either of them has a "scan for instances" built in.
For SSMS:
Run it, and at the "Connect to server" dialog, open the "Server name" drop down, and select "<browse for more...>"
In the dialog that appears, select the "Network Servers" tab, and when it's finished, open the "Database Engine" branch.

For VS:
Open the Server Explorer pane, and look under "Servers" - you may have to wait or refresh before they become visible.
You can get the connection string from here as well:
Try setting up a connection in VS with the Server Explorer pane:
1) Right click "Data connections" and select "Add connection"
2) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
3) When the connection works, press "OK"
4) 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.


这篇关于2016 sqlserver的实例名称是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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