Best Practice Multiple DB Servers

  • Is it possible to write a "Create Stored Procedure" script that works on one server and points to another server?  Maybe use the server name as a variable along with the database name?

    Any ideas?

  • You can use linked servers and the full naming convention. lookup sp_addlinkedserver in BOL

    HTH

    ------------

    Ray Higdon MCSE, MCDBA, CCNA

  • What I'm trying to do is write a create stored procedure script that I can run against different servers.  For some reason when I tried using "sp_addlinedserver" in Query Analyzer it is not working the way I want it to.  Overall what I'm trying to do is find the best way to work with db, tables and stored procedurers in a development / production enviroment.  Usually I just create my tables, sp's, view, etc on development servers and then just physically move them to our production servers.  But now we are trying to improve quality and assurance in our db tasks and I have to have someone else move objects and tables and sometimes I just need one stored procedure moved.  I assumed that by writing scripts with a variable @ServerName that I could have someone else run the script against another server and that would be the best practice for things like this.  I'm I wrong in assuming so?  Are there any other practices that others use?  Help!!!!

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

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