如何给远程sql server访问表单服务器机器? [英] How to give remote sql server access form server machine ?

查看:171
本文介绍了如何给远程sql server访问表单服务器机器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hai



我在一台机器上开发网站,但是服务器机器上有sql server,所以如何访问我的网站的sql数据库。机器我将使用连接字符串



Hai

I am delveloping website in one machine,but sql server is available in server machine,so how to access that sql database for my website.in my machine i will use connection string as

<add name="ConnectionString1" connectionString="Data Source=192.168.1.7\SQLEXPRESS;Initial Catalog=Employee;Persist Security Info=TRUE;User ID=XXXX;Password=XXXX" providerName="SQLOLEDB.1"/>





Connectionstring是ConnectionString1

sql服务器机器中的服务器名称是ADMIN-PC\SQLEXPRESS

服务器机器IP地址是192.168.1.7

数据库名称是员工

Sql Server版本是2005

i已经启用共享内存,命名管道,TCP / IP和VIA表单sql Server配置管理器

并且可以ping我的机器上的服务器ip,但是如果我使用上面的连接字符串它不工作。显示消息如





Connectionstring is ConnectionString1
sql Server Name in server machine is ADMIN-PC\SQLEXPRESS
Server Machine Ip address is 192.168.1.7
Database name is Employee
Sql Server Version is 2005
i am already enabled Shared Memory,Named Pipes,TCP/IP and VIA form sql Server Configuration Manager
And can ping server ip also form my machine,but if i use connectionstring as above it not work.it show message like

"

Exception occurred. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Please Click Back Button And Try Again.





当我尝试访问系统表单服务器机器中的sql数据库时。



请尽快回复



问候

Aravind

"

when i try to access sql database in my system form server machine.

Pls reply asap

Regards
Aravind

推荐答案

尝试停止并启动SQL Server和SQL Server Browser服务。
try stopping and starting the SQL Server and SQL Server Browser services.


这篇关于如何给远程sql server访问表单服务器机器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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