You are seeing this error because you are trying to impersonate or switching the execution context using EXECUTE AS clause and Executing a RPC on a linked server
If you have a procedure on Server X
USE ServerXDB
Create procedure proc
execute as ‘TESTUSER’
Execute ServerY.TestDB.dbo.test
Select * from [ServerY] .TestDb.dbo.testtable
To Fix this you have two options
- Enable Trusty worthy on ServerXDB database on Serverx
- Remove the execute as clause in the procedure and grant execute privileges to user we used to set up the linked server
you can also try by signing a certificate on the proc procedure but I havent tried it
thanks – my brain had gone awol – forgot to add the security certificate to the procs