Solved

SQL 2008 R2 SP3 install results in OpenQuery errors against local SQL server "Error: Linked servers cannot be used under impersonation without a mapping for the impersonated login"

Posted on 2014-01-29
2
847 Views
Last Modified: 2014-01-31
We installed SP3 and SP3 CU8 on one of our SQL servers.  We have a stored procedure that uses openquery.  It works fine still when accessing data from other location database servers but when it accesses it's own local database(local to the stored proc) using openquery it fails with this error message.

I have seen many recommendations but none seem to apply since I do not have a linked server account for the local server.  I only have linked servers set up for remote servers and the stored procedure is running fine like against those.  Only when it is running against the local data do we get this error.
0
Comment
Question by:NBF
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 39820254
without a linked server created pointing to the "local" db I don't think you can get around that error.
0
 

Author Comment

by:NBF
ID: 39823930
We ended up creating a Linked Server called LOCALHOST and tweaked the stored procedures so that when it was pulling data locally using openquery it would instead reference LOCALHOST as the server name in the OPENQUERY.  This worked perfectly.  We were able to implement this ahead of time before installing SP3 in our other environments to avoid any issues.

I am not sure why SP3 caused this but this will work around it.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question