2011-02-01 65 views
0

我們在防火牆(WatchGuard XTM 2系列)和網絡交換機後面有一個小型網絡。在我們的網絡中,我們有多個SQL服務器實例,但是我希望能夠從我們的網站遠程訪問特定的實例。我們有一個來自ISP的靜態IP地址,然後網絡上的所有機器都有一個本地分配的動態IP地址。當試圖從我們的網絡外部連接到數據庫時,如何將請求發送到適當的機器/ SQL實例?它是我的連接字符串中的參數還是我防火牆中的某個參數?從網站連接到本地SQL服務器

有幾件事情,以排除:

1)防火牆允許從網站到我們的網絡訪問。我添加了該站點的IP並打開了端口1433.另外,在嘗試連接和監視防火牆時,沒有出現像我添加正確IP地址之前那樣的例外情況。

2)已經設置並啓用了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: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)

+0

這是更多的ServerFault.com問題 – cjk 2011-02-01 17:13:12

回答

0

ConnectionString中的服務器參數指示連接到哪個服務器。將ip地址或URL分配給要訪問的服務器,並將其放入連接字符串中。