不能得到链接服务器在SQL Azure中工作 [英] Cannot get Linked Servers to work in Sql Azure

查看:248
本文介绍了不能得到链接服务器在SQL Azure中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用Azure的试用版。我们试图从我们内部的SQL 2012执行跨服务器的查询。

We are using a trial version of Azure. We are trying to perform cross server queries from our SQL 2012 in-house.

我们似乎有我们的地方2012年的Azure挂钩。当我进入服务器对象 - > 链接服务器管理​​工作室,我看到我们的天青数据库。

We seem to have our local 2012 linked with Azure. When I go into Server Object -> Linked Servers in management studio, I see our Azure database.

但是,如果我尝试打开目录和表格,我得到一个错误信息说

But if I try to open the catalog and tables, I get an error message saying

参考Perseus.sys.sp_tables_rowset2数据库和/或服务器名称在此版本的SQL Server不支持

** 英仙座是我们的目录的名称天青的Sql

** Perseus is the name of our catalog in Azure Sql.

运行从本地连接的查询:

Running a query from local connection :

SELECT *  FROM [azureDBServer].[Perseus].[dbo].[accounts]

结果是:

    OLE DB provider "SQLNCLI11" for linked server "azureDBServer" returned message 
"Unspecified error". Msg 40515, Level 16, State 2, Line 1 Reference to database and/or
 server name in 'Perseus.sys.sp_tables_info_90_rowset' is not supported in this version of
 SQL Server.

这同样在内部SQL 2012服务器是能够连接到我们的内部交叉服务器查询,并通过链接服务器查看其结构。2008

This same in house SQL 2012 Server is able to connect to our in-house 2008 by cross server queries and by viewing its structure through Linked Servers.

我从这篇文章<一知道href=\"http://blogs.msdn.com/b/windowsazure/archive/2012/09/19/announcing-updates-to-windows-azure-sql-database.aspx\">Azure支持链接服务器的。

所以我失去了什么是错的。我们的管理员认为这可能是因为我们有一个Web-SQL帐户VS商业SQL帐户。这 Azure的网络VS业务SQL 过时的堆叠链路意味着SQL版本是不的问题,而是pre-日期时,Azure中提供链接服务器。

So I'm lost about what is wrong. Our Admin thinks it may be that we have a Web-Sql account vs a business SQL account. This Azure Web vs Business SQL outdated Stack link implies that SQL version is NOT the problem, but pre-dates when Azure offered Linked Servers.

所以,我想了解是否

:我们没有设置正确的事情提供SQL链接?

a) we didn't set up something right to provide SQL Linking?

B):我们正在通过试验的限制?

b) we are limited by trial?

C)我们都被Web SQL版本限制?

c) are we limited by Web SQL version?

D)别的?

推荐答案

虽然增加从SQL管理链接的服务器,你是不是给定的选项来设置默认的数据库。因此,使用类似下面

While adding linked server from SQL Management, you are not given option to set default database. So use something like below

EXEC sp_addlinkedserver
@server='name for referring locally', -- here you can specify the name of the linked server
@srvproduct='',     
@provider='sqlncli', -- using SQL Server native client
@datasrc='AzureMachineName.database.windows.net',   -- add here your server name
@location='',
@provstr='',
@catalog='yourdatabasename' 

我想通了这工作。

I figured this works.

这篇关于不能得到链接服务器在SQL Azure中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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