sách gpt4 ai đã đi

SQL server management studio - Làm thế nào để kết nối với SQL server bằng chuỗi kết nối?

In lại 作者:行者123 更新时间:2023-12-04 21:33:30 36 4
mua khóa gpt4 Nike

我无法使用 SQL Server Management Studio 连接到 SQL Server。
我有一个连接字符串:

 

我尝试通过在服务器名中输入 myIP、在登录名中输入 MyID、在密码中输入 myPassword 来进行连接,但仍然无法连接。这是结果:

nhập mô tả hình ảnh ở đây

有没有人有想法?

Cảm ơn bạn rất nhiều.

1 Câu trả lời

因为您使用用户名和密码连接到数据库,所以您应该将连接字符串更改为如下所示:

Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=False;
User ID=myDomain\myUsername;Password=myPassword;

如果你想知道为什么:

Integrated Security When false, User ID and Password are specified in the connection. When true, the current Windows account credentials are used for authentication. Recognized values are true, false, yes, no, and sspi (strongly recommended), which is equivalent to true. If User ID and Password are specified and Integrated Security is set to true, the User ID and Password will be ignored and Integrated Security will be used.



附注

如果这没有帮助,那么您也可以检查一下:

确保您的数据库引擎配置为接受远程
连接:

Start > All Programs > SQL Server 2005 > Configuration

Tools > SQL Server Surface Area Configuration Click on Surface Area

Configuration for Services and Connections Select the instance that is

having a problem > Database Engine > Remote Connections Enable local and remote connections Restart instance



您可能需要在防火墙上为您使用的 SQL Server 实例和端口创建异常(exception):

Start > Run > Firewall.cpl Click on exceptions tab Add sqlservr.exe

(typically located in C:\Program Files (x86)\Microsoft SQL

Server\MSSQL.x\MSSQL\Bin, check your installs for the actual folder

path) and port (default is 1433) Check your connection string as well

关于sql-server - SQL server management studio - 如何使用连接字符串连接到 SQL server?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44881968/

36 4 0
Bài viết được đề xuất: sql - 'IN'可以用在case语句中吗?
Bài viết được đề xuất: oracle - Maven:将 Weblogic 库放入本地存储库时出错
Bài viết được đề xuất: wcf - 使用 WCF 防止跨域访问服务
Bài viết được đề xuất: json - Firefox 网络扩展更改新标签插件的 url
行者123
Hồ sơ cá nhân

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá Didi Taxi miễn phí
Mã giảm giá Didi Taxi
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com