开发者

ODBC connection to SQL Server 2008 through VPN failing

开发者 https://www.devze.com 2023-03-01 15:32 出处:网络
I have an Excel add-in that allows users to run queries against a SQL Server database and return the results directly to the spreadsheet. This works fine.

I have an Excel add-in that allows users to run queries against a SQL Server database and return the results directly to the spreadsheet. This works fine.

There is now a user in a satellite office who is connecting to our network (shared drive, etc.) through a VPN connection. When he uses the same spreadsheets that work for everyone in the main office, her gets the following error:

[DBNETLIB] SQL Server does not exist or access denied

What is really strange is that if you run an individual query, it works fine, but it seems like running many queries in succession makes the sheet crap out. It's a little difficu开发者_StackOverflowlt to diagnose as the Excel add-in runs queries internally, possibly many of those. My theory is that when the DB server sees many successive queries come in from an IP that's outside of the network, there's a point at which it refuses to return more data.

Is there any validity to my theory? Are there configuration changes I can make to the DB that will allow remote ODBC connections to work well?


In case you are interested, the issue is that I was creating a server-side cursor, and the queries would always time out as you have to pay the network round-trip for each cell in the result set. It started working fine when I switched to a client-side cursor. This is all using ADO. I am in the process of switching to SQLApi++

0

精彩评论

暂无评论...
验证码 换一张
取 消