Hi all,
I have hit a rather annoying problem in view of cross referencing databases.
I am currently trying to deliver an in house solution on the back of third party software.
My gui uses stored procedures from my reporting database, these stored procedures reference the third party database tables in the format of thirdPartyDB.DBO.TABLE1. this works very nicely and has fantastic speed in return.
My problem is that when setting up this third party databases on live and test servers they named them differently.
on live server they named it ThirdPartyLIVE and on test ThirdPartyTEST..... this makes migrating my development to live a REAL issue of having to go through every statement in every procedure to change this for live, then when further development happens the process will have to be completed again... and again!
It would seem easy to create a new database on the test server called ThirdPartyLIVE (which i have done) but the software is setup with its own test front end, pda connectivity and also other third party software connections for transferring data. This meaning it isn't going to be easy to recreate this for my new ThirdPartyLIVE database (infact I wouldn't know where to start, i just wrote my bit!!!)
So my question is.... is there a way to name a database as a variable and call this in a function so all i have to do is modify the database in one place, maybe even a table... then is will refer to the database without needing any further mod other than setting it up in the first place??
Any help or advice whether it be good or bad news is greatly appreciated.
Oh, database is sql server2005.
Cheers
daveJam
even my shrink says its all your f#@/ing fault
I have hit a rather annoying problem in view of cross referencing databases.
I am currently trying to deliver an in house solution on the back of third party software.
My gui uses stored procedures from my reporting database, these stored procedures reference the third party database tables in the format of thirdPartyDB.DBO.TABLE1. this works very nicely and has fantastic speed in return.
My problem is that when setting up this third party databases on live and test servers they named them differently.
on live server they named it ThirdPartyLIVE and on test ThirdPartyTEST..... this makes migrating my development to live a REAL issue of having to go through every statement in every procedure to change this for live, then when further development happens the process will have to be completed again... and again!
It would seem easy to create a new database on the test server called ThirdPartyLIVE (which i have done) but the software is setup with its own test front end, pda connectivity and also other third party software connections for transferring data. This meaning it isn't going to be easy to recreate this for my new ThirdPartyLIVE database (infact I wouldn't know where to start, i just wrote my bit!!!)
So my question is.... is there a way to name a database as a variable and call this in a function so all i have to do is modify the database in one place, maybe even a table... then is will refer to the database without needing any further mod other than setting it up in the first place??
Any help or advice whether it be good or bad news is greatly appreciated.
Oh, database is sql server2005.
Cheers
daveJam
even my shrink says its all your f#@/ing fault