I have 2 stored procedures, each of them in a separate database on a different physical server. Both these databases are created in a (separate) shared web host and consequently, I do not have server-level access. Both these servers have valid IP addresses and I’ve created user account with proper permission to run those stored procedure in their corresponding servers.
The question is: I want to execute one of these procedures from another and I am not able to create a linked server (because both databases are in a shared hosting environment). How can I execute the remote stored procedure from inside of the first stored procedure?
(p.s.) I checked out many questions regarding this problem but all of them had supposed that it is possible to create a linked server among these 2 servers.
Without a linked server this is not normally possible.
As @Martin commented, you can try OPENDATASOURCE, but this is unlikely to work as it is disabled by default and is not likely to be enabled by a hosting company.
In these cases, the only option you have is to run each stored procedure separately from your application and process the results in the application.