Multiple Database

Posts   
 
    
Posts: 25
Joined: 16-Jul-2007
# Posted on: 18-Dec-2007 15:35:43   

Hi,

We have developed a web application. we are using LBLGEN 2.0 for DAL and accessing SQL server 2005 right now. Now our requirement is to support multiple SQL servers database.

Please guide me, how to proceed further?

gabrielk avatar
gabrielk
User
Posts: 231
Joined: 01-Feb-2005
# Posted on: 18-Dec-2007 15:40:03   

Hi,

I guess you want to have multiple databases to support multiple instances of the application for different companies/users ?!

So you have 1 set of code with multiple databases for each client? Or do you have 1 applicaiton which needs to access multiple databases, in that case you could include multiple databases in your LLBLGen project (but I presume it's the first scenario)

Are you using Adapter or SelfServicing?

Take a look at:

http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=5288

and

http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=5209

Cheers, Gab

Posts: 25
Joined: 16-Jul-2007
# Posted on: 18-Dec-2007 16:03:46   

One application which needs to access multiple databases based on user's selection. Right now we generated DAL in SelfServicing mode.

jmeckley
User
Posts: 403
Joined: 05-Jul-2006
# Posted on: 18-Dec-2007 17:51:07   

it may be alot of work, but I would recommend migrating to the adapter model. this model provides the functionality required to access multiple databases.

I think it's possible with SS, but it's a hack. SS is designed for single db access. I haven't used SS so I can't say for sure.

gabrielk avatar
gabrielk
User
Posts: 231
Joined: 01-Feb-2005
# Posted on: 18-Dec-2007 18:56:07   

As said it's a "hack" or at least a "not so nice" solution. One of the problems is the possible performance issues, for example (this I cite, and don't know from experience) the connection pooling isn't (at all) used in this scenario.

I've worked with it without problem, but not in large scale applications or large amounts of databases.

Cheers, Gab

Walaa avatar
Walaa
Support Team
Posts: 14951
Joined: 21-Aug-2005
# Posted on: 25-Dec-2007 11:36:35   

If your multiple databases resides in multiple servers, and thus they all have the same catalog/database name. Then using the SelfServicing model you can just switch the server name in the connection string.

But if the multiple databases resides in the same database server/instance but using different catalog names, then it's better that you use the Adapter model to switch between different catalogs at runtime.

gabrielk avatar
gabrielk
User
Posts: 231
Joined: 01-Feb-2005
# Posted on: 27-Dec-2007 09:28:21   

Is there any more info about possible performance issues?

Thanks, Gab

Walaa avatar
Walaa
Support Team
Posts: 14951
Joined: 21-Aug-2005
# Posted on: 27-Dec-2007 09:46:52   

Gab wrote:

Is there any more info about possible performance issues?

What do you mean?

gabrielk avatar
gabrielk
User
Posts: 231
Joined: 01-Feb-2005
# Posted on: 27-Dec-2007 10:56:27   

Not to worry... is explained enough in the quoted threads.

Thanks