Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

One of the databases appeared invalid

  • 03-03-2018 04:47PM
    #1
    Registered Users, Registered Users 2 Posts: 1


    I work on SQL Server 2008 R2. It is quite old version, but it's very reliable. I manage numerous of databases every day, it's my job. One of them gave me a lot of trouble some days ago. I only opened it and SQL viewed SQL Server Page Level Corruption. I checked it once more the same error remained. I hope, here there are users who knows how to overcome this...


Comments

  • Registered Users, Registered Users 2 Posts: 2,781 ✭✭✭amen


    You are have two options here.

    1: DBCC but me careful as you may loose data
    2: Restore from you backups and roll forward your transaction logs but depending on your log backup frequency you may loose data.

    If you are not sure what you are doing and data is business critical I would suggest contacting your organisations DBA team.


  • Registered Users, Registered Users 2 Posts: 1,424 ✭✭✭nullObjects


    I'd echo the above.

    There should also be a log file you can check to see what caused the error.
    It might be worth checking it now before it's gone in case it's set to roll over or be removed every couple of days.


  • Registered Users, Registered Users 2 Posts: 6 Sheldgallagh


    There are three different ways to recover the database.
    1) Recover the database manually with following command.
    RESTORE DATABASE database_name WITH RECOVERY
    2) Recover the database with the last log file.
    RESTORE LOG database_name FROM backup_device WITH RECOVERY
    3) Recover the database when bak is restored
    RESTORE DATABASE database_name FROM backup_device WITH RECOVERY
    One more variant might be using knowledge bases on this question from Microsoft and other useful resources
    https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/restore-and-recovery-overview-sql-server
    https://www.mssqltips.com/sqlservertutorial/2/sql-server-recovery-models/
    https://sql.recoverytoolbox.com/


Advertisement