![](/img/trans.png)
[英]How to connect to SQL Server database using windows authentication remotely?
[英]Remotely connect to SQL Server database
我正在使用Visual Studio 2013開發Windows表單,該表單綁定SQL Server數據庫中的數據。 我希望此表單連接到服務器上的SQL Server數據庫。 若要嘗試連接到服務器,請執行以下操作:
SQL Server Object Explorer -> Add Server -> Browse for more -> Network Servers
它沒有出現在其中。 即使我只是在服務器名稱上鍵入服務器的名稱,也會出現錯誤87。
我的本地計算機使用的是Windows 8,我的服務器是帶有SQL Server 2014 Express Edition和Advance Services的Windows Server 2012 R2。
請幫我連接。
編輯:
在服務器端,我做了以下工作
SQL Server Configuration Manager
-> SQL Server Network Configuration
-> tcp/ip-> enable -> IPALL -> TCP PORT -> 1433
windows firewall advanced settings
-> inbound -> add new rule -> port -> 1433
-> allow connections
您可以使用Management Studio連接到服務器嗎? 如果不是,請在SQL Server配置管理器中檢查您是否已啟用SQL Server Express版的TCP連接,並且已在Windows防火牆中啟用了遠程連接(TCP端口1433)。
啟用您要連接的IP,例如我正在使用本地主機,則可以使用PC IP:192.168.1.2
或者如果您擁有公共IP,則可以使用公共IP
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.