October 17, 2007 at 2:52 pm
Hi, buddies, I am newbie to sql 2005. Here is my issue: I have an application which need to access data from a remote database(very small portion of data). But due to application's development framework, all data for application has to be read or written from a local database. So I have to create a table in my local database server and transfer required data from remote database server. The problem is how can I update data because those data in remote server is changing everyday. Is there a way that I can write a function runing periodly to syn data from remote server to my local server? Thank you very much.
October 17, 2007 at 3:31 pm
did you consider using simplest - linked server? you could set up a job that would copy data from that server over to your database at required pace.
...and your only reply is slàinte mhath
October 17, 2007 at 4:12 pm
Thanks a lot for the information. Could you give me some more details or reference paper about that ? I set up serveral linked server before, but seems for now it is more difficult to me to set up job to copy data from linked server to my local database than just set up a linked server.
October 17, 2007 at 4:19 pm
what's the remote server? sql? so if you create a linked server, look for sql agent and how to create a job. then in a job step you can call a query that will do, say,
insert localtable (a, b)
select a, b from remoteserver.dbname.schemaname.remotetable
of course you can call a stored proc that will do more.
hth,
Piotr
...and your only reply is slàinte mhath
October 18, 2007 at 8:28 am
Thank you very much. Is it possible that I can do this peroidly? Like everyday 2:am in the morning? Thanks a lot.
October 18, 2007 at 11:42 am
sure, you have to set up a SQL Agent job.
...and your only reply is slàinte mhath
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply