Sql server name“。”不行 [英] Sql server name "." not work

查看:80
本文介绍了Sql server name“。”不行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法使用服务器名称登录。

请提供登录解决方案。



我是什么尝试过:



https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/connect-to -sql-server-when-system-administrators-locked-out

I can not work log in with server name .
Please give solution for log in with .

What I have tried:

https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/connect-to-sql-server-when-system-administrators-are-locked-out

推荐答案

尝试使用Server Explorer窗格在VS中设置连接:

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

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

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

4)当连接正常时,按OK

5)突出显示你的服务器资源管理器窗格中的数据库,然后查看属性窗格将显示连接字符串的工作示例,您可以将其复制并粘贴到您的应用程序或配置文件中。
Try setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and 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.


这取决于您的服务器,如果是SQL Server Express,您需要一些东西喜欢
It depends on your Server, if it is SQL Server Express you need something like
Data Source="your pc name\\SQLEXPRESS

此外,您应该知道服务器是否使用 Windows身份验证 SQL Server身份验证,请在此处查看答案: c#2008 SQL Server Express连接字符串 - 堆栈溢出 [ ^ ]

Also you should know if the Server uses Windows Authentication or SQL Server authentication, see answers here: c# 2008 SQL Server Express Connection String - Stack Overflow[^]






我们可以在SQL中使用服务器名称。登录服务器管理工​​作室在SQL服务器实例运行系统。我的意思是它被认为是。作为SQL服务器系统的本地主机。但是你要连接SQL服务器r通过应用程序命名。。建议不要使用SQL服务器名称。。在代码中。
Hi,

We can log in with server name "." in SQL server management studio in the SQL server instance running system. I mean it is considered the "." as local host of the SQL server system. But you want to connect the SQL server name "." through the application. it is not recommended the good practice to use the SQL server name "." in the code.


这篇关于Sql server name“。”不行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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