且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

通过Internet访问本地服务器的SQL Server DB

更新时间:2022-11-25 12:01:12





通过SQL Server配置管理器配置服务器实例以允许TCP / IP协议。

SQL Server网络配置> [InstanceName]的协议>启用



您可以使用动态DNS服务来解析服务器的IP。



确保你打开服务器防火墙上的端口1433以允许传入连接。



要使用的连接字符串:

Hi,

Configure Server instance via SQL Server Configuration Manager to allow TCP/IP Protocols.
SQL Server Network Configuration > Protocol for [InstanceName] > Enable

You could use a Dynamic DNS Service to resolve the IP of the server.

Ensure you open up port 1433 on your Server firewall to allow incoming connections.

Connection string to be used:
connectionString=@"Data Source=\\ServerIPAddress\EziBilling;Initial Catalog=dbBilling;User ID=sa; Password=SomethingVerySecure"





注意:如果您打开SQL服务器,请确保您的sa帐户密码非常安全上网。



希望这有帮助......



Notes: Please ensure your sa account password is very secure, if you open up SQL server to the internet.

Hope this helps...