Availability of SQL server when backup runs

  • I need help how to prove that SQL server can do backups when it is fully accessible for the users. I know this is true, because I’m a DBA for the last 7 years, but the people in my previous company do not know that and they are terrified that SQL server will not accessible for e very long time daily.

    Current situation:

    I left my job 3 months ago. The new DBA insists that for doing full nightly backup he needs to put SQL server in a single user mode, all the connections have to be closed, other way he gets errors. In this situation the SQL server is inaccessible between 10 pm and 5am every day – Oh, my God, so pity for the banks’ clients…

    The problem, I guess, is that he mixes DB maintenance plans procedures with the backup procedures, which do not need to be done every day for all databases at once.

    The previous backup plan was as follow:

    Every night full backup on all databases as they are very small – most between 300KB and 1G, transaction log backups every 20 min in the activity time between 5 am and 8 pm. 3 times/nights a week – backup master DB as there were often structural changes. Weekly maintenance and optimization plan for both users and system DBs on Sunday early in the morning. Additional checking for fragmentation, index corruption, etc. as needed. All databases were accessible 24/7, I never had a problem, several big restorations from a backup have been done, recovering data within minutes with almost no data lost. Most of the DBs are set up to allow filegroup/datafile backups, but the size right now do not require that.

    My current backup plans differs a lot from this simple scenario as some of my Dbs are huge – over 500 GB.

    I feel uncomfortable to make this posting and to waist everybody’s time for something so simple and well documented, but as I’m not there any longer, my colleagues - developers really need your help to have their databases available again.

    Any opinion, article, advise will be greatly appreciated. If you could share your experience with them to let them know how the maintenance and backups are done in some other places, that’ll be a great help.

    Thanks a lot,

    MJ

  • Just perform a simple test.  Create an application that fires off a set of transactions 30 seconds after the backup starts.  You can even create several jobs that fire off at different times that will perform several inserts onto a table.  After the backup completes, verify that the backup succeeded and that the inserts did propegate into the table.  You could even then prove that the transactions were logged by restoring the full backup followed by the tlog backup.  I've had several questions posed to me along these same lines and users that are stuck in their ways find it hard to believe that a database is fully functional during a backup, but I've always been able to convince them.  The easiest way is to prove by example and physically show them results.  Maybe even run a profiler trace on the database while a backup is going on and prove that you can open up new connections.

     

    Let me know what you think.

  • From Books Online (Backup/Restore Architecture)

  • Backups that can be performed while the database is in use, allowing backups to be made of systems that must run continuously.

    The backup processing and internal data structures of SQL Server 2000 are structured so that backups maximize their rate of data transfer with minimal effect on transaction throughput.

    Steve

  • I have a database which is 170+GB in size. I do a Full backup once a day, a Differential once a day and several Transaction Log backups during the day.

    Have I EVER put the database into SINGLE USER mode for these backups? NO WAY. I can't do that, my database must be up 24/7 including holidays. If I ever have to stop the database (for upgrades, etc.), I have to give advance notice and there's no way I would be able to shut it down just for backups.

    My backups of a 170+ GB database do not affect my users at all. They never notice it. I have BULK INSERTS happening every 3 minutes. They are not affected by the backups. I have my users querying the data 24/7 and they aren't affected by the backups.

    If backups are affecting your users, it's due to one of two things (that I can think of).

    1. It's not really the backups, it's something else running during that time (Reindexing, defragging of the indexes....)

    2. SQL Server backups aren't being done. If you use some other backup system (like an OS backup) it will have problems because the files are in use.

    -SQLBill

  • Sounds like the DBA instituted a maintenance plan and is doing other things than just the backup, as previously offered by SQLBill If this is the case, that DBA has probably selected the auto-repair option. Unselecting that means the database doesn't have to go into single-user mode. It's a well-documented issue.

    K. Brian Kelley
    @kbriankelley

  • Viewing 5 posts - 1 through 4 (of 4 total)

    You must be logged in to reply to this topic. Login to reply