每当我尝试连接到 Azure 上的 SQL 服务器时,都会不断收到 SQL 错误 258。
Cannot connect to tcp:xxxxxxxxxx.database.windows.net,1433.
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The wait operation timed out.) (Microsoft SQL Server, Error: 258)
我设置了 ODBC 连接,这似乎有助于它建立连接,但我对它为什么没有连接感到困惑。我还在 Azure 中将我的 IP 地址列为允许的 IP 地址,但仍然没有运气。这是我尝试使用 SSMS 2012 登录的内容:
Server Type: Database Engine
Server Name: tcp:xxxxxxxxxx.database.windows.net,1433
Authentication: SQL Server Authentication
Login: username@xxxxxxxxxx
Password: xxxxxxxxxx
Connect to database: xxxxxxx_db
Connection time-out: 30
Encrypt: True
我的连接字符串:
Server=tcp:xxxxxxxxxx.database.windows.net,1433;Database=database_db;User ID=username@xxxxxxxxxx;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;
非常感谢您的帮助,谢谢!