?
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
?
860 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 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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

718 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