September 1, 2009 at 12:42 am
Hi,
I have two databases on seperate servers
1) Primary (SQL2000)
2) Secondary (SQL2005)
I want to run the following query twice everyday (automatically) in the Primary..
select field1,field2
from table_name
where condition
The output should be stored to a table in the secondary server.
How do I go about it? I am new to SQL. Can someone help me out over here?
Thanx in advance
September 1, 2009 at 12:19 pm
Seeting up Replication or Taking Back ups and restoring just to run one single query is an over kill. You have couple of other options to do this.
1. Set up a job that selects and inserts using Linked server
2. Write a small app that selects and inserts using different database connections
-Roy
September 9, 2009 at 1:17 am
could anyone point me to a Linked server tutorial?
linking sql2000 to sql 2005? or vice versa?
September 9, 2009 at 1:20 am
search abt sp_addlinkedserver
you use this stored proc to create a linked server from your primary to secondary. once u've successfully setup the connection between the servers you can query the linked server.
September 9, 2009 at 1:26 am
First,
Not sure how your question is in anyway related to backups or replication.
In answer to your question, here are two links. One is a video and one is an article.
http://www.sqlservercentral.com/articles/Distributed+Queries/anintroductiontolinkedservers/1366/
http://www.sqlservercentral.com/articles/Video/66413/
While not expressing a direct listing of how to connect the two, it should get you started down the right path.
Fraggle
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply