Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
coderdude
Starting Member
24 Posts |
Posted - 2003-09-16 : 13:36:10
|
| I currently have both the development and production versions of two databases on the same SQL server. So I have 4 databases in all:DB1DevDB2DevDB1ProdDB2ProdI have written a stored procedure in DB1Dev database that joins a to a table in the DB2Dev database. Here's a sample:SELECT * FROM DB1Dev.dbo.Table1 T1INNER JOIN DB2Dev.dbo.Table2 T2ON T1.Key = T2.KeySo my problem is... when I move this stored procedure to the production database DB1Prod I have to manually change all the "Dev" to "Prod" to make it join the correct databases!Is there an easier way to do this? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-09-16 : 13:37:56
|
| That's why you never should name your databases like that. You should be using multiple instances of SQL Server instead of having multiple environment databases on one server.There is no easier way. You should rename your databases so that they do not include the environment name, such as dev, prod, test, qa, etc...Tara |
 |
|
|
coderdude
Starting Member
24 Posts |
Posted - 2003-09-16 : 13:55:39
|
| Now why didn't I think of using multiple SQL server instances?THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! |
 |
|
|
|
|
|