Global Cross server stored procedures and functions

  • Hi All,

    I have a situation where, like many of us, I work across multiple database on multiple servers.

    I have a bunch of "standard" bits of code I've written over time to various things and I like having them available in all databases I work on.

    The issue I have is version control of these bits of code across the many databases and servers. I could put the the code in master database and that would keep it uniform for each server but I'd ideally like a way to maintain versions across servers too.

    I have thought about setting up a central "code database" on one server and using a combination of linked servers and automated tasks / triggers fire updates out from that point but I wondered if anyone had a slightly more elegant solution?

    Thanks

  • You're going to need separate copies of your code database for each server.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • Not so. I've decided to go with a centralised code database and using the ssis component that transfers the code over to other DB's.

    Then use a scheduled task to run the ssis package every hour or so and bam! job done 🙂

  • Yes... but you still have a DB on each server, yes?

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • Nope just on central code db that holds a list of all servers to updated. it writes into the master db on each server and hence makes the code globally available on each server

  • Perhaps I'm not being clear.... the point is that you have a database on each server. You aren't trying to run code across linked servers as your original post suggested.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • Ah sorry I misunderstood. yes technically there will be copies of the code on each server but they will be maintained from a single repository server via ssis and scheduled jobs etc.

  • Sounds great 🙂

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

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

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