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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Auto switch to MS Access if SQL Server goes down

Auto switch to MS Access if SQL Server goes down

Scheduled Pinned Locked Moved ASP.NET
databasecsharpasp-netsql-servercom
6 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
    stevenutt
    wrote on last edited by
    #1

    I run a web application that relies on the database being up. Under normal conditions my ASP.net app connects to my SQL Server database, however, my web host occasionally takes the database server down for maintenance leaving my main app without a database. I have created a duplicate MS Access database so that it can run things temporarily if the SQL Server is down. Does anyone else do this, or something sililar in order to achieve "poor man's database redundancy" ? If so - at what stage do you check for availability of the SQL Server ?

    http://www.youralarm.com - written in ASP.net & SQL Server

    N G 2 Replies Last reply
    0
    • S stevenutt

      I run a web application that relies on the database being up. Under normal conditions my ASP.net app connects to my SQL Server database, however, my web host occasionally takes the database server down for maintenance leaving my main app without a database. I have created a duplicate MS Access database so that it can run things temporarily if the SQL Server is down. Does anyone else do this, or something sililar in order to achieve "poor man's database redundancy" ? If so - at what stage do you check for availability of the SQL Server ?

      http://www.youralarm.com - written in ASP.net & SQL Server

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      stevenutt wrote:

      my web host occasionally takes the database server down for maintenance leaving my main app without a database.

      It's time to look for a better provider. :)

      stevenutt wrote:

      Does anyone else do this, or something sililar in order to achieve "poor man's database redundancy" ?

      I have never done this as my hosting provider is good. All I can suggest is, try to connect to SQL server, if it throws error, catch it and try with the access DB. BTW, a better solution is to find a provider who can provide more server up time.

      Navaneeth How to use google | Ask smart questions

      S 1 Reply Last reply
      0
      • N N a v a n e e t h

        stevenutt wrote:

        my web host occasionally takes the database server down for maintenance leaving my main app without a database.

        It's time to look for a better provider. :)

        stevenutt wrote:

        Does anyone else do this, or something sililar in order to achieve "poor man's database redundancy" ?

        I have never done this as my hosting provider is good. All I can suggest is, try to connect to SQL server, if it throws error, catch it and try with the access DB. BTW, a better solution is to find a provider who can provide more server up time.

        Navaneeth How to use google | Ask smart questions

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

        This has nothing to do with the web provider. I have been with the provider for years and the database has never failed in all that time. Is it not reasonable to expect that they do service pack upgrades on the database as they become available ? No provider can gaurantee 100% uptime, but unfortunately in the business that I'm in - I have to. So, even though I have never had a database crash, that doesn't mean that there won't be one tomorrow. As my MS Access database is stored on the web server and not the database server, it seems like a good way to keep things going in case the database server is unavailable.

        http://www.youralarm.com - written in ASP.net & SQL Server

        G 1 Reply Last reply
        0
        • S stevenutt

          This has nothing to do with the web provider. I have been with the provider for years and the database has never failed in all that time. Is it not reasonable to expect that they do service pack upgrades on the database as they become available ? No provider can gaurantee 100% uptime, but unfortunately in the business that I'm in - I have to. So, even though I have never had a database crash, that doesn't mean that there won't be one tomorrow. As my MS Access database is stored on the web server and not the database server, it seems like a good way to keep things going in case the database server is unavailable.

          http://www.youralarm.com - written in ASP.net & SQL Server

          G Offline
          G Offline
          goodideadave
          wrote on last edited by
          #4

          If your SQL Server database goes down, and you start writing to the Access database, then do you have to copy the transactions to the SS database when it comes back up? What about reading from the Access database when SS is down? What are you storing in the SS database?

          My other signature is witty and insightful.

          S 1 Reply Last reply
          0
          • G goodideadave

            If your SQL Server database goes down, and you start writing to the Access database, then do you have to copy the transactions to the SS database when it comes back up? What about reading from the Access database when SS is down? What are you storing in the SS database?

            My other signature is witty and insightful.

            S Offline
            S Offline
            stevenutt
            wrote on last edited by
            #5

            Yes, there are a small number of tables that would have new rows written into them but it is acceptable and we can do a manual transfer of the data some time after the recovery.

            http://www.youralarm.com - written in ASP.net & SQL Server

            1 Reply Last reply
            0
            • S stevenutt

              I run a web application that relies on the database being up. Under normal conditions my ASP.net app connects to my SQL Server database, however, my web host occasionally takes the database server down for maintenance leaving my main app without a database. I have created a duplicate MS Access database so that it can run things temporarily if the SQL Server is down. Does anyone else do this, or something sililar in order to achieve "poor man's database redundancy" ? If so - at what stage do you check for availability of the SQL Server ?

              http://www.youralarm.com - written in ASP.net & SQL Server

              G Offline
              G Offline
              goodideadave
              wrote on last edited by
              #6

              Have you considered working with your hosting provider to mirror your database on a different server? Assuming the hosting provider gives you advance notification of downtime, you can manually switch over to the mirror, then switch back when the primary comes back up. But if you really want to implement Access as a fallback, I would put the Access code in classes that you could insert when a SQLException is thrown. If you can't connect, go to plan B.

              My other signature is witty and insightful.

              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