Maintenance Plan Synchronisation 'troubles'.

  • The following actions have to be performed.

    A command which tells a application that it should hold all actions. (step 1)

    Backup of a number of databases. (step 2)

    A command which tell the application that the databases can be used again. (step 3)

    The commands (step 1 3) are both commandline commands.

    Method 1

    I tried, using the wizard building a backup maintenance plan and adding the two commands as a first and last step in the job made by the maintenance plan.

    Problem: If the maintenance plan is changed the Step 1 and step 3 disappear.

    Method 2.

    Make extra jobs for the steps 1 and 3. (pre_bu_script and post_bu_script)

    Build a maintenance plan which executes (in sequence) step 1, the backup, step3.

    Problem: The backup starts before step 1 finishes.

    I would think that the backup can only procede after succesfull finish of step 1. But it starts after 'succesful' start of step1.

    Am I missing something obvious ?

    For me this does not look logical at all.

    Ben

  • Backing up a SQL Server database is an online operation so you don't have to suspend operations on the database in order to get a backup of a consistent state. So I wouldn't bother with steps and 1 and 3 as I don't find them necessary.

    If, for some business reason which I can't think of, you have to stop all application use of the database before doing a backup, I would set the database into single user mode and then set it back to multiuser when the backup is complete.

  • Jack Corbett (7/14/2015)


    Backing up a SQL Server database is an online operation so you don't have to suspend operations on the database in order to get a backup of a consistent state. ....

    Yes for a single database this is true, not for a system of running software and multiple databases.

    The application requires several databases and probable the application itself to be in a synchronised state when restoring. The simplest way to achieve this is to signal the application to stop al processing. This requires a synchronus action and this is were steps 1 and 3 are used for.

    Ben

  • A similar question has been answered before see :

    http://www.sqlservercentral.com/Forums/Topic508540-1291-1.aspx

Viewing 4 posts - 1 through 3 (of 3 total)

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