Replication Simulation

  • i need to do this:

    simulate a replication but with some particular rules like examples:

    - some table won't add always they will check if the value exist and if so it won't do nothing

    - some table need to check first if there is some value in other table. if so then it'll make the operation indicated

    - some table if the value exist won't do anything

    - some table if the value exist will update

    and many other rules. there is some way that i can do this? all this is between SQLServer 2012 of course and also that this operation will be execute like a task, at an specific time of the day and every day.

    thanks.

  • I think the bigger question is, what's driving your requirement. It sounds like you have network traffic concerns, but where replication is concerned, that should be the least of your worries. Replication can be challenging to deal with entirely outside of any networking concerns. What you described sounds like a MERGE, and you can set up a number of "rules" for such a statement. Look up MERGE in BOL.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • the problem is that my DB has more than 100 table and using your idea (MERGE) i'd have to write a lot of code and that is what am trying to avoid. Rules won't be as simple as i said before always, but it's a good point what you are telling me, i'll follow your advice with merge, maybe there is more that i don't know about it. thanks again

    if you have any other idea ...

    regards

  • Sounds more like an ETL project than replication...

  • Jon.Morisi (2/29/2016)


    Sounds more like an ETL project than replication...

    ETL maybe if it were a one-time thing, or a scheduled thing, but wanting something that's like replication but can follow all the rules the original poster wants to implement, and not have to write a lot of code, is more fantasy than reality. Somebody at an upper level probably wants no replication hassle but the same functionality plus add in a bunch of custom rules, and at little to no cost. Not gonna happen. ETL can sort of get you there, but then for all practical purposes you are re-inventing replication. The key element is going to be what kind of delay is acceptable in terms of changes to the original database being reflected in the second one.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • first i don't know what is ETL and am looking in the web what it's right now. about time, it will run about 2 o 3 am or maybe late at night when nobody is working. i said at the beginning of my post the word "replication" because was the most similar process that i know, but am open to hear new thing.

    have any link about what is or how to implement an ETL project?

    thanks.

  • jackie.3981 (2/29/2016)


    first i don't know what is ETL and am looking in the web what it's right now. about time, it will run about 2 o 3 am or maybe late at night when nobody is working. i said at the beginning of my post the word "replication" because was the most similar process that i know, but am open to hear new thing.

    have any link about what is or how to implement an ETL project?

    thanks.

    SSIS is the primary tool, at least in the Microsoft space anyway. Another alternative is log-shipping. Either of those is going to involve a fair amount of effort, either on the part of a DBA for log-shipping, or on the part of some number of database developers for SSIS.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply