Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 SQL Job

Author  Topic 

mshsilver
Posting Yak Master

112 Posts

Posted - 2009-07-16 : 11:29:15
Hi,

I have two SQL server 2005 database servers on the same network and really need to every night push data from one table in one database on one server to an identical table on the other database server.

Can i use SQL jobs to do this? If so when I create a job I can target remote servers and an see where to write the command but I can't figure out where to select the remote server database.

Any help / thoughts would be great.

Thanks in advance.

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-07-16 : 12:03:33
I would create a linked server on one of the servers.
In your command (connected to the server that now is knowing the linked server) you can reach the wanted table via
[linked server].[database].[schema].[tablename]


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-07-16 : 12:36:55
quote:
Originally posted by mshsilver

Hi,

I have two SQL server 2005 database servers on the same network and really need to every night push data from one table in one database on one server to an identical table on the other database server.

Can i use SQL jobs to do this? If so when I create a job I can target remote servers and an see where to write the command but I can't figure out where to select the remote server database.

Any help / thoughts would be great.

Thanks in advance.


sounds like what you're looking for is replication. search for replication in books online
Go to Top of Page

mshsilver
Posting Yak Master

112 Posts

Posted - 2009-07-17 : 04:27:59
Thanks for your replies. I should explain that I am ok with adding SQL queries to my code but not so good with the inn’s and out's of setting this stuff up like this in management studio.

The data that is being sent from the master server db to the other needs to be sent once a day and the table that is receiving can be emptied before the new data arrives. So like a delete from table x then a select from the other database z and insert into x

Hope that make sense. Do you still think what you recommend is the best way? And is there anything specific I should Google?

Thanks again
Go to Top of Page

mshsilver
Posting Yak Master

112 Posts

Posted - 2009-07-17 : 11:46:50
For anyone else that has this issue and wants a great method for transfering data and a whole lot more read up on this, it walked me through it with easy logical steps.

http://it.toolbox.com/blogs/coding-dotnet/creating-a-ssis-package-24699

Thanks again, i have lot's more SQL questions so i will be back shortly :-)

Go to Top of Page
   

- Advertisement -