远程sqlserver连接的连接字符串 [英] connetion string for remote sqlserver connection

查看:422
本文介绍了远程sqlserver连接的连接字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经连接到远程sqlserver,现在我的计算机上已打开sqlserver,并且我在其中具有窗口应用程序.我想连接远程服务器,因此我已在app.config 中将连接字符串定义为-

I have connected to remote sqlserver now sqlserver is open on my computer and I have window application in this I want to connect remote sever so I have define connection string in app.config as-

<app settings="">
<add key="BACKUP_DATABASE_SERVER" value="Network Library=DBMSSOCN;Data Source=SANJAY\SQLEXPRESS;Uid=guest;Pwd=guest;Integrated Security=true;" />
</app>/pre>

but when I go for open database that time gives exception Connection Failed.
Thank You

推荐答案

您可能没有访问数据库的适当权限.
顺便说一句-在公共论坛上发布用户名和密码永远不是一个好主意.
You probably dont have appropriate rights to access the DB.
BTW- it is never a good idea to post your username and password in a public forum.


Remote SQLServer会授予对您网站所在服务器的访问权限吗?
有时您需要(取决于服务器的安全性)授予对静态IP地址的访问权限.
例如,在我创建的网站中,我需要访问网站上的数据库,并在线向用户显示信息.但是要做到这一点,我需要在站点上的服务器上允许防火墙访问该网站,然后该站点才能正确连接

http://technet.microsoft.com/en-us/library/cc646023.aspx [ ^ ]
该站点可以帮助您设置防火墙访问.

请访问此站点以获取有关连接字符串的帮助
http://www.connectionstrings.com/ [ ^ ]
Does the Remote SQLServer grant access to your server your website is on?
You sometimes need to (Depending on security on servers) to grant access to a static IP address.
For example in a website I have created I need to access a database on site, and display information to users online. But to do this, on the server on site, I needed to allow firewall access to the website before it could connect properly

http://technet.microsoft.com/en-us/library/cc646023.aspx[^]
That site may help you set up firewall access.

Check this site out for help with connection strings
http://www.connectionstrings.com/[^]


这篇关于远程sqlserver连接的连接字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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