Export Multiple Linked Servers

You can export linked servers as SQL using the following steps:

  1. Open SQL Server Management Studio (SSMS) and connect to the instance of SQL Server you want to export linked servers from.
  2. Expand the server node, then expand the Server Objects node.
  3. [Trick!] Press F7 to open Jobs in Object Explorer when “Server Objects” node is selected. Now you can multiple Linked Servers by holding the Ctrl key and clicking on each item.
  4. Right-click the Linked Servers node and select Script Linked Server As → CREATE To → New Query Editor Window. This will generate a SQL script that creates the linked servers as they currently exist on the server.
  5. Save the SQL script to a file if you wish.

That’s it! You now have a SQL script that can be used to recreate the linked servers on another server or on the same server after a re-installation.

Published by

mustafabugra

Systems Engineer

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.