Sql Server 2005 Database Names
Posted on 2012-04-04
I know this is highly unorthodoxed but here is the scenario
I have a DB named RCSQL. This RCSQLDb is used by a purchased 3rd party software called Zoll and clients access the software via remote desktop.
I have another piece of Software that integrates with ZOLL called Ezpcr to provide other fuctionality not provided by ZOLL to the client company. Its Database is PCR
However Ezpcr, software combines data in tables in stored procedures from the two databases CAD and PCR.
Now this web based software was never meant to be taken out of house. Meaning installed as a standalone piece and was meant to been done via hosting for other companies.
I have to now create it so it can standalone on another server where it accesses the client's own copy of the ZOLL database. Their Database is called CAD and it is referenced through installs on different machines with the client software.
So know I have a SQL Server with PCR DB and CAD DB for the Zoll Software. But for the EZPCR software to work the Zoll software DB needs to be named RCSQL not CAD.
My Question is can I make some form of an Alias or mutiple datbaase names for the CAD DB that is on the client server that point to the same database.
CAD and RCSQL database names point to the same database on the clients server.
This way two sets of code does not need to be created and maintained just for the databasename reference.
I hope you guys and gals followed that. And yes I know this is not usual or best practice. But this is just a fix until I build new software which will no longer do that.
So I don't have to maintain two sets of code and do a massive change to the existing code all for a database name.