SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

Thursday, June 19, 2008 1:00 AM | Leave a reply »

If you have a SQL 2005 machine with a (x64) installation, some of the system queries have a different name, like [some_command]sys_64. So when you try to connect your powerfull SQL2005 to an old remote SQL2000, probably in x32 version, you can receive a strange error like Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO".

In many forums you can find a link to a microsoft KB that explains to you that you have to install the SP4 in the old SQL and maybe everything will done.
Usually I like to know why something doesn't run ...

So, when you execute from SQL2005 a query like
select * from sql2000.mybase.dbo.mytable

SQL Server 2005 x64 runs the following query on remote SQL2000 server:
exec [mybase]..sp_tables_info_rowset_64 N'mytable', N'dbo', NULL

So you can also try to add this stored in the Remote SQL2000 server, in the master database:

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

It works and you don't need to run strange Package on your critical machine.


Comments

  1. Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Thank you very mutch, I used the procedure on an SQL Server 2000 64Bit(SP4), and the problem solved too!
    I saw the Microsoft kb, but the SP4 is already installed. This was not the problem.
  2. Gravatar Haya says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Would the sp_tables_info_rowset_64 you are creating replace the already existing sys.sp_tables_info_rowset_64??? or is this an addition to the database?
  3. Gravatar Haya says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Also, if my remote server is the SQL 2005 server will this still work?
  4. Gravatar raffaeu says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    this works with SQL 2005 and SQL 2000 and solved the issue with x64 bit servers. You can use it remote or locally, it must be installed into the master database and replace the existing one (that is not present ...).
    This is the reason I have created this version of the stored.
  5. Gravatar Haya says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    THANK YOU! it worked beautifully!
  6. Gravatar Dee says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Will this also work if the remote server is SQL 2000 x32 bit?
  7. Gravatar Marcos says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    works PERFECT!
    Congratulations!
  8. Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    So coool, thanx :) This Applies to 2008 linked to 2005 as well!
  9. Gravatar raffaeu says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Yep because they still didn't change the stored procedure ... :-)
  10. Gravatar Chris Hill says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Thanks, was scratching my head over the same problem (connecting 64bit SQL 2008 to 32bit SQL 2000). Very strange that Microsoft have made this so difficult for everyone.
  11. Gravatar kasi says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")


    I am getting the same error when trying to fetch data from Oracle should I follow the same procedure if so can you please give broad steps aas I am Novice to SQL Database Admin
  12. Gravatar Daniel says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Worked perfectly! You saved me hours of work...
  13. Gravatar LG says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Funciona muy bien.
  14. Gravatar raffaeu says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Hey guys I am glad to help all of you!!
  15. Gravatar Alex says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Thank you very much! This also works on SQL Server 2008 64-bit edition
  16. Gravatar chrissie1 says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Like I said blogs.lessthandot.com/admin.php

    I am very gratefull.
  17. Gravatar Dawn says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Yaay! Thank you. I am an SQL developer (not an administrator!). The company I work for is changing over to 64-bit for performance and we are all new to 64-bit. Straightforward, simple information and fixes like this one really helps me keep up with my workload even while working in a different environment.
  18. Gravatar Lee says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Thanks!!
  19. Gravatar Lynn says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Thank you so very much. I was sick over the consideration of having to rewrite my SQL ETL scripts that connnected to linked servers. You saved me weeks of recoding!

    Thanks, again.
  20. Gravatar djj says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Works for 2008 also. Tried the KB suggestion but it did not work.
    Thanks!
  21. Gravatar Andrea says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Grandeeeeeee!!!!
    It works perfectly!!!

    Andrea
  22. Gravatar Karen says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Thank you!!
  23. Gravatar Cito says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Thanks a lot Raffaeu !!!. Excellent answer and solution.
    Thank you for shared it with all of us. :)

    Cito.
    Caracas, Venezuela.
  24. Gravatar Krish says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Excellent solution! Thanks for sharing!
  25. Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    This worked great for me. Thanks for posting the solution. I would have spent days trying to figure it out.
  26. Gravatar nobee says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Thank you, was a great help!
  27. Gravatar ryoung says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Thnaks a bunch, was in a jam regarding this and your solution worked great!
  28. Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    I'll add my thank you to this long list.
  29. Gravatar Kin says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Great Work!!!
  30. Gravatar Daza says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    very elegant... Thanks for the share!!
  31. Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Another thank you.

    Also works linking an SQL 2008 R2 64-bit to SQL 2000 32-bit !
  32. Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Why ask why? It works. Thank you very much!
  33. Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    That's great. It works.
  34. Gravatar Fishboneuk says:

    Re : # re: SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

    Fantastic. I really didn't want to have to run the instcat.sql script against the 2k database. This worked a dream from SQL 2008 SP1 64-bit to SQL 2000 32-bit.
Comments have been closed on this topic.