简体   繁体   中英

Linked Server: Cannot obtain the schema rowset "DBSCHEMA_INDEXES" for OLE DB provider "MSDASQL"

When selecting from a certain tables in Teradata from SQL Server Management Studio, over an ODBC Linked Server Connection

For certain tables I get the above error, for others i don't. It seems random.

Error Details:

OLE DB provider "MSDASQL" for linked server "TD" returned message "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.". Msg 7311, Level 16, State 2, Line 3 Cannot obtain the schema rowset "DBSCHEMA_INDEXES" for OLE DB provider "MSDASQL" for linked server "TD". The provider supports the interface, but returns a failure code when it is used.

So the solution was to rename the tables to something shorter than 25 characters. Or to create a view with a name shorter than 25 characters selecting from the original table.

This would be also fixed if you do:

select from Openquery(TD, 'select from db.Table')

instead of

select from TD..db.Table

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM