链接服务器"10.5.219.21"的OLE DB 访问接口"SQLNCLI10" 返回了消息"The stored procedure required to complete this operation could not be found on the server. Please contact your system administrator."。
在64位版本服务器上建立32位版本sql的链接服务器,需要在目的服务器上用dba权限的账号在master数据库中生成如下存储过程,并赋予64位版本服务器执行权限(执行下面的代码即可):
create procedure sp_tables_info_rowset_64
@table_name sysname
, @table_schema sysname = null
, @table_type nvarchar(255) = null
as
declare @Result int
set @Result = 0
exec @Result = sp_tables_info_rowset @table_name, @table_schema, @table_type
远程DBA在已经在19,20,21,22服务器的master数据库中,以sa的role 创建这个sp_tables_info_rowset_64过程。
后执行
select top 10 * from [10.5.219.21].mas_dist.dbo.Tbl_Packing_Lot_Info_transaction_log
接服务器"10.5.219.21"的OLE DB 访问接口"SQLNCLI10" 返回了消息"Unspecified error"。
消息229,级别14,状态5,过程sp_tables_info_rowset_64,第1 行
EXECUTE permission denied on object 'sp_tables_info_rowset_64', database 'master', owner 'dbo'.
经分析是中间平台没有master权限(或者是在对应数据库没有public权限);
请远程DBA在对应数据库建立存储过程并赋予用户权限,后OK
※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
关于这里面的那个存储过程,大家不要理解错了。那个存储过程是建在32位SQL2000的master数据库中的,所有者是dbo。
※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※