Monday, March 12, 2012

Help needed to merge a few database - same tables

Hi all,
I am new to SQL and have to support application that uses MS SQL 2K.
I have to merge a few database , (with the same tables structures -
each
one include identification database Id) to one database file with the
same tables structures.
The merge should run on a daily bases ( all the new data on each table
will be from the last day until current day (one of the field in the
tables).
In addition if during the merge for some reason it "fail" a
rollback procedure is needed to the situation before the merge with
these tables.
I appreciate if anyone can help me with SQL script that will do the
work.
Or direct me how I should do it.
Thanks
RGI think you need transactional replication for this. It will replicate
transactions within a transactional context, with the commit or rollback
feature you require.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
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
<ran_gl@.hotmail.com> wrote in message
news:1152013871.628536.225820@.p79g2000cwp.googlegroups.com...
> Hi all,
> I am new to SQL and have to support application that uses MS SQL 2K.
> I have to merge a few database , (with the same tables structures -
> each
> one include identification database Id) to one database file with the
> same tables structures.
> The merge should run on a daily bases ( all the new data on each table
> will be from the last day until current day (one of the field in the
> tables).
> In addition if during the merge for some reason it "fail" a
> rollback procedure is needed to the situation before the merge with
> these tables.
> I appreciate if anyone can help me with SQL script that will do the
> work.
> Or direct me how I should do it.
> Thanks
> RG
>|||Hi, Hillary
How are your doing?
I was thinking about SNAPSHOT replication instead of transactional ,because
the OP said he needs it on daily bases.
Well, I think it is easy to handle , however I'm not sure about ROLLBACK in
case of the failure.
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:%23NETQF2nGHA.4728@.TK2MSFTNGP03.phx.gbl...
>I think you need transactional replication for this. It will replicate
>transactions within a transactional context, with the commit or rollback
>feature you require.
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> 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
>
> <ran_gl@.hotmail.com> wrote in message
> news:1152013871.628536.225820@.p79g2000cwp.googlegroups.com...
>|||Shalom Uri!
Snapshot will work as well. But it will mean you have to transfer all the
data and there is no transactional consistency. So in his case all the data
will move or none of it (if the snapshot fails). With transactional
replication, transactions are read from the tlog, decomposed into
constituent commands, and then these commands are applied within a
transactional context on the subscriber. Should a command fail, the entire
transaction is rolled back.
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
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:uIdwdc2nGHA.4124@.TK2MSFTNGP03.phx.gbl...
> Hi, Hillary
> How are your doing?
> I was thinking about SNAPSHOT replication instead of transactional
> ,because the OP said he needs it on daily bases.
> Well, I think it is easy to handle , however I'm not sure about ROLLBACK
> in case of the failure.
>
>
>
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:%23NETQF2nGHA.4728@.TK2MSFTNGP03.phx.gbl...
>

No comments:

Post a Comment