all groups > sql server replication > december 2005 >
You're in the

sql server replication

group:

Options.


Options. Ches Weldishofer
12/13/2005 2:59:33 PM
sql server replication: We're trying to pull approximately 50 tables out of a database of
16,000. Unfortunatley none of them have primary keys, they are all
keyed by multiple fields (mostly effective dated).

Ideally we'ld like to see only changed or inserted records be loaded
into the subscriber. (Those would be processed for a DW).

I can't find a neat solution.

We can't use transactional replication because there are no primary
keys,

if we used Snapshot replication then (as far as I can tell) we'ld have
to go through every line to see if it needed to be processed.

Log shipping won't work because of the sheer size of the database and
the smidgen of it that we actually want.

We've toyed with adding a timestamp to every table to be pulled, but
that gets into update issues and all sorts of potential problems down
the road.

Any suggestion would be very much appreciated, before I go totally
grey!!!

Ches Weldishofer
Clear Channel Worldwide
Re: Options. Hilary Cotter
12/13/2005 9:39:04 PM
Some options come to mind. The first involves putting pks on these tables
and using transactional replication. The second involves using views to
insulate the tables which now have pk's on them. The pk would consist on an
int identity column. The app would talk to the view and would not see the
identity column/pk. This only works on small tables. The third option is to
place triggers on these tables which will write to "audit" tables which will
contain a key column. Then you just replicate off these key columns. Another
option is to replicate from indexed views which are based on your tables.

--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com

[quoted text, click to view]

Re: Options. Ches Weldishofer
12/14/2005 7:26:09 AM
Thank you for the reply. It looks like we're considering adding PKs as
the least intrusive to the 3rd party app this runs from. Now my
problem is figureing out what's been replicated. Is there a way to add
a timestamp the replicated row in the subscriber only? I noticed an
sp_addcolumn but that appears to be only existing columns. We do not
want to timestamp every table in the source.

Ches Weldishofer
Clear Channel Worldwide
Re: Options. Hilary Cotter
12/15/2005 6:02:18 AM
Yes you can do this. Everytime you sync it will revert back to the published
form though.

--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com

[quoted text, click to view]

AddThis Social Bookmark Button