Synchronising Databases

  • Hi,

    We have a lot of databases in our Sql Server. We are creating a web application which uses lot of stored procedures. We are creating all these stored procedures in our sample database. Lets say I have a database db1 which has all the stored procedures. I also have a common database db. I would like to create a stored procedure in this common database which will check if a stored procedure exists in one of our Client databases. If not, it needs to get the text of that stored procedure from the sample database db1 and create that stored procedure in the client database. I do not know if this is the right way of synchronizing the databases. If it is, please let me know how to do that. If not, please let me know the right way of doing it.

    Thanks,

    Sridhar.

  • Have you checked out RedGate SQLCompare software?  It compares databases, and generates the approiate scripts to "sync" the databases. 



    A.J.
    DBA with an attitude

  • Hi,

    I just need to create the Stored Procedures and Functions that does not exist. So I was thinking to write code to do that instead of buying a software to do that. Please let me know how I could do that.

    Thnx,

    Sridhar.

  • If you truly want to synchronize, why not just generate all the code for sprocs, views, and udf's in Enterprise Manager and let 'er rip?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 4 posts - 1 through 3 (of 3 total)

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