Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add Catalog to an Existing Linked Server

I have an existing Linked Server with a few catalogs... how can I add another, existing database/catalog to this linked server?

For Example, my object explorer looks like this:

Linked Servers

  • Providers
  • DB4\PRODUCTION
  • DB4_LINK
    • Catalogs
      • System Catalogs
      • MyDatabase
      • MyOtherDatabase

How can I add yet another database that already exists to DB4_LINK?

EDIT: I'm trying to add an existing database to this linked server entry.

like image 424
Mark B Avatar asked Sep 03 '25 05:09

Mark B


1 Answers

Assuming there are existing Catalogs (databases) already being shown (which is the case in your question), the most likely thing that is preventing another database on that same linked server from appearing is Permissions.

Right-click on the server-to-link-to and do "Script Linked Server as" then CREATE to New Query Window... look at the sp_addlinkedsrvlogin call and note the rmtuser (remote user). This is the user that you needs access to the database that you want to appear in the Catalogs.

Go to the server-to-link-to (under Security / Logins) and adjust that login's permissions (via Properties) to include the missing db. (Check the perms that the login has to the dbs that do appear in the Catalog... you can use those specific perms as a reference)

like image 161
Mark Gaulin Avatar answered Sep 05 '25 00:09

Mark Gaulin