ilija veselica
ilija veselica

Reputation: 9574

Datawarehousing with ASP.NET MVC

On one server there are more than 20 databases with identical structure but different data. I need to collect some of the data (the same queries) from all databases and store in new database which is located on another server. I decided to use ASP.NET MVC 2 but it doesn't seem logical to use more than 20 "LINQ to SQL Classes" (.dbml) files because the structure is the same for all databases and it's repeating if I use so many of these files. Is there a simple way to use one .dbml file (for remote databases) but change only connection string?

Upvotes: 0

Views: 1976

Answers (3)

KallDrexx
KallDrexx

Reputation: 27803

According to this, you can pass in a connection string with the dataContext constructor. So theoretically, you should be able to have one dbml file, but you can instantiate multiple instances of your data context, each with a different database connection string specified. Each context should then point to their respective database and allow you to work with multiple databases.

Upvotes: 2

czuroski
czuroski

Reputation: 4332

I agree that you really wouldn't want to use MVC as that is a web framework and has nothing to do with moving data around.

You can also look into using an ETL tool to accomplish this task. I have used RhinoETL in the past successfully to accomplish something similar.

There are also multiple posts on this site discussing ETL tools. For example, check the following link - https://stackoverflow.com/questions/51198/what-etl-tool-do-you-use

Upvotes: 2

UserControl
UserControl

Reputation: 15159

Why do you want to use ASP.NET MVC at all? ASP.NET is for web UI, not data warehousing (except when you need to display cubes). Looks like you use SQL Server. If that is true you can utilize Integration Services (ex DTS) to do the job.

Upvotes: 1

Related Questions