Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Information_Schema on linked server

Status
Not open for further replies.

NathanGriffiths

Programmer
May 14, 2001
213
NZ
How do I reference Information_Schema in a database on a linked server?

If I use

SELECT * FROM Server.Database.Information_Schema.Tables

for example I get the error:

Server: Msg 7314, Level 16, State 1, Line 1
OLE DB provider 'Server' does not contain table '"Database"."information_Schema"."Tables"'. The table either does not exist or the current user does not have permissions on that table.

I can query the sysobjects table but I would rather use the the information_schema instead if possible.

thanks,

Nathan
[yinyang]

Want to get a good response to your question? Read this FAQ! -> faq183-874
 
If your account can read from sysobjects, you shouldn't have a problem selecting from information_schema.

this error looks like a syntax error. check if your linked server is case sensitive. if so, try this:

SELECT * FROM SERVER.master.INFORMATION_SCHEMA.TABLES
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top