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.
Author |
Topic |
ayamas
Aged Yak Warrior
552 Posts |
Posted - 2006-06-17 : 00:53:16
|
hi guys,I have a problem.A new project is under consideration in our company.The need of the client is that he will be having local databases at different locations.He wants that in the nightthe data from all the locations should be updated to the main database through dial up.The dial up will be scheduled using windows scheduler.I mean for one location the dial up will be running for 30 minutes & after tat it will disconnect & then reconnect to other location.All this things will happen in the night.What I want to know is how will the data be fetched from the tables of SQL server of that particular location & then inserted into the main location database only after the connection is up from the dial up.Any help is greately appreciatedThanks in advance |
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2006-06-18 : 18:00:56
|
Are you asking how will the data be transferred, or how will the remote DB know when the connection is up??If you're doing this over dial up, my first option would be to:1. extract the data from the remote db's at a given time (i.e. all remote db's do this at the same time). This can be done using bcp or DTS2. When the remote server connects, it can simply pick up the files using FTP or similar3. Update the central db in one go (again, using bcp or DTS)HTH,Tim |
 |
|
ayamas
Aged Yak Warrior
552 Posts |
Posted - 2006-06-19 : 04:32:32
|
Timmy thanks for ur reply.Well we have explored 2 options for the above.The first one is1)We will use osql utility & then combine it into a batch file.That batch file will bescheduled to run in the windows scheduled task at a particular time in the night for 30 mins.I mean for each locations we will hv individual batch files lk this.For dialing we will use the rasdial utility.we will have linked servers for the number of remote databases we have to the main database.I am jst giving the sample batch file using pubs databaserasdial Roulmoe administrator ta09won /phone:3410283OSQL -E -d pubs -q "insert into dates(date1)values ('08-07-2006')2) While the second option is to create a SQL job in the individual remote databases to export data into a text file or a csv file using the bcp utility at a particular time in the SQL server & then use FTP to transfer that file into the main the computer then again import it into the main database.But the problem in the second option is how to transfer the particular file using FTP,only when the connection is up through dial upAny suggestions?Regards |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2006-06-19 : 21:31:10
|
For the 2nd option:If you mean 'how will the remote machine know when the connection is up', I would have the FTP controlled by the same machine that controls the dial up connection. This potentially means you'll need to run an FTP server on each of the remote machines. Otherwise, you might want to clarify your question a bit...Tim |
 |
|
arf_chou
Starting Member
6 Posts |
Posted - 2006-07-18 : 05:59:31
|
use merge replication,Use Jobs in Sql Server to dial up to a particular location,and the synchronise on sucessfull dialup.On Success Disconnect from one location else retry by going back to the previous step,Connect to the other Location,Synchronise.We have the same scenario out here.3 branches, 1 head office, data updated and inserted at all location.replication happen twice as mentioned above.so that al branches and head office have same data.Hope this will help you. |
 |
|
|
|
|
|
|