For Log Shipping, some information is only available on the primary or only on the secondary. That means that I had to set up a linked server on the primary to connect to the secondary. I do not want to create any OPENROWSET queries for this since that would require that AdHoc Distributed Queries be enabled. I am not a fan of opening that up for the following reasons:
1) It can allow buffer overflow bugs to compromise systems.
2) It can allow a compromised server to connect to a non-compromised server.
Read on to see what Lori prefers instead.