I’m querying a MySQL linked server from SQL Server.
I can query the linked server using OpenQuery as in the following example.
SELECT * FROM OPENQUERY(MyLinkedServer, 'SELECT * FROM SomeTable')
I have tried querying the linked server using a four-part name as in the following example.
SELECT * FROM MyLinkedServer.MyDatabase.DBO.SomeTable
That returns an error stating that “the provider does not expose the necessary interfaces to use a catalog or schema.”
Is there any way to query a linked server without using OpenQuery?
Thanks!
Update: Per Shredder’s answer, the correct syntax is as follows.
SELECT * FROM MyLinkedServer...SomeTable
It is possible, but MS recommends that you use the openquery:
You can have a look at the examples here under “Linked server examples with four-part names”
Also, I found this:
I would verify that your mysql db has given access rights to your sql server.