Times of running queries

 select a.session_id, a.command, a.percent_complete, st.text,

            CAST(((DATEDIFF(s,start_time,GetDate()))/3600) as varchar) + ' hour(s), '

                  + CAST((DATEDIFF(s,start_time,GetDate())%3600)/60 as varchar) + 'min, '

                  + CAST((DATEDIFF(s,start_time,GetDate())%60) as varchar) + ' sec' as running_time,

            CAST((estimated_completion_time/3600000) as varchar) + ' hour(s), '

                  + CAST((estimated_completion_time %3600000)/60000 as varchar) + 'min, '

                  + CAST((estimated_completion_time %60000)/1000 as varchar) + ' sec' as est_time_to_go,

            dateadd(second,estimated_completion_time/1000, getdate()) as est_completion_time

from sys.dm_exec_requests a

CROSS APPLY sys.dm_exec_sql_text(a.sql_handle) AS st

where a.session_id > 50

and a.session_id <> @@SPID

order by st.text

All of the Full and Trans log backup start and end times. Lots of data


       bs.database_name AS DatabaseName

       ,CASE bs.type

              WHEN 'D' THEN 'Full'

              WHEN 'I' THEN 'Differential'

              WHEN 'L' THEN 'Transaction Log'

       END AS BackupType



              AS VARCHAR(4)) + ' ' + 'Seconds' AS TotalTimeTaken

       ,bs.backup_start_date AS BackupStartDate

       ,CAST(bs.first_lsn AS VARCHAR(50)) AS FirstLSN

       ,CAST(bs.last_lsn AS VARCHAR(50)) AS LastLSN

       ,bmf.physical_device_name AS PhysicalDeviceName

       ,CAST(CAST(bs.backup_size / 1000000 AS INT) AS VARCHAR(14))

              + ' ' + 'MB' AS BackupSize

       ,bs.server_name AS ServerName

       ,bs.recovery_model AS RecoveryModel

FROM msdb.dbo.backupset AS bs

INNER JOIN msdb.dbo.backupmediafamily AS bmf

       ON bs.media_set_id = bmf.media_set_id

--WHERE bs.database_name = 'APF_OLTP'


       DatabaseName,backup_start_date DESC


CDC enabled or disabled

SELECT name, database_id, is_cdc_enabled FROM sys.databases

WHERE is_cdc_enabled = 1

--remove the cdc

EXEC sys.sp_cdc_disable_db