Reputation: 10648
From SQL Server Management Studio I have connected to an SQL Server database engine. This database engine has a lot of databases. From a store procedure defined in a database I am trying to call a store procedure in another database that it is in another SQL Server database engine. So I have done:
exec [MyDatabaseEngine].[MyDatabase].[MyStoreProcedure] param1, param2
But it is not working.
I do not know if I have explained it correctly. If not, please let me know.
Upvotes: 0
Views: 16966
Reputation: 1129
You need to have linked server created with credentials access to the other database. More info
Once you have it, you can run queries on another server
SELECT name FROM [SRVR002\ACCTG].master.sys.databases ;
GO
Upvotes: 2
Reputation: 33571
You are missing the schema. The format is [LinkServer].[Database].[Schema].[Object]
Upvotes: 3