Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. SQL Server Load Balancing with ASP.Net

SQL Server Load Balancing with ASP.Net

Scheduled Pinned Locked Moved C#
csharpasp-netdatabasesql-serversysadmin
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    satsumatable
    wrote on last edited by
    #1

    Hi I'm running couple of SQL Server instances in two different instances, Instance A is the master which replicates the data to Instance B. Im running Transaction Based replication, which working well. Now I want to route the WRITE (Insert, Update, Delete) calls from my ASP.Net application to Instance A and READ (Select) calls to Instance B? Is there any load balancing mechanism available to do this? Thanks

    M S 2 Replies Last reply
    0
    • S satsumatable

      Hi I'm running couple of SQL Server instances in two different instances, Instance A is the master which replicates the data to Instance B. Im running Transaction Based replication, which working well. Now I want to route the WRITE (Insert, Update, Delete) calls from my ASP.Net application to Instance A and READ (Select) calls to Instance B? Is there any load balancing mechanism available to do this? Thanks

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      C# forum is probably not the correct place for this, I doubt if the database forum will be any better but I would try there. You may be better served by using a dedicated database site - SQLServerCentral.com comes to mind. This really is a DBA type question (rather than a developer question).

      Never underestimate the power of human stupidity RAH

      1 Reply Last reply
      0
      • S satsumatable

        Hi I'm running couple of SQL Server instances in two different instances, Instance A is the master which replicates the data to Instance B. Im running Transaction Based replication, which working well. Now I want to route the WRITE (Insert, Update, Delete) calls from my ASP.Net application to Instance A and READ (Select) calls to Instance B? Is there any load balancing mechanism available to do this? Thanks

        S Offline
        S Offline
        SimulationofSai
        wrote on last edited by
        #3

        satsumatable wrote:

        Now I want to route the WRITE (Insert, Update, Delete) calls from my ASP.Net application to Instance A and READ (Select) calls to Instance B?

        Have you tried anything? The databases only have replication running between them right? So that means that the two databases are distinct entities that can be connected to using separate connection strings. If your application has a dedicated DAL, all the change you need to make is have two separate methods that open a connection, something like OpenConnectionForWrite() OpenConnectionForRead() and your code can call the appropriate method depending on whether it's reading or writing.

        SG Aham Brahmasmi!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups