Hi...I wanted my application to work with two databases stored in different location. How to make it work? And what all changes need to be made in the Code? I m using ASP.NET 1.1
If by two databases you are working with two seperate database that contain unique data and structure then...
You need to add your second database connection string to your config. You will need to change your data access layer to reference the appropriate connection string depending on the database that is required.
If you mean two databases acting as replicas then...
Set up mirroring between the two databases and add 'Failover Partner=<secondserver>' to your connection string
If it helps, mark as answer - your approval helps with my recovery ;)
Marked as answer by Dino He - MSFT on May 29, 2012 03:28 AM
santoshhatti
0 Points
4 Posts
Working with two databases for single application
May 21, 2012 12:10 PM|LINK
Hi...I wanted my application to work with two databases stored in different location. How to make it work? And what all changes need to be made in the Code? I m using ASP.NET 1.1
kidshaw
Participant
1158 Points
252 Posts
Re: Working with two databases for single application
May 21, 2012 12:16 PM|LINK
If by two databases you are working with two seperate database that contain unique data and structure then...
You need to add your second database connection string to your config. You will need to change your data access layer to reference the appropriate connection string depending on the database that is required.
If you mean two databases acting as replicas then...
Set up mirroring between the two databases and add 'Failover Partner=<secondserver>' to your connection string
Mudasir.Khan
All-Star
15346 Points
3142 Posts
Re: Working with two databases for single application
May 21, 2012 12:24 PM|LINK
may we know whats is problem your are facing is it different sources meaning Sql Server and Oracle ?
then using Microsoft Enterprise Library for Data Access will help
Dino He - MS...
Star
8068 Points
1023 Posts
Microsoft
Re: Working with two databases for single application
May 23, 2012 08:13 AM|LINK
HI
Please provide us more details.
As kidshaw said, different situation have different solution.
So please tell use what are your trying to do.
Thanks
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework