alias a database name in SQL 2005

  • I need to alias a database name in SQL 2005

    Problem is I have a production DB I am copying to a test\QA server for testing.
    The issue is we have linked servers in the production DB the had four part naming hard coded in some of the stored procedures.
    I have no problem using an alias linked server or any objects like tables etc... But the issue is how to you alias a database
     
    Example : production SP that uses a linked server  
    productionserver1.productiondatabase1.dbo.productiontable1
    This needs to point to a dev server and database I can pull off everything but the database alias
     
     
    Test\qa needs to reference the test instance of the production linked server
    We have two to three databases for each production database "dev and QA"
    I can call the server testdatabase and the tables testtable1 etc.... but have not found a way to do this to a database yet.
     
     
  • I don't believe there is a way to alias the database. So you basically have one SQL Server for all non-production work, right? Do you have the option of installing a named instance or two on that non-production server? I know that it means more SQL Servers to manage (though still the one physical server), but it would allow you to segregate Dev and QA.

     

    K. Brian Kelley
    @kbriankelley

  • That would not be an option for me to modify the database structure like that. But if I did that it still would not solve the problem.
    In order to test the stored procedures in a dev QA workspace I would have to modify each one just to test them to see if they work "not my requirement" to test every SP
     
     
    The place I work for is moving from SQL 2000 to SQL 2005 and they are not going about it the best way.
     
    They want to test about everything including 600+ stored procedures.
     
     
    As we all know SQL 2005 is that untested database product that has not been proven in the workplace (LOL)
     
     
     
    You have answered my question
     
    Thanks
     
     
     

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

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