You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: functions/Select-DbaBackupInformation.ps1
+80-24Lines changed: 80 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,10 @@ function Select-DbaBackupInformation {
28
28
The Output of Get-RestoreContinuableDatabase while provides 'Database',redo_start_lsn,'FirstRecoveryForkID' values. Used to filter backups to continue a restore on a database
29
29
Sets IgnoreDiffs, and also filters databases to only those within the ContinuePoints object, or the ContinuePoints object AND DatabaseName if both specified
30
30
31
+
.PARAMETERLastRestoreType
32
+
The Output of Get-DbaRestoreHistory -last
33
+
This is used to check the last type of backup to a database to see if a differential backup can be restored
34
+
31
35
.PARAMETEREnableException
32
36
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
33
37
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
@@ -78,16 +82,16 @@ function Select-DbaBackupInformation {
78
82
[string[]]$DatabaseName,
79
83
[string[]]$ServerName,
80
84
[object]$ContinuePoints,
85
+
[object]$LastRestoreType,
81
86
[switch]$EnableException
82
87
)
83
88
begin {
84
89
$InternalHistory=@()
85
-
90
+
$IgnoreFull=$false
86
91
if ((Test-Bound-ParameterName ContinuePoints) -and$null-ne$ContinuePoints) {
87
92
Write-Message-Message "ContinuePoints provided so setting up for a continue"-Level Verbose
Copy file name to clipboardExpand all lines: internal/functions/Get-RestoreContinuableDatabase.ps1
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ function Get-RestoreContinuableDatabase {
25
25
break
26
26
}
27
27
if ($Server.VersionMajor-ge9) {
28
-
$sql="select distinct db_name(database_id) as 'Database', redo_start_lsn, redo_start_fork_guid as 'FirstRecoveryForkID' from master.sys.master_files where redo_start_lsn is not NULL"
28
+
$sql="select distinct db_name(database_id) as 'Database', differential_base_lsn, redo_start_lsn, redo_start_fork_guid as 'FirstRecoveryForkID' from master.sys.master_files where redo_start_lsn is not NULL"
0 commit comments