The OLE DB provider “MSDASQL” for linked server “TEST” does not contain the table “classicmodels.customers”.

Error: Created the Linked Server in MSSQL Server successfully But when try to access got the following error:

select * from TEST...[classicmodels.customers]

Msg 7314, Level 16, State 1, Line 5
The OLE DB provider "MSDASQL" for linked server "TEST" does not contain the table "classicmodels.customers". The table either does not exist or the current user does not have permissions on that table.

Solution:

  1. In SQL Studio Management Studio –> Connect the Server –> Go to the Server Objects –> Linked Servers –> Providers –> MSDASQL:

2. Right click on MSDASQL and open properties –> Select the following three properties for linked server:

Dynamic Parameter
Level zero only
Allow inprocess

3. Running the Query again will fix the issue.

select * from TEST...[classicmodels.customers]

2nd option is to use the OPEN QUERY:


Syntax:
SELECT * FROM OPENQUERY([Linked_Server], 'SELECT * FROM db_name.table_name')

Example:
SELECT * FROM OPENQUERY([TEST], 'SELECT * FROM classicmodels.customers')

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.