Defining connectionString for remotely hosted SQL Server

依然范特西╮ 提交于 2019-11-30 14:43:45

Server Name: IP-Address\Database-instance,Port

You can not directly. you need to have TCP/IP enabled and configured the TCP/IP Ports on sql server configuration manager at remote server.

Go through it: Configurations-Remote-Server

Or if it already configured then just contact DBA for the hosted server for providing the proper connection string.

you need to have TCP/IP connectivity .Just launch it, enter the DNS host name or IP address in the Server Name' box and hit Connect. The hosting company needs to have enabling TCP/IP on your SQL Server instance, and them providing you with secure access to the IP address that instance is running on.

Then it would be in this form:

connectionString="Data Source=Server_Name;Initial Catalog=Database_Name;
User ID=XXXX;Password=XXXX;Integrated Security=True;"
providerName="Provider_Name"

Most administrators do not allow direct access to the SQL Server from outside the firewall. In that case, if you can connect to the host over VPN then you should be able to connect directly to the server with Enterprise Manager or SQL Management Studio.

Modify your connection string as

connectionString = "data source=sql-database / 10.0.0.11; User ID = myUsername; PassWord = your password "

Try using Connection String in this Format

<connectionStrings>
<add name="SQLconnString" connectionString="Data Source=246.185.231.253;Initial Catalog=DNAME;User ID=SampleUID;Password=SamplePWD;timeout=6000" />
</connectionStrings>

This Might help you!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!