First of all you have to establish a kind of connection between the two servers to enable communication...
The SQL solution for that is called
linked-server[
^]...
You have to decide on which server the SP runs and set up the linked server accordingly...
When all in place you can access the tables on the linked server using this form:
[server].[database].[schema].[table]