如何连接远程sql server [英] how to connect remote sql server

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

问题描述

我正在尝试从asp.net连接远程sql server2012



收到错误

 System.Data .SqlClient.SqlException:用户登录失败





我的连接字符串是

 <   add     name   =  libacpConnectionString    connectionstring   = 数据Source = 103.21.58.192; Initial Catalog = libacp; Persist Security Info = True; User ID = my id; Password = my passowrd >  
providerName =System.Data.SqlClient/>





代码在本地服务器上运行正常





请帮帮我



[edit]已添加代码块 - OriginalGriff [/ edit]

解决方案

错误消息非常明确:用户登录失败



这意味着以下三种情况之一:

1)你的IP地址错误,SQL实例不知道你是谁是。

2)您的用户ID错误,SQL实例不知道您是谁。

3)您的密码错误,SQL实例有拒绝登录请求。



我们无法解决任何问题:您需要检查您的详细信息并确保使用正确的信息。

I am trying to connect remote sql server2012 from asp.net

getting error

System.Data.SqlClient.SqlException: Login failed for user



my connection string is

<add name="libacpConnectionString" connectionstring="Data Source=103.21.58.192;Initial Catalog=libacp;Persist Security Info=True;User ID=my id ;Password=my passowrd">
      providerName="System.Data.SqlClient" />



code is working ok on local server


pls help me out

[edit]Code block added - OriginalGriff[/edit]

解决方案

The error message is pretty explicit: "Login failed for user"

That means one of three things:
1) You have the wrong IP address and the SQL instance doesn't know who you are.
2) You have the wrong User ID and the SQL instance doesn't know who you are.
3) You have the wrong Password and the SQL instance has rejected the log in request.

We can't fix any of those: you need to check your details and make sure that you are using the right information.


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

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