Click here to Skip to main content
15,905,682 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

For my client, having 5 different branches(Retail Shop) in 5 different locations. Hence i thought of maintain "Five different SQL databases(C1,C2...C5) and One Master database(M)". This Master Database is for Maintaining "user Accounts" and "Login Details". Because only ADMIN can create userID and Password for Users, Which is stored here in Master DB.


My Problem is now, i can create an ASP.NET application with one "Connection String" which refer my "Master DB". Which check for Valid User and Logging in. But after Logging in, i would have different connection with different database which is "ClientDB"(branch database, C1 or C2 or...C5).
Now, Where should i maintain these ClientDB's connection String ???

In SESSION ?? (or) In master DB itself ? (or) Is there any other way to do it with high security ??



Please help me out...
Posted
Updated 21-Sep-11 1:39am
v2

Use 5 connection string then. Based on the locations select the related connection string.
 
Share this answer
 
Comments
J.Karthick 21-Sep-11 7:24am    
Sorry Toniyo Jackson, i can't do that because i need to know the user Activities by an single DB(MASTER DB).
Branches should have everything they need in place in case of connection failures.

So your connections strings will all be local to the branch.

You should "replicate/sync" your data between branches and the master.
 
Share this answer
 
Comments
J.Karthick 21-Sep-11 7:26am    
I have only one MasterDB for filtering the users. I should maintain records only on the "Client DB" for different branches.

Is ther anyother way to maintain it locally???
Mehdi Gholam 21-Sep-11 7:32am    
Copy your masterdb to every branch, and sync the contents with your HQ when needed.
J.Karthick 21-Sep-11 7:51am    
OOps!! I have only one server with MAster DB, Client DB1,Clent DB2,...DB5
I would write a web service that knows where all of the databases are, and this web service would use the one appropriate to the request being made. In fact, I'd probably put all of the databases onto a single server, and at that point, the only thing that changes in the connection strinbg would be the database instance, the user id, and the password.
 
Share this answer
 
Comments
J.Karthick 21-Sep-11 7:57am    
This is what i'm exactly wants....Can you explain it brief, how to acheieve it using web services???

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900