Database lost after server unexpected shut down

  • hans.pret (4/2/2014)


    I reviewed the sql logs again and saw that a checkpoint is created in the master database every time the server is restarted.

    A checkpoint is run. Not created. It's not an object. Checkpoint is a process which flushes all modified data pages to disk. That's it. It's ensuring that modifications are on disk

    If the server shuts down again and restarts SQL Express restores itself to that checkpoint and a new checkpoint is created in the master database.

    No, because a checkpoint is not a restore point.

    Checkpoints run on a regular basis, every minute or so, in all databases. They're a normal background task

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • You said earlier that you use a third party backup solution and sync with Google Drive to store them. Whatever you end up doing, whatever provider you switch to for your SQL Servers, there is one thing you should do. Please, please, please test recovering from backup. I've heard it said that people don't need a backup strategy, they need a recovery strategy. It sounds stupid, but it correctly shifts the focus from "having to run backups to comply with policy" to "be able to get the data back when needed" which is the entire intent behind taking backups in the first place.

    As for the server being restored and the "I don't know" syndrome, I think you know what you have to do.

  • I found the problem.

    If this is it I feel like an idiot. I'm no dba so this is still a learning curve for me.

    When I setup the cloud server and installed SQL Express I, for some reason, created two instances. The one I called SQLExpress and the other SQLServer. I couldn't remember why I did this.

    Every time the server is restarted, it looks like only one of these instances can start, so the one that started first, was the one running. The other one did not start at all.

    When I accessed SQL Express through SSMS, I only used the IP of the server to access SQL. Both of these instances were set to automatic.

    The first time it happened I thought all my databases were gone, so I restored them from our backups. But Actually the other instance started first and was running and of course there were no databases attached to it.

    Every time the server restarted a different instance started first and it looks like the system was restored to a point in time.

    Man, I feel like an idiot. I apologize to all for my stupidity :blush:. The only bright point is that I learned a lot from this experience.

    Thanks for your help

    Hannes

  • hans.pret (4/2/2014)


    I found the problem.

    If this is it I feel like an idiot. I'm no dba so this is still a learning curve for me.

    When I setup the cloud server and installed SQL Express I, for some reason, created two instances. The one I called SQLExpress and the other SQLServer. I couldn't remember why I did this.

    Every time the server is restarted, it looks like only one of these instances can start, so the one that started first, was the one running. The other one did not start at all.

    When I accessed SQL Express through SSMS, I only used the IP of the server to access SQL. Both of these instances were set to automatic.

    The first time it happened I thought all my databases were gone, so I restored them from our backups. But Actually the other instance started first and was running and of course there were no databases attached to it.

    Every time the server restarted a different instance started first and it looks like the system was restored to a point in time.

    Man, I feel like an idiot. I apologize to all for my stupidity :blush:. The only bright point is that I learned a lot from this experience.

    Thanks for your help

    Hannes

    Woowww :w00t: ..... glad you find something 😀

  • That's an interesting solution.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 5 posts - 16 through 20 (of 20 total)

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