Reputation: 2584
I would like to take records from one a table in a SOURCE database and insert these records into a table in a DESTINATION database on a DIFFERENT server with different login credentials.
Could someone please provide points on how this can be done with Sybase TSQL? Or is this not possible?
Upvotes: 0
Views: 677
Reputation: 25753
You can use proxy table as below:
exec sp_addserver 'SvrName', null, '[ip or hostname]:port'
exec sp_addexternlogin 'SvrName', LocalUserName, ExternalUserName, ExternalPassword
create proxy_table proxy_src_tab at 'SvrName.ExternalDb.db_owner.src_table'
insert into dest_tab
select column1,..., columnN from proxy_src_tab
Upvotes: 1