互联网上的sql server连接性 [英] sql server connectity over the internet

查看:70
本文介绍了互联网上的sql server连接性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即时通讯在dot.net中更新鲜.我需要通过Internet连接远程SQL Server数据库.任何人都可以引导我

感谢和问候
sarva

im fresher in dot.net. i need connect Remote sql server database through the internet . anyone guide me pls

thanks and regards
sarva

推荐答案

最终我找到了解决此问题的方法:

首先,我们需要配置客户端位置路由器设置.然后在该位置打开sql server tcp端口(1433)或Udp端口(1434).


第一件事:
客户端位置路由器设置:

开始->运行->输入cmd,然后按Enter
然后dos提示将打开.

1)现在您可以看到dos提示符,然后键入ipconfig-按Enter

现在,您的系统IP,子网和网关信息将显示在命令提示符下.
采取您的网关方式ip(例如:192.168.1.1)
2)进入系统浏览器


在浏览器地址栏中输入您的网关IP
现在您的系统将询问路由器用户名和密码.
然后输入正确的用户名和密码.然后您的路由器主页将在您的浏览器中打开.

现在您可以看到准确的6或7个链接,在该链接中单击管理链接,然后子链接将列出lik LAN,WAN,NAT等.
现在单击NAT链接,然后为您的系统ip和Sql服务器提供端口,然后单击save&申请...

此信息仅适用于Bsnl路由器

然后使用以下命令检查命令提示符:

telnet客户端<>公共ip<> 1433

如果此命令使黑屏空白,则与远程系统连接


我的连接字符串格式:

Eventually i find solution to this problem:

that''s first we need to configure client location Router settings. then open sql server tcp port( 1433 ) or Udp port (1434 ) in that location.


First thing:
client location Router settings:

Start->run->type cmd then press Enter
then dos prompt will open.

1) Now you can see dos prompt then type ipconfig - press Enter

Now your system ip,subnet and gateway information will display on your command prompt.
take your gate way ip ( for example : 192.168.1.1)
2) goto your system browser


type your gateway ip in browser address bar
Now your system will ask router username and password.
then enter your correct user name and password. then ur router home page will open in your browser.

Now you can see exactly 6 or 7 links, in that link click management link then sub links will list out lik LAN,WAN,NAT and so on.
now click NAT link then give your System ip and Sql server port then click save& apply...

this information for Bsnl router only

then check in command prompt with below command:

telnet client <> public ip <> 1433

if this command give blank black screen its connected with remote system if not otherwise


My connection string format:

<connectionStrings>
        <add name="dbconnection" connectionString="Data Source=tcp: remote location ip (public ip address),1433;Initial Catalog=Education;uid=sa;pwd=123" providerName="System.Data.SqlClient"/>
    </connectionStrings>




就这样!!!

问候
sarva




that''s it!!!

regards
sarva


这与C#或.NET无关.它与您的SQL Server正在运行的网络(连接到Internet)有关.

我是两天前告诉你的.最近两天您做了什么?
This has nothing to do with C# or .NET. It has to do with the network your SQL Server is running on, being connected to the internet.

I told you that, two days ago. What did you do for the last two days ?


与连接本地数据库相同.您必须在连接字符串中使用远程服务器凭据.
Its same as you connect local database. You have to use remote server credentials in your connection string.


这篇关于互联网上的sql server连接性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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