我試圖調試應用程序,但是當我運行它,我收到以下錯誤信息:SQL連接字符串連接失敗SQL實例
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
我已經打開了檢查雙端口1433和它從我目前的位置開放並且可以到達。我還啓用了TCP/IP遠程連接,並可以使用SQL Server Studio Manager進行遠程連接。
我使用的連接字符串是:
Data Source=xx.xx.xxx.xx, 1433;Network Library=DBMSSOCN;Initial Catalog=KnightOwl-Demo;Persist Security Info=True;User ID=KnightOwlGentleshaw; Password=xxxxxx
我90%肯定有一些錯誤的連接字符串,但我不知道是什麼?
你能夠在SSMS中連接嗎? –
是的,我可以從SSMS –
和同一臺機器連接?用相同的用戶名,服務器網址? –