C# - .NET Migrations: Setup And Migrate Multiple Databases At Runtime?

Jul 15, 2010

Brief introduction:I have this ASP.NET Webforms site with the particularity that it doesn't have only 1 database, it has many.Why? Because you can create new "instances" of the site on-the-fly. Every "instance" share the same codebase, but has its own database. These all databases have the same schema (structure) but of course different data. Don't ask 'why don't you put everything in one database and use InstanceId to know which is" because it's a business policy thing.

The application knows which instance is being requested because of the url. There is one extra database to accomplish this (I do know its connection string in design time). This database has only 2 tables and associates urls to 'application instances'. Then, of course, each 'application instance' has its associated connection string.

Current situation: There is nothing being used right now to help us with the job of mantaining every instance database in sync (propagating schema changes to every one). So we are doing it by hand, which of course it's a total mess.

Question: I'd like to use a rails-migration way to handle schema changes, preferably migratordotnet, but could use any other if it's easier to setup.The problem is that migratordotnet needs the connnection string to be declare in the proj.build file and I don't know them until runtime. What it would be REALLY useful is some kind of method running on *Application_Start* that applies the latest migration to every database.How could this be done with migratordotnet or any similar?

View 4 Replies


Similar Messages:

Web Forms :: Dynamically Connect To Multiple Databases At Runtime By Changing Connection String?

Nov 14, 2013

i have a dropdownlist contaning years..now i want to connect my database by dropdown selection.if i select 2013 it will connect 2013 database ,if i select 2014 it connect 2014 so on..

View 1 Replies

Databases :: How To Migrate From Mysql Version - 3.23.38 To Sql Express

Mar 12, 2010

I have an old mysql database, version - 3.23.38. I'd like to migrate from this database to ms sql express 2005. When reading through about MySQL Migration Toolkit, I found this fact - it is designed to work with MySQL versions 5.0 and higher. So, which toolkit could do for mysql version 3.23.38? Or let me know how to migrate it.

View 1 Replies

Migrate Multiple Mail Server?

Jan 2, 2011

how to migrate two mail server, just passing source and destination mail id .

View 2 Replies

Databases :: Trying To Setup The Security?

Sep 4, 2010

Because my new provider doesn't have SQL server, I have to connect to a MySql database.

My connectiostring in the web.config =

[Code]....

When I go to ASP.net webconfigurationpage and go to security I get the following message: An exception occurred.

I have really no idea what I'm doing wrong. Where do I have to search for?

View 3 Replies

Databases :: Data Access Layer For Multiple Databases?

Jul 6, 2010

i want to develop a data access layer ,it can support multiple database like oracle ,Mssqlserver and Mysql using enterprise library and C#.net 3.5 based on database connection

View 1 Replies

DataSource Controls :: How To Create Multiple Records In A Dataset From Multiple Databases

Mar 7, 2011

I am trying to design my logic to do this but I want to create a dataSet which will have records from several databases, The records all have the same layout.

I am reagin the connection string paths from a table in a database.

I am asking for your help in trying figure out my logic.

Should I use the connectionString builder in conjunction with a loop to Connect, read a record into a dataset Until therer are no more records to be read from my databse table with the database name/paths tables ?

Here is my beginning code which deals with one database:

[Code]....

View 2 Replies

Security :: Setup Multiple MySQLRoleManager Providers?

Aug 12, 2010

I have the following connectionStrings in my web.config file:
...
<add name="myApp1_dev" connectionString="Server=localhost;user id=root;password=;persist security info=True;Database=dbOne" providerName="MySql.Data.MySqlClient" />
<add name="myApp2_dev" connectionString="Server=localhost;user id=root;password=;persist security info=True;Database=dbTwo" providerName="MySql.Data.MySqlClient" />
...

I also have the following roleManager defined:

...
<roleManager enabled="true" defaultProvider="MySQLRoleProvider" cacheRolesInCookie="true" createPersistentCookie="false" cookieProtection="All">
<providers>
<clear/>
<add name="MySQLRoleProvider" type="MySql.Web.Security.MySQLRoleProvider, MySql.Web, Version=6.1.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="myApp1_dev" applicationName="/"/>
</providers>
</roleManager>
...

