无法创建 SQL Server 2000 链接服务器,链接到自身
背景:我很快就要将数据库从 SQL 2000 迁移到 2008。问题是该数据库包含许多对已购买软件的引用,不幸的是,该软件与 SQL 2008 不兼容。因此该数据库必须保持不变。我的解决方案是使用链接服务器,以便这些查询(许多在存储过程中)在移动到新服务器后仍然可以访问 2000 数据库。为了更新代码,以便稍后可以移动数据库,我想在现有的 SQL 2000 服务器上创建指向自身的链接服务器。
问题:当尝试在 Management Studio 中添加此内容时,我收到一条错误消息
您无法将本地 SQL Server 创建为链接服务器。
有办法解决这个问题吗?
编辑:我讨厌在发布问题后立即思考问题。我不需要创建链接服务器,因为我可以通过名称引用当前服务器(可能是我无法链接到自身的原因),并且相同的引用将在定义了链接服务器的新服务器上工作。示例 select * from dwdata2.m2mdata01.dbo.inmast
将在当前服务器和将 dwdata2
定义为链接服务器的新服务器上运行。
Background: I'm going to soon be moving a database from SQL 2000 to 2008. The complication is this database contains many references to purchased piece of software that is unfortunately not compatible with SQL 2008. So that database has to stay put. My solution is to use a linked server so that those queries(many in Stored Procedures) can still access the 2000 database once they get moved to the new server. In order to update the code in place, so I can just move the database later, I want to create linked server on the existing SQL 2000 server that points to itself.
Problem: When trying to add this in Management Studio, I get an error that says
You cannot create a local SQL Server as a linked server.
Is there a way around this?
Edit: I hate when I think of stuff right after I post the question. I don't need to create a linked server because I can reference the current server by its name (probably why I can't link to self), and that same reference will work on the new server that has the linked server defined. Example select * from dwdata2.m2mdata01.dbo.inmast
will work on the current server and on the new one with dwdata2
defined as a linked server.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不需要创建链接服务器,因为我可以通过名称引用当前服务器(可能是我无法链接到自身的原因),并且相同的引用将在定义了链接服务器的新服务器上工作。示例
select * from dwdata2.m2mdata01.dbo.inmast
将在当前服务器和将dwdata2
定义为链接服务器的新服务器上运行。I don't need to create a linked server because I can reference the current server by its name (probably why I can't link to self), and that same reference will work on the new server that has the linked server defined. Example
select * from dwdata2.m2mdata01.dbo.inmast
will work on the current server and on the new one withdwdata2
defined as a linked server.