Best practices for moving data using triggers in SQL Server 2000 -


i have troubles trying move data sql server 2000 (sp4) oracle10g, link ready , working, issue how move detailed data, case following:

table master table b detail

both relationed work trigger (for insert)

so query needs query both create robust query, when trigger fired on first insert of master passed normal, in next step user insert 1 or more details in table b, trigger fired time record increment, problem need send example :

1 master - 1 detail = 2 rows (works normal) 1 master - 2 details = 4 rows (trouble)

in second case work around detail in each select each insert duplicates data, said if detail have 2 details normal 2 selects 1 row each one, in second select rows doubled (query first detail inserted)

how can move 1 row per insert using triggers on table b?

most of time boils down coding error, , blogged here:

http://www.brentozar.com/archive/2009/01/triggers-need-to-handle-multiple-records/

however, i'm concerned what's going happen rollbacks. if have program on sql server several things in row different tables, , they're encapsulated in different transactions, can envision scenarios data inserted oracle won't in sql server. advise against using triggers cross-server data synchronization.

instead, consider using dts or ssis synchronize 2 servers regularly.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -