Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12554

sp_tables_info_90_rowset_64 error from SQL2005 to SQL2012

$
0
0

Both servers are 64-bit.

I have a Linked Server defined on a SQL2005EE VM that uses a SQL Login because we use the same SP across domains to pull data from our hosted server.  The target is a SQL2012EE default instance.

On the SQL2005 VM I have a pair of SYNONYMs defined in master that refer to 2 separate tables in the "pull from" server.

I can issue a simple SELECT across the link for one of the tables, using the SYNONYM, and can see all 5K+ rows.

When I attempt to run a SELECT TOP 10 * FROM master..Synonym2 (2.5Bn rows), I get the same error as when I attempt to ALTER an existing USP having added a few extra fields to collect:

OLE DB provider "SQLNCLI" for linked server "xcDev2012" returned message "Unspecified error".
Msg 8115, Level 16, State 2, Procedure sp_tables_info_90_rowset_64, Line 9
Arithmetic overflow error converting expression to data type int.

I logged in on the SQL2012 box using the login stated in the Linked Server definition's sp_addlinkedsrvlogin and can successfully run the SELECT TOP 10 ... query above, against the base table.

EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'xcDev2012',@useself=N'True',@locallogin=NULL,@rmtuser=N'Transfer',@rmtpassword='#####'

The sp_tables_info_90_rowset_64 SP on the SQL2005 box is ridiculously simple:

ALTER procedure [sys].[sp_tables_info_90_rowset_64]
(
    @table_name     sysname,
    @table_schema   sysname = null, 
    @table_type     nvarchar(255) = null
)
as
    select
        TABLE_CATALOG           = s_tiv.TABLE_CATALOG,
        TABLE_SCHEMA            = s_tiv.TABLE_SCHEMA,
        TABLE_NAME              = s_tiv.TABLE_NAME,
        TABLE_TYPE              = s_tiv.TABLE_TYPE,
        TABLE_GUID              = s_tiv.TABLE_GUID,
        BOOKMARKS               = s_tiv.BOOKMARKS,
        BOOKMARK_TYPE           = s_tiv.BOOKMARK_TYPE,
        BOOKMARK_DATATYPE       = convert(smallint, 21), --DBTYPE_UI8
        BOOKMARK_MAXIMUM_LENGTH = convert(int, 8),
        BOOKMARK_INFORMATION    = s_tiv.BOOKMARK_INFORMATION,
        TABLE_VERSION           = s_tiv.TABLE_VERSION,
        CARDINALITY             = s_tiv.CARDINALITY,
        DESCRIPTION             = s_tiv.DESCRIPTION,
        TABLE_PROPID            = s_tiv.TABLE_PROPID,
        TABLE_FLAGS             = s_tiv.TABLE_FLAGS
    from
        sys.spt_tables_info_view s_tiv
    where 
        ( 
            (@table_schema is null and s_tiv.TABLE_NAME = @table_name) or 
            object_id(quotename(@table_schema) + '.' + quotename(@table_name)) = s_tiv.object_id
        ) and
        (@table_type is null or @table_type = s_tiv.TABLE_TYPE)
    order by 4, 2, 3

I can successfully ALTER the "driver" SP that references the same table as in the successful SELECT, above.

At the time of writing, July 6th, 2012, there are ZERO hits on MSDN for the MS procedure name.

Desperately needing help, please!

Just tried this from SQL2012 to SQL2012 and the SAME error occurs when I expand the Linked Server's tables and Script as SELECT then try to run it for TOP 10.  REALLY STUMPED NOW!

THIS WORKS PERFECTLY FROM SQL2012 TO SQL2005 AND FROM SQL2005 TO SQL2005.

THE BUG LIES WITH SQL2012.

Connect Issue: SQL Server Bug Report


Viewing all articles
Browse latest Browse all 12554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>