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 |
|
Clages1
Yak Posting Veteran
69 Posts |
Posted - 2007-06-05 : 20:20:47
|
| HiWe have a System running in several Clients (companies who uses our System)The Main DataBase name is DEC, Of course if we have 10 Clients, we have 10 DATABASE with the same name each one in his own SERVERS .In Our Office we have all this ten DATABASE in our SERVER in different Directory.All Stored Procedures, Programs, Scritps, etcare written as "Dec.dbo.tablex.Collumn"Then I have to Attach the DATABASE from Company AAA , work in it.If i need to Check something , or run the System using anotherDatabase from Other Company (Ex Company BBB) i have toDettach Company AAA, and Attach Company BBB.and so on.If i Attach the DataBase DEC from Company AAA as DECAAADataBase DEC from Company BBB as DECBBB DataBase DEC from Company BBB as DECCCCAnd run the Aplication i get Error (No Database Found ) because the aplication is looking for DEC not DECAAA.Is there anyway where i can change the name of Database from DECAAA to DEC ?Or Alias name? Or something to Avoid ATTACH and DETACH?TksCLagesI |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-06-05 : 21:24:51
|
what is the reason for you to use "Dec.dbo.tablex.Collumn" ?Why do you want to fixed the database name there ? KH |
 |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2007-06-06 : 02:34:26
|
this doesn't scale well. what do you do when you have 100 clients? 1000? it would probably be better if one db could handle any number of clients. Rather than adding a entirely new db to your server for each client, wouldn't it be nice just to add a single row to a Client table?  elsasoft.org |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-06-06 : 03:19:56
|
| We used to do this. We wanted all our clients to have a database name with the same name as our company. I suppose we thought it was good for advertising ... until we realised that the only people who saw the database name with the Admins, and they didn't make any difference to our marketing!Now we use our Connection String to point us at a database name which can be set in a configuration setting, and everything after that uses the "current" database.Kristen |
 |
|
|
|
|
|
|
|