Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2003
    Posts
    223

    Unanswered: Setup automatic recover

    Hello, everyone:

    How to setup a user database to be automatic recover? Is it the same way as the automatic recover of MASTER database from registry key?

    Thanks a lot.

    ZYT

  2. #2
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    What are you referring to as "automatic recover?"
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  3. #3
    Join Date
    Mar 2003
    Posts
    223
    I mean that the recovery is executed as SQL Server start. Thanks.

    ZYT

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    All databases (except for tempdb, for obvious reasons) go through recovery every time SQL Server starts.

    -PatP

  5. #5
    Join Date
    Mar 2003
    Posts
    223
    Hello Pat:

    Thanks for reply. I need recovery from backup device such as tape or harddrive. Do you mean all database can recover from backup everytime SQL Server starts? By the way, some books descrips that the database recover the transactions that occure since last checkpoint as SQL Server starts. Could you explain that please? Does it mean the database just recover transaction file automatically?

    ZYT

  6. #6
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    So what you really want is for the database(s) to be restored from a backup every time the server starts, throwing away any changes made since the last backup? That definitely is NOT what happens with master, it is much more like what happens with tempdb being recreated from model.

    You could create the behavior that I think you want using Automatic Execution of Stored Procedures to force a RESTORE at SQL Server startup.

    The term "recovery" is used with SQL Server to describe the process of bringing the database back to a consistent transactional state by examining the log file in detail to commit all of the transactions that had been commited at the time the database was shut down, and to rollback all of the other (still open) transactions.

    -PatP

  7. #7
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    If you want to recover automatically from a backup automatically upon restart, you would need to set a job that runs a restart that restores the database from backup.

    You will also need to look for a new job yourself after your system reboots halfway through the day, restores the previous night's backup, and your company loses four or five hours of work.

    Why are you doing this?
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  8. #8
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Quote Originally Posted by blindman
    Why are you doing this?
    My first guess is a training server, where they want the box to come up "fresh as a daisy" each time it reboots. You are correct in that this is quite dangerous, and would be better accomplished by just creating an icon on the server or the instructor's machine to accomplish the same goal under human control.

    -PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •