Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
888 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
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 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

Industry Leaders: 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…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

916 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