Moving Data Between Sql Server 2008 Instances

I have a sql server database on my server and another one on my laptop that I use to go out and time races (5ks, nordic ski meets, etc),  Given the oftentimes lack of internet connectivity I have to move the data from the server to the laptop, go time the race, and then move it back to the server with the new results.  To move the data I simply copy the data files from the data folder to dropbox or a jump drive and then go get them...  Is there a better way?

Years ago I tried to use replication with sql server 2000 but, not being a db professional, I just couldn't get it right.  My next effort will be to write a script that will identify new data and write that into the db via a web page.  Before I do that I am wondering if there is a better approach for a hack like myself.
Bob SchneiderCo-OwnerAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

Mark WillsConnect With a Mentor Topic AdvisorCommented:
Nope, not saying CDC ... Saying Change Tracking...

Look under "replication" to see features supported  (Note SQL Sever Change Tracking)

Then lookunder Datawarehouse Scal and Performance (note CDC)
Kent DyerConnect With a Mentor IT Security Analyst SeniorCommented:
Look at replication partners and setup in BOL.

Should not need to script unless needed as the replication partnership should handle changed data..


Saurabh BhadauriaCommented:
let me know in details about your data and all...

how many tables you need to sync between server and laptops ?
How many new record you need to push to server from laptop every time ?

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Bob SchneiderCo-OwnerAuthor Commented:
Could be as many as 800 records that need to be adjusted (note: not new records for the most part, but records that need to be modified).  I will look at replication partners...not sure what BOL is but I will figure it out.
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
I use Red Gate SQL Data Compare to compare data:
Mark WillsConnect With a Mentor Topic AdvisorCommented:
BOL = Books Online - the SQL Server name for Help.

Because it is kinda random and not huge datasets, I am not so sure you need full replication. It sounds like one way traffic to me being field results >> Server

How do you access your server when back on the network ?

If you use your own SSMS, then you can do things like COPY and PASTE rows much the same as you would do in excel.

Open your own table (right click the table and open), select the rows and copy, then open the network database (within SSMS) and open the network table and then paste.

Or, if you can, open a linked server and run an insert statement.

Or, you could use database copy wizard and then import to the server.

Or, do what you are currently doing, copy your database to the Network instance and attach then do the updates to the "live" repository (it isnt really a bad solution from what it sounds like)

Some of it depends on your table structures (if updates are needed or just inserts) and how many different tables are really involved...

It is also very dependant on how you access / the connection to the network instance of SQL Server.

The important part of the puzzle is to script what ever you are doing, so it is "easy" next time.
Bob SchneiderCo-OwnerAuthor Commented:
Because of the fact that there are changes being made to multiple tables I am not sure the copy-n-paste solution would work.  I agree that a full replication solution might be too much.  What I am doing now is not bad from most perspectives but what happens is that, when I move the db to my laptop to time an event, any changes made on the server until I re-load the database (ie: by coaches of teams in an upcoming race or by individual entrants in an upcoming race) are lost.  As a result I have to close the server during that time to avoid any further changes being made.  That is pretty inconvenient to my upcoming races.

I think the best thing to do is to write a script in my vb6 app that creates a text file of all changes made during the event and then use my web site to modify the server database.

Given this information, does it sound like I am on the right track or am I missing something?
Mark WillsConnect With a Mentor Topic AdvisorCommented:
OK, if there are lots of other tables involved, and it is not a discrete snapshot, and it is two-way traffic, then replication might not be such a bad choice...

Depends a bit on Server v Web v Laptop.  Not exactly sure of what the app environment is doing. And if in fact it is always two way (ie teams might be via Web to Server then needs to make it out to Laptop, but the only data from the "field" are the actual results).

Still, it sounds like your laptop is pretty much "untethered" for some of the time... So, writing a script (either SQL or VB) to export changes since data load is easy enough and might be the best solution for you.

Best to sit down and list exactly what changes are going where and when... If the same tables are involved in two way updates, then replication does handle "the latest changes" pretty well. If individual tables have one way traffic (albeit a few tables) then a script can be an easy to define process and easy to create data flow.
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
Scott PletcherConnect With a Mentor Senior DBACommented:
Redgate's tools are excellent, but I don't think  they have a free version of compare.

You could instead use MS's free program, "tablediff.exe".  That would allow you to generate statements to put the data back in sync.

It's a line-command utility, so it's a pain to get used to, but once you do it's reasonably good, and it's fast for small amounts of data, as in your case.

You could then leave the server db live, and just merge in your differences.
Mark WillsConnect With a Mentor Topic AdvisorCommented:
Well, you could also use Change Tracking - that will identify what rows have changed and can be easily retrieved (on both Express and Server).
Scott PletcherSenior DBACommented:
I guess CDC could be available on the laptop if you're running Developer Edition.

It will require on-going administration, however, and could take up a lot of disk space if not properly maintained.
Bob SchneiderCo-OwnerAuthor Commented:
Really good discussion.  Thanks!!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.