Mapping logins to linked servers for migration My team is migrating a SQL 2012 server with an extensive list of linked servers to SQL 2016. My task is to script the creation of linked servers on the new server.
It looks like I have all the information I need to create the script in sys.servers but am having trouble finding where local logins are mapped to the linked servers.
You'll find the linked servers login mappings in sys.linked_logins view.
This, in turn accesses the master.sys.syslnklgns table (in case this gives something useful), but you can only access the real systems tables when you connect using the Dedicated Admin Connection (/A with sqlcmd.exe).