all groups > sql server replication > february 2006 >
You're in the

sql server replication

group:

Best way upload data (and only data) to a publisher from a soon-to-be merge subscriber


Best way upload data (and only data) to a publisher from a soon-to-be merge subscriber Troy Wolbrink
2/6/2006 1:02:28 PM
sql server replication:
I develop downloadable (shrink-wrap) software currently used by individuals.
My users are typically running MSDE/SQL Express on their own computer for
their personal database. But now small groups of people here and there want
to move past having their own personal database and they want to share a
database and stay in sync with each other. I want to explore the solution
of allowing them to stay in sync by providing a Windows server with SQL
Server 2005 to support merge replication via HTTPS (over the Internet). My
customer base are not in the context of a conrolled/enterprise environment.

Here's in broad strokes how I'd like this system to work. A customer
decides they'd like to share their database with their team. They contact
me, and I set them up with an account and a new empty database on my Web
server for their use. They *somehow* upload all their data from their local
database to the publisher database on my server. Then they create a "no
sync" subscription to the publisher, and they are all setup. Their team
members simply create a new local database, and then initialize a
subscription to the central publisher via a snapshot.

So what is the best way to upload all their data from their local database
to the publisher database on my server? I'm assuming (and will verify) that
the database structure is the same between the local database and the
publisher database. I only want to copy data. I don't want to wipe out the
publisher database with a copy of the local database. I do plan on
providing a Web service to help manage this, so the solution doesn't have to
be completely built into SQL Server. But the less I have to build, the
better.

Thanks,
Troy



Re: Best way upload data (and only data) to a publisher from a soon-to-be merge subscriber Mahesh [MSFT]
2/6/2006 7:12:54 PM
How about bcp out of this database/table and then using this to bcp in into
the publisher server.
And note that if this table is already published, you will need to call
sp_addtabletocontents (look BOL for the syntax and functionality)

Another options is create a temp table in a new database on the Express,
backup and then restore this database on the publisher, then do a insert of
those rows at the publisher.

Hope that helps
--Mahesh

[ This posting is provided "as is" with no warranties and confers no
rights. ]


[quoted text, click to view]

Re: Best way upload data (and only data) to a publisher from a soon-to-be merge subscriber Troy Wolbrink
2/7/2006 9:24:31 AM
[quoted text, click to view]

Thanks for the pointers. I'll keep this in mind. It also occurred to me
that this could all be done on the client. I could create a new database
subsribed to the publisher (via merge replication), then on the subscriber
database, I could import the old database's data (same local server), and
let merge replication manage it from there.

--Troy

Re: Best way upload data (and only data) to a publisher from a soon-to-be merge subscriber Mahesh [MSFT]
2/8/2006 10:49:34 AM
Yes, definitely you can do that.

Hope that helps
--Mahesh

[ This posting is provided "as is" with no warranties and confers no
rights. ]


[quoted text, click to view]

AddThis Social Bookmark Button