I dont know if this was the best way (somewhat new to vb.net), but in my Login.aspx page, I set global session variable to one of the two connection strings. If the user logs into App1, it uses connectionString myApp1_dev; if user selects App2, it uses myApp2_dev. My question / problem is: Each of the two databases have their own MySQL membership and role tables. If the user logs into App1, I would like to the dbOne database tables. If user selects App2, select dbTwo tables. Can I support Roles from multiple databases?

View 9 Replies

Configuration :: Setup Project And Multiple Installations?

Sep 28, 2010

is it possible to create a Setup project within Visual Studio that will allow the generated installer to allow for the user to install the application multiple times? I would imagine there would be changes needed for checking if the destination folder already has an installation there but what about removing the "already exist" detection or how to change the Add/Remove Programs to show nothing at all or each individual instance of the installation.

View 2 Replies

How To Setup For Sharing Code Across Multiple Domain Names

Mar 8, 2010

I have built a website and now the customer wants to split it between three different domains. What is the best way to do this? This is what I have so far.

c:/website1/ points to www.website1.com
c:/website1/vd1/ points to www.website2.com
c:/website1/vd2/ points to www.website3.com

The webhost I'm working with has done it the following way, but now I'm getting a bunch of errors that seems like it's not seeing the App_code folder. Do I need to make a lot of changes? How does this affect the location references?

View 2 Replies

Security :: Custom NEW User Setup Which Build To Allow System Administrators To Setup Users?

Sep 21, 2010

I'm having trouble setting up a custom NEW User Screen. Here is my situation, I have a Request for Access Screen that uses the CreateNewUser Wizard Control. I want to leave the Question and Answer for this, however I also want a custom NEW User Setup which I build myself to allow the system administrators to setup users, but for this setup I don't want the administrators to have to pick the question and answer for the NEW user, so I would like to bypass this for this setup. However, my Membership.CreateUser keeps asking for it. How can I accomplish this? I've included a copy of my current web.config file. You will notice a AspNetAdminMemberhip which I use to allow the System Administrators to reset passwords.

<?
<
<
<
<
<
<
<
<
</
</
</
</
<
<
<
<
</
<
<
<
<

xml
version="1.0"?><configuration>configSections>sectionGroup
name="system.web.extensions"
type="System.Web.Configuration.SystemWebExtensionsSectionGroup,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">sectionGroup
name="scripting"
type="System.Web.Configuration.ScriptingSectionGroup,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">section
name="scriptResourceHandler"
type="System.Web.Configuration.ScriptingScriptResourceHandlerSection,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
requirePermission="false"
allowDefinition="MachineToApplication"/>sectionGroup
name="webServices"
type="System.Web.Configuration.ScriptingWebServicesSectionGroup,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">section
name="jsonSerialization"
type="System.Web.Configuration.ScriptingJsonSerializationSection,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
requirePermission="false"
allowDefinition="Everywhere"/>section
name="profileService"
type="System.Web.Configuration.ScriptingProfileServiceSection,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
requirePermission="false"
allowDefinition="MachineToApplication"/>section
name="authenticationService"
type="System.Web.Configuration.ScriptingAuthenticationServiceSection,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
requirePermission="false"
allowDefinition="MachineToApplication"/>sectionGroup>sectionGroup>sectionGroup>configSections>connectionStrings>add
name="LBX_ChangeControlConnectionString"
connectionString="Data
Source=10.31.30.26;Initial Catalog=LBX_ChangeControl;Persist Security Info=True;User ID=sa;Password=wstinol"
providerName="System.Data.SqlClient"/>remove
name="LocalSqlServer"/>add
name="LocalSqlServer"
connectionString="Data
Source=10.31.30.26;Initial Catalog=LBX_ChangeControl;Persist Security Info=True;User ID=sa;Password=wstinol"
providerName="System.Data.SqlClient"/>connectionStrings>system.web>membership>providers>add
name="AspNetAdminMembership"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="LocalSqlServer"
applicationName="/"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
enablePasswordRetrieval="false"
maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="8"
minRequiredNonalphanumericCharacters="1"
/>
</
</
<
<
<
<
<
<
<
<
providers>membership>roleManager
enabled="true"/>authentication
mode="Forms"/>profile
enabled="true">properties>add
name="FirstName"
type="string"/>add
name="LastName"
type="string"/>add
name="Gender"
type="string"/>add
name="ProfileImageID"
type="string"/>add
name="Department"
type="string"/>add
name="PhoneNumber"
type="string"/>properties>profile>pages>controls>add
tagPrefix="asp"
namespace="System.Web.UI"
assembly="System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>controls>pages>
Set compilation debug="true" to insert debugging

symbols into the compiled page. Because this affects performance, set this value to true only during development.

<
<
<
<
<
<
</
<
<

-->compilation
debug="true">assemblies>add
assembly="System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>add
assembly="System.Design,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>add
assembly="System.Web.Extensions.Design,
Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>add
assembly="System.Windows.Forms,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><add
assembly="CrystalDecisions.CrystalReports.Engine,
Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add
assembly="CrystalDecisions.ReportSource,
Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add
assembly="CrystalDecisions.Shared,
Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add
assembly="CrystalDecisions.Web,
Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add
assembly="CrystalDecisions.ReportAppServer.ClientDoc,
Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add
assembly="CrystalDecisions.Enterprise.Framework,
Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add
assembly="CrystalDecisions.Enterprise.InfoStore,
Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></assemblies>compilation>httpHandlers>remove
verb="*"
path="*.asmx"/>add
verb="*"
path="*.asmx"
validate="false"
type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>add
verb="*"
path="*_AppService.axd"
validate="false"
type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>add
verb="GET,HEAD"
path="ScriptResource.axd"
type="System.Web.Handlers.ScriptResourceHandler,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
validate="false"/>add
verb="GET"
path="CrystalImageHandler.aspx"
type="CrystalDecisions.Web.CrystalImageHandler,
CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></httpHandlers>httpModules>add
name="ScriptModule"
type="System.Web.Handlers.ScriptModule,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>httpModules>system.web>system.webServer>validation
validateIntegratedModeConfiguration="false"/>modules>add
name="ScriptModule"
preCondition="integratedMode"
type="System.Web.Handlers.ScriptModule,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>modules>handlers>remove
name="WebServiceHandlerFactory-Integrated"/>add
name="ScriptHandlerFactory"
verb="*"
path="*.asmx"
preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>add
name="ScriptHandlerFactoryAppServices"
verb="*"
path="*_AppService.axd"
preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>add
name="ScriptResource"
preCondition="integratedMode"
verb="GET,HEAD"
path="ScriptResource.axd"
type="System.Web.Handlers.ScriptResourceHandler,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>handlers>system.webServer>location
allowOverride="true"
inheritInChildApplications="true">appSettings>add
key="CrystalImageCleaner-AutoStart"
value="true"
/>add
key="CrystalImageCleaner-Sleep"
value="60000"
/>add
key="CrystalImageCleaner-Age"
value="120000"
/>appSettings>location>system.net>mailSettings>smtp
from="Lockbox@tdbanknorth.com">network
host="ME6AWMAIL01.bkng.net"
password=""
userName=""
/>smtp>mailSettings>system.net>configuration>

View 1 Replies

SQL Server :: Data Migrations From Sql Server 2000 To 2008?

Sep 1, 2010

some good links / tutorials for migrating data from sql server 2000 to 2008 using SSIS

View 3 Replies

Web Forms :: Creating Multiple UserControls At Runtime?

Mar 1, 2011

I want to create several instances of a webcontrol on my web page each time the user clicks an 'add' button.

HTML

[Code]....

c#

[Code]....

View 7 Replies

Web Forms :: How To Add Multiple Textboxes At Runtime And Maintain Them After Postback

Oct 22, 2010

I'm trying to make a form that could have one or multiple textboxes. I have a textbox and a button to add additional textboxes.

I have no problem adding a second textbox inside a panel but I want to be able to keep adding more textboxes every time the link button is clicked and later reference those boxes to be saved. I would also like to maintain the value of the textboxes there. They are not saved to the database until all the necesary texboxes have been added.

I added the textbox using:

private void button1_Click(Object sender, System.EventArgs e)
{
TextBox textbox1 = new TextBox();
panel.controls.add(textbox1);
}

that works fine, but when i click the button again it doesn't add an additional textbox which is what i need.

View 5 Replies

Databases :: Update Multiple Row With Different Value?

Feb 7, 2011

I have to update multiple row and two column of each row.

I have try to Update with case statement but after I perform that statement it blank out every other column that doesn't fall into the criteria of the update statement.

My table structure is like this;

table1
col1
row1 11
row2 22

I want to update row1 and row2 of their col1 in one single sql , how do i do that?

View 4 Replies

Multiple (Distinct) Databases With OpenSessionInView

Aug 11, 2010

In my web application, I have 2 totally different databases - one that's being used mostly by a CMS from which we'd like to get page information on non CMS pages on the same website, & one that contains totally different data. Is it possible to use Spring.NET's Open Session In View module with multiple session factories for both of those databases, so in this case I have 2 objects defined in spring.config of type Spring.Data.NHibernate.LocalSessionFactoryObject?

View 1 Replies

Databases :: Multiple Transactions In One Method?

Nov 10, 2010

I have an application which connect to oracle db.

I have two database hitting functions.

One is adding Userdetails(Fn Name : AddUserDtls) and another one adding address details(Fn name : AddAddresDtls) based on UserName which will get added after execution of first method ie AddUserDtls.

Problem I am facing is :

I have a single transaction and in that I have all the methods.

After the execution of first method,with out commiting i will go to second method.

and if any error occurs in second method.

I will rollback everything including the changes made by first method also.

Here one issue is there.

Since I am not committing the changes made by first method,

While I am executing the second method I am getting error that 'No user Name exists'

I understood that if we commit the transaction before the second method starts ,it will solve the issue.

But then it creates another problem.If some problem araise in the second method,then I cannot rollback the changes made by first method since it aleready commited.

View 1 Replies

Databases :: Bind Multiple Parameter By Name?

Dec 15, 2010

In following code I am binding two parameter by name. Program compile successfully but output isn't coming.

cmd = new OracleCommand("select * from books where book_id=:bid and title=:rat", conn);
OracleParameter op = new OracleParameter();

View 2 Replies

Forms Data Controls :: Create Multiple Independent Gridvews In Runtime?

Dec 27, 2010

I'm trying to create multiple gridviews for a number of individuals based on a selection from a dropdownlist. The user will select his choice from the dropdownlist and from there a query is run to find the number of gridviews to create. Each gridview will also have its own data to bind. I believe I have most of it, I just can't get the gridview to show up. My thinking is to create the labels, then insert a gridview, bind it, and then repeat the process all over.

[Code]....

View 2 Replies

Databases :: Update Multiple Column Using Sub Query?

Apr 1, 2011

I want to update multiple column of a table using subquery ...My sample code is shown below

[Code]....

its throwing syntax error...I dont know where i commiting mistake.

View 1 Replies

Databases :: Multiple Select With Single Group By?

Jun 24, 2010

if we are trying to add the several columns in select statement and only one condition in group by.

how can we do that ?

Example:

[code].....

View 1 Replies

Sharing State Databases Between Multiple Apps

Apr 7, 2010

Is it better for a collection of ASP.NET web apps to share the same session database, or should each one have its own? If there is no significant difference, having a single database would be preferable due to easier maintenance. Background My team has an assortment of ASP.NET web apps, all written in either Monorail 1.1 or ASP.NET MVC 1.0. Each app currently uses a dedicated session state database. I'm working on adding a new site to that list, and am debating whether I should create another new session database, or just share an existing one with another app.

View 1 Replies

Architecture :: Web Application Connecting To Multiple Databases?

Sep 17, 2010

I am supposed to develop an enterprise-class ASP.NET Web Application that connects to multiple databases. For example when the web form loads, I should populate different ASP.NET controls (GridView, DataPager, TextBox, DropdownList etc) from multiple databases (SQL Server, Oracle, DB2, SAP Server etc) and also, edit the data in the controls and save the data to the respective databases on button submit.

Should I use Web Service or WCF for data integration, if so is there a limit on the size of the data?

What should be the architecture considering the application should be scalable and easy to maintain?

View 2 Replies

DataSource Controls :: How To Connect To Multiple Databases

Jun 8, 2010

i want to know how to connect to multiple databases in sql from our asp.net code??

View 4 Replies

Databases :: Best Way To Insert Data Into Multiple Tables?

Jan 22, 2010

I am using mysql as my database.From one of my web pages I want to insert data to 4 tables.All the data should be inserted to these different tables on a single button click from the web page.How can I achieve this?Which is most reliable way to insert data to multiple tables on a single click event?

Will the sql operation with 4 'insert' statements separated by semicolon work for me?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved