question

MRVSFLY-3256 avatar image
0 Votes"
MRVSFLY-3256 asked AmeliaGu-msft commented

how to match full vs differentials backup using t-sql query?

how to match full vs differentials backup using t-sql query?

sql-server-generalsql-server-transact-sql
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Sorry, but for it's not clear what you mean; may can you rephrase your question and explain it more detailed, please?

0 Votes 0 ·

Please note, i have taken few FULL backups and followed by DIFFERENTIAL backups.

Want to match with which FULL Vs DIFFERENTIAL backups.

Which FULL backup i need to RESTORE followed by which DIFFERENTIAL backup

0 Votes 0 ·

Please note, i have taken few FULL backups and followed by DIFFERENTIAL backups.

Want to match with which FULL Vs DIFFERENTIAL backups.

Which FULL backup i need to RESTORE followed by which DIFFERENTIAL backup

0 Votes 0 ·

Hi MRVSFLY-3256,

How are things going on? Did the answers help you?
Please feel free to let us know if you have any other question.
If you find any post in the thread is helpful, you could kindly accept it as answer.

Best Regards,
Amelia

0 Votes 0 ·
MRVSFLY-3256 avatar image
0 Votes"
MRVSFLY-3256 answered

@oalhelper-2800

Any update ?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MRVSFLY-3256 avatar image
0 Votes"
MRVSFLY-3256 answered

@OlafHelper-2800
Can help to share the T-SQL?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

TomPhillips-1744 avatar image
0 Votes"
TomPhillips-1744 answered
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AmeliaGu-msft avatar image
0 Votes"
AmeliaGu-msft answered

Hi MRVSFLY-3256,
We can also use the following query to view the backup date and file name:

 SELECT 
 CONVERT(CHAR(100), SERVERPROPERTY('Servername')) AS Server, 
 msdb.dbo.backupset.database_name, 
 msdb.dbo.backupset.backup_start_date, 
 msdb.dbo.backupset.backup_finish_date, 
 CASE msdb..backupset.type 
 WHEN 'D' THEN 'Database' 
 WHEN 'L' THEN 'Log' 
 When 'I' THEN 'Differential database'
 END AS backup_type, 
 msdb.dbo.backupset.backup_size, 
 msdb.dbo.backupmediafamily.physical_device_name, 
 msdb.dbo.backupset.name AS backupset_name
 FROM msdb.dbo.backupmediafamily 
 INNER JOIN msdb.dbo.backupset ON msdb.dbo.backupmediafamily.media_set_id = msdb.dbo.backupset.media_set_id 
 WHERE (CONVERT(datetime, msdb.dbo.backupset.backup_start_date, 102) >= GETDATE()-1 ) 
 ORDER BY 
 msdb.dbo.backupset.backup_finish_date desc

Please restore the backup files in sequence, and all the restore operations need to be done with NORECOVERY option but the last backup should be restored with RECOVERY option.
Please refer to this article and this doc which might help.

Best Regards,
Amelia


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.