如何从本地系统连接远程系统数据库? [英] How can i connect remote system Database from local System?

查看:145
本文介绍了如何从本地系统连接远程系统数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在使用.net中的连接方法更新本地机器数据库。

现在我要更新远程服务器端数据库(同一个表中)本地机器)通过使用相同的程序..

i知道服务器数据库用户名,数据库名称,密码,表名..

请有人帮我这个....我应该如何跟进连接.......

Hi to all,
am updating local machine database by using connection method in .net..
now i want to update Remote server side database(same table in local machine) by using same program..
i know the server database username,database name,password,table name ..
please anyone help me regarding this....how should i follow in connection .......

推荐答案

在你的连接字符串中将你的remort服务器ip地址放在服务器上的价值



in your connection string put your remort server ip address on server value

Server=myServerAddress;Database=myDataBase;User Id=myUsername;
Password=myPassword;


您好



请参考以下内容为所有问题提供完整的解决方案。如果它有帮助,请将其标记为答案。



无法从asp.net中的web.config连接数据库 [ ^ ]


3件你需要照顾的事情如果你想连接到远程sql服务器。



1)你需要获得该SQL Server的IP地址。

2 )确保在该SQL Server中启用了TCP / IP,并且该SQL Server中的配置管理器中的端口号为1433.

3)确保启用该端口的防火墙访问,即1433在那个SQL Server中。



然后使用这段代码:

3 thing you need to take care of if you want to connect to the remote sql server.

1) You need to get the IP address of that SQL Server.
2) Make sure the TCP/IP is enabled in that SQL Server and the port no is 1433 in the Configuration Manager in that SQL Server.
3) Make sure the firewall access for that port i.e. 1433 is enabled in that SQL Server.

Then using this code:
Server=myServerAddress,portNo;Database=myDataBase;User Id=myUsername;
Password=myPassword;





您可以连接到远程SQL Server。





好​​运。



you can connect to the remote SQL Server.


Best of luck.


这篇关于如何从本地系统连接远程系统数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