Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore-DbaDatabase - Add WITH RESTART #9296

Open
mattcargile opened this issue Mar 27, 2024 · 0 comments
Open

Restore-DbaDatabase - Add WITH RESTART #9296

mattcargile opened this issue Mar 27, 2024 · 0 comments
Labels
feature new command Feature request that would need a new command triage required New issue that has not been reviewed by maintainers

Comments

@mattcargile
Copy link
Contributor

mattcargile commented Mar 27, 2024

Summarize Command's Functionality

Implement the restart restoration of log or the like in the event of a reboot or another failure. The T-Sql would look like

RESTORE LOG [db_laghsm] FROM  DISK = N'F:\LogInterrupted.trn' WITH  FILE = 1,  NORECOVERY,  NOUNLOAD,  STATS = 10, RESTART;

Is there a command that is similiar or close to what you are looking for?

No

Technical Details

Maybe one could check for this error upon restoration of a log?

Microsoft.Data.SqlClient.SqlError: A previous restore operation was interrupted and did not complete processing on file 'db_log'. Either restore the backup set that was interrupted or
restart the restore sequence.
At C:\Program Files\WindowsPowerShell\Modules\dbatools\1.1.125\allcommands.ps1:148291 char:9
+         throw $records[0]
+         ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (RemoteServer:String) [], Exception
    + FullyQualifiedErrorId : dbatools_Restore-DbaDatabase

Or maybe there is something in msdb?

@mattcargile mattcargile added feature new command Feature request that would need a new command triage required New issue that has not been reviewed by maintainers labels Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature new command Feature request that would need a new command triage required New issue that has not been reviewed by maintainers
Projects
None yet
Development

No branches or pull requests

1 participant