与问题有关的sp_addlinkedserver [英] Problem related sp_addlinkedserver

查看:187
本文介绍了与问题有关的sp_addlinkedserver的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友

我有一个与sp_addlinkedserver相关的查询.

我已经成功创建了addlinkedserver

但是当我执行查询以将数据从一台服务器传输到另一台服务器时,即

例如:插入表名,然后从[服务器名] .databasename.dbo.tablename
中选择*

这给出了错误.错误在下面给出.

服务器名\来宾登录失败. (例如:max4 \ guest)



用户sa登录失败

这意味着它没有登录我的服务器.并在另一台计算机上显示Sql服务器不存在或访问被拒绝.

请尽快帮助我.

在此先感谢

Hello Friends

I have a query related sp_addlinkedserver.

I have successfully created addlinkedserver

but when I execute a query to transfer data from one server to another i.e

e.g : insert into tablename select * from [servername].databasename.dbo.tablename


This gives an error.The error is given below.

Login Failed for servername\guest. (eg: max4\guest)

or

login failed for user sa

It means that it does not login on my server. and on another machine it gives Sql server does not exist or access denied.

Pls Help me out as soon as possible.

Thanks in advance

推荐答案

好吧,听起来好像用于连接的连接字符串配置不正确.
看看以下讨论类似问题的线程:
链接1 [ ^ ]
链接2 [
Well, it sounds like the connection string used to connect is not configured correctly.
Have a look at following threads discussing similar issues:
Link 1[^]
Link 2[^]
Make sure the connection string is correct, then the user credentials used are working.

Lastly, it might be that remote connections might be off, or might be the Firewall is not allowing the connections.


目标服务器(您所在的服务器)上链接),请确保存在可以使用的有效凭据,这些凭据可以访问所需的数据库.

例如.使用..
设置SQL登录
uid:SomeUser
pwd:SomePassword

授予SomeUser访问SomeDatabase的权限,确保其至少具有读取权限.


现在,在创建链接服务器的服务器上,展开链接服务器"并找到您创建的服务器.

右键单击->属性
切换到安全性"标签.
确保选中选项使用此安全上下文进行"

远程登录:SomeUser
使用密码:SomePassword


现在尝试再次运行SQL
On the target server (the server you are linking to), make sure that there are valid credentials you can use that have access to the database you require.

E.g. setup a SQL login with..

uid: SomeUser
pwd: SomePassword

Grant SomeUser access to SomeDatabase, make sure it has Read access at least.


Now on the server where you are created the linked server, expand ''Linked Servers'' and find the server you have created.

Right Click -> Properties
Switch to ''Security'' tab.
Make sure option ''Be made using this security context'' is selected

Remote Login: SomeUser
With Password: SomePassword


Now try running your SQL again


这篇关于与问题有关的sp_addlinkedserver的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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