Match Procs Across Servers

  • We are running two side by side reporting servers, one as the live server and one as a failover. When a proc is created or altered on the live server the same should be done on the failover. Currently this is done by changing the connection from one server the to other and repeating whatever was done. What we'd like is some sort of fail-safe so if the change isn't made on the failover it is picked up and done automatically. I'll be able to write something that picks up those procs that have been created\altered on one server but not the other but I'd like some advice about how to go about scripting out the required procs and making the appropriate changes, if indeed that's possible. We may be able to go with third party tools but I think they may have to be a last resort. Any suggestions?


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

  • Replication ??

  • Clustering/mirroring for the failover box should already be doing this for you.

    --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)

  • Thanks for the replies but I think I've now got more questions than I had before. What's the best way of checking that clustering, mirroring and replication are set up and running right? We're 'only' the Reporting Team and there's not a massive amount of DBA experience about. We can query the databases and make a beautiful whizzy report to show you pretty much anything you want, but if you ask us how things are running then there's only so much we can do. Yes, there is recruitment going on for a DBA but until then we're a bit in the dark.


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

  • When you set up replication, you generally also set up scheduled job to replicate data at a specified interval. You can get an alert if those jobs fail.

    You could also set up a job to check that a few of your replicated tables have current data in them. Either check that data values are current, or use a linked server to compare against the publisher's tables. Send an email alert if any discrepancy is greater than the replication frequency.

  • You could write something in Powershell to cycle through the procs and functions, comparing source and target versions, and updating as needed.

Viewing 6 posts - 1 through 5 (of 5 total)

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