September 25, 2008 at 9:13 am
Hi Guys and Gals
Could you please advise on how to update records in a remote server.
eg
update * from openquery (SVR_LINK, 'update servercollection set username = ' + 'TEST' + ' where hostname = ' + 'TEST' ')
What we have is a proc which runs a procedure called sp_who2_with_text which outputs to a local table, and we do a select on the remote server to see the records
select * from openquert (SVR_LINK, 'select * from servercollection')
what we need to do is update the USERNAME coloumn based on the HOSTNAME where the SPID originated and was wondering if we could do this on the remote server?
Thanks
Anthony
September 25, 2008 at 10:44 am
you could access it directly instead of using openquery..
update SERVERLINK.DATABASE.SCHEMA.servercollection
set username = 'TEST'
where hostname = 'TEST'
select *
from SERVERLINK.DATABASE.SCHEMA.servercollection
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy