20 votes
Accepted

Availability Group database stuck in Not Synchronizing / Recovery Pending mode

Since the server had been offline for a while we thought it may have gone outside the recovery window of the primary. We decided to try applying the latest transaction logs on the database to see if ...
Greg Bray's user avatar
  • 1,003
16 votes

Online page restore hitting 1000 limit

The standard procedure would be to: Obtain the page IDs that have to be restored. Start a page restore with a full database. Apply the most recent differential backup. Apply subsequent log backups. ...
John K. N.'s user avatar
  • 17.4k
14 votes

Restore database to point in time from full backup only

No, you need to have taken transaction logs that cover the time frame you want to use with STOPAT. You can't do this from a full database backup only - that is just a one-time copy, and that is why we ...
Aaron Bertrand's user avatar
11 votes

SQL database stuck in recovery

The error you're seeing in the SQL Server Error Log is this one: Recovery of database 'CrashTestDummy' (9) is 0% complete (approximately 42 seconds remain). Phase 2 of 3. This is an informational ...
AMtwo's user avatar
  • 16.1k
10 votes
Accepted

Is it possible to restore SQL Server DB from transaction log (no MDF)?

Is it possible to restore the database to the last transaction (which should be just after the database was created) using just the transaction log, or is this something that can't be done? No, ...
Kin Shah's user avatar
  • 62.1k
10 votes
Accepted

Decrypt T-SQL log backup header and read LSN

Could anyone confirm or denies that restoring the header only wouldn't affect the sys.fn_dblog or anything else? RESTORE HEADERONLY doesn't target any database in its syntax: RESTORE HEADERONLY ...
David Browne - Microsoft's user avatar
9 votes
Accepted

Can I recover a SQL database from Standby/Read-Only without a standby file?

Turns out it can be done if you use CONTINUE_AFTER_ERROR RESTORE DATABASE foo WITH RECOVERY, CONTINUE_AFTER_ERROR I did still get a warning when I tried it but then did a CHECKDB and received no ...
Kenneth Fisher's user avatar
9 votes
Accepted

Is there a way to reduce the amount of time spent on a point in time recovery?

Yes, you would have to restore the full backup, at maximum one diff backup, and all necessary log backups to perform a point-in-time recovery in SQL Server. In SQL Server, you cannot roll back already ...
AMtwo's user avatar
  • 16.1k
8 votes
Accepted

How to recover MariaDB Galera Cluster after full crash?

Pre-Recovery Settings: Ensure that the MYSQL_HOME path is being exported in the .profile. If the MySQL install is in a different location, then make that change to the MYSQL_HOME.(Example: MYSQL_HOME=...
Siero Sierikas's user avatar
8 votes
Accepted

What is an orphan incarnation?

Following is a short graphic which I will be using to explain when orphans are created in the incarnations of a database. It is a variation of the graphic I used to explain incarnations in my answer ...
John K. N.'s user avatar
  • 17.4k
7 votes
Accepted

Why does database recovery take so long?

I had a large transaction fail due to the transaction log filling up yesterday, it couldn't be rolled back and SQL Server has restarted the specific DB to perform recovery. This is not totally ...
Shanky's user avatar
  • 18.9k
7 votes

What is an orphan incarnation?

RC_DATABASE_INCARNATION ORPHAN if this is a noncurrent incarnation that is not a direct ancestor of the current incarnation. Steps to reproduce: SQL> select incarnation#, status from v$...
Balazs Papp's user avatar
  • 40.4k
7 votes
Accepted

How crash recovery process works in SQL Server?

The Comparison of RECOVERY and NORECOVERY section of the RESTORE Statements doc should help you with that question: Rollback is controlled by the RESTORE statement through the [ RECOVERY | NORECOVERY ...
Ronaldo's user avatar
  • 5,069
7 votes
Accepted

How do I recover data from the postgres data directory on my hard drive?

If you need a method to restore the database but do not have an Intel/AMD-based system available, then a virtual machine on Amazon, DigitalOcean, or elsewhere may give you what you need. If you’ve ...
matigo's user avatar
  • 2,018
6 votes

What is the difference between NORECOVERY and RECOVERY when restoring database?

There is more to it. A database restore issued with NORECOVERY is left in a pending state and cannot be accessed. Logs and differentials can be added to the database while it is in this state since ...
Aaron Rheams's user avatar
6 votes
Accepted

Reattaching MDF files recovered from RAID 5

Is there any way at all to restore these files? No. The long answer is like this: you first will have to fix the MDFs. Attempt to attach it with ATTACH_REBUILD_LOG as you encounter errors (like ...
Remus Rusanu's user avatar
  • 51.7k
6 votes

Automated regular tests of your backups

Provided that you have alerts set up on the jobs, Log Shipping is a feature that is available on all editions, doesn't require a whole lot of effort to set up, and I believe fulfills all of your ...
Aaron Bertrand's user avatar
6 votes

Is there a way to reduce the amount of time spent on a point in time recovery?

You could look into using the SQL Server snapshot feature depending on your use case. I use the feature prior to running production deployments and in non-Prod environments when I want to reset a DB ...
MattyZDBA's user avatar
  • 1,933
5 votes

MySQL Crashed - InnoDB

As per your log it shows you have corruption in the InnoDB tablespace. InnoDB: corruption in the InnoDB tablespace. Please refer to InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-...
Md Haidar Ali Khan's user avatar
5 votes

Recover database from uninstalled SQL Server

The database files are probably still there - in the directory for data and log files. Th default one is c:\ProgramFiles\MSSQL\MSSQL\MSSQL10_50\MSSQL\Data. If not default then you need to locate your ...
George K's user avatar
  • 2,319
5 votes

Using Ola Hallengren's full backup but database option is for simple?

A full backup can be taken from a database in any recovery model (full, simple, or bulk-logged). It is an unfortunate conflict in terms that is somewhat overloaded. You could consider this type of ...
Aaron Bertrand's user avatar
5 votes
Accepted

Is there a problem creating only differential backups every hour?

Storage is not why you take log backups. You take log backups when the database is in full recovery model, and you need point-in-time recovery between full or incremental backups. If your business ...
Hannah Vernon's user avatar
  • 69.7k
5 votes
Accepted

Strategy on Standby restore option for hourly log shipping file

Do I restore each transactional log file as "standby" all the time and just leave them as "standby" mode? Either will work, but it is faster to apply all the logs except the last ...
user229856's user avatar
5 votes

Starting SQL server Database in forced recovery mode

Not possible. Recovery mode means that redo was performed but not undo i.e., you need a prior restore operation. A snapshot backup can be used as a base for restoring log backups (Veeam does it) but I ...
Tibor Karaszi's user avatar
5 votes

Should databases be dumped to SQL format or custom archive?

Ask yourself the same question that you ask whenever you need to store any Data: How are you going to use this Data Backup? If you need to get "into" the file and manipulate it (as a ...
Phill  W.'s user avatar
  • 8,269
4 votes
Accepted

Why does ORACLE cache recovery create uncommited blocks during instance recovery?

How can a redo log file generate uncommitted data since all its information are recorded after COMMIT ? LGWR process flushes redo logs from redo log buffer cache to online redo log files when- A ...
atokpas's user avatar
  • 8,604
4 votes
Accepted

Howto recover SQL 2016 cluster instance with bad tempdb path setting?

Pinal Dave wrote up a nice article on how to fix this. Have you tried this? How to Start SQL Server Service Without tempdb? NET START MSSQLSERVER /f Connect to SQL via SQLCMD Run ALTER ...
Chris Lumnah's user avatar
4 votes

Very slow SQL Server database recovery

Here's what we found: Even though the SQL LOG claimed an ETA of 24 hours, the DB recovered in 12 hours. So the numbers were grossly over-estimated. Even though SQL LOG was showing percentage ...
RaviLobo's user avatar
  • 195
4 votes
Accepted

Transaction recovery and rollback

Assuming that R means Read and W means Write, then the work you're proposing is like this: W1(x) C That's it. Reads are irrelevant for recovery. And a crash denotes the end, you can't have a write ...
Remus Rusanu's user avatar
  • 51.7k
4 votes
Accepted

Does the recovery model affect growth of the .mdf file?

the simple recovery model only affects the log files of your database (.ldf). If your datafiles are growing, you can check the tables that are occupying more space, you can use the management studio: ...
Eduardo Pivaral's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible