Skip to main content

Posts

Showing posts with the label transaction log

What is a minimal logged in SQL

1.Minimal information it writes in the log file, when databse in bulk model. 2.If transaction is minimally logged only enough information is logged in transaction log to rollback the transaction no information is logged to roll it forward. This is why you loose point in time recovery if operation is minimally logged.

Way to find differential backup for SQL Database

1.Check MSDB backup history for that database select * from msdb.dbo.backupset where name='dbname' and type='i' order by backup_finish_date desc 2.dbo.backupset: provides information concerning the most-granular details of the backup process dbo.backupmediafamily: provides metadata for the physical backup files as they relate to backup sets dbo.backupfile: this system view provides the most-granular information for the physical backup files USE AdventureWorks GO SELECT TOP 100 s.database_name, m.physical_device_name, CAST(CAST(s.backup_size / 1000000 AS INT) AS VARCHAR(14)) + ' ' + 'MB' AS bkSize, CAST(DATEDIFF(second, s.backup_start_date, s.backup_finish_date) AS VARCHAR(4)) + ' ' + 'Seconds' TimeTaken, s.backup_start_date, CAST(s.first_lsn AS VARCHAR(50)) AS first_lsn, CAST(s.last_lsn AS VARCHAR(50)) AS last_lsn, CASE s.[type] WHEN 'D' THEN 'Full' WHEN 'I' THEN 'Differential' WHEN &