how to match full vs differentials backup using t-sql query?
how to match full vs differentials backup using t-sql query?
Sorry, but for it's not clear what you mean; may can you rephrase your question and explain it more detailed, please?
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
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
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
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.
I suggest you look at these queries.
https://www.mssqltips.com/sqlservertip/6042/sql-server-backup-and-restore-history-queries/
10 people are following this question.
Year and Month aggregation in same Pivot table in SQL Server
SQL Server Query for Searching by word in a string with word breakers
How to show first row group by part id and compliance type based on priorities of Document type?
Query to list all the databases that have a specific user
T-sql query to find the biggest table in a database with a clustered index