Posts

Showing posts from 2018

SQL Jobs Report

Hilighter On The Page SQL Jobs Report Code Below. SELECT DISTINCT [sJOB].[name] AS [JobName] , [sDBP].[name] AS [JobOwner] , CASE [sJOB].[enabled] WHEN 1 THEN 'Yes' WHEN 0 THEN 'No' END AS [IsEnabled] , CASE [sJHIS].run_status WHEN 0 THEN 'Failed' WHEN 1 THEN 'Succeeded' WHEN 2 THEN 'Retry' WHEN 3 THEN 'Cancelled' WHEN 4 THEN 'In Progress' END AS [LastRunOutcome] ,COALESCE(SUBSTRING(CAST([sJHIS].run_date AS CHAR(8)), 1, 4) + '/' + SUBSTRING(CAST([sJHIS].run_date AS CHAR(8)), 5, 2) + '/' + SUBSTRING(CAST([sJHIS].run_date AS CHAR(8)), 7, 2), '') AS [LastRun] ,COALESCE(SUBSTRING(CAST([sJOBSCH].next_run_date AS CHAR(8)), 1, 4) + '/' + SUBSTRI...

Check last 100 database backups

Check last 100 database backups Check last 100 database backups By Himalaya Dua 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 'L' THEN 'Transaction Log' END AS BackupType, s.server_name, s.recovery_model FROM msdb.dbo.backupset s INNER JOIN msdb.dbo.backupmediafamily m ON s.media_set_id = m.media_set_id --WHERE s.database_name = DB_NAME() -- Remove this line for all the database ORDER BY backup_start_date DESC, backup_finish_date GO

TLS/SSL Settings

Arduino TLS/SSL Settings Applies To: Windows Vista, Windows Server 2008, Windows 7, Windows 8.1, Windows Server 2008 R2, Windows Server 2012 R2, Windows Server 2012, Windows 8 This reference topic for the IT professional contains registry setting, Group Policy, and network port information for the Windows implementation of the Transport Layer Security (TLS) protocol and the Secure Sockets Layer (SSL) protocol through the Schannel Security Support Provider (SSP). This topic is divided into the following sections: Schannel SSP registry entries Group Policy settings Schannel SSP registry entries The following registry subkeys and entries can help you administer and troubleshoot the Schannel SSP, specifically the TLS and SSL protocols. CertificateMappingMethods Ciphers CipherSuites ClientCacheTime FIPSAlgorithmPolicy Hashes IssuerCacheSize IssuerCacheTime KeyExchangeAlgorithm MaximumCacheSize PCT 1.0 SendTrustedIssuerList ServerCa...

Change owner of all SQL jobs to SA

Change owner of all SQL jobs to SA Change owner of all SQL jobs to SA By Himalaya Dua DECLARE @name_holder VARCHAR(1000) DECLARE My_Cursor CURSOR FOR SELECT [name] FROM msdb..sysjobs OPEN My_Cursor FETCH NEXT FROM My_Cursor INTO @name_holder WHILE (@@FETCH_STATUS -1) BEGIN exec msdb..sp_update_job @job_name = @name_holder, @owner_login_name = 'sa' FETCH NEXT FROM My_Cursor INTO @name_holder END CLOSE My_Cursor DEALLOCATE My_Cursor