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"

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.
NBFAsked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
without a linked server created pointing to the "local" db I don't think you can get around that error.
0
 
NBFAuthor Commented:
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
All Courses

From novice to tech pro — start learning today.