Friday, April 12, 2013
details of FULL_LOG_Transactional_Differential Backups.
--Get Full Database Backups
SELECT database_name, backup_start_date, type, *
FROM msdb.dbo.backupset
WHERE backup_start_date BETWEEN DATEADD(hh, -24, GETDATE()) AND GETDATE()
AND Type = 'D'
ORDER BY backup_set_id DESC
GO
--Get Transaction Log Backups
SELECT database_name, backup_start_date, type, *
FROM msdb.dbo.backupset
WHERE backup_start_date BETWEEN DATEADD(hh, -24, GETDATE()) AND GETDATE()
AND Type = 'L'
ORDER BY backup_set_id DESC
GO
--Get Differential Backups details
SELECT database_name, backup_start_date, type, *
FROM msdb.dbo.backupset
WHERE backup_start_date BETWEEN DATEADD(hh, -24, GETDATE()) AND GETDATE()
AND Type = 'I'
ORDER BY backup_set_id DESC
GO
--File\File Group Backups
SELECT database_name, backup_start_date, type, *
FROM msdb.dbo.backupset
WHERE backup_start_date BETWEEN DATEADD(hh, -24, GETDATE()) AND GETDATE()
AND Type = 'F'
ORDER BY backup_set_id DESC
GO
node_cluster _details
SELECT SERVERPROPERTY('ServerName') as 'Server\Instance',
SERVERPROPERTY('ComputerNamePhysicalNetBIOS') as 'Node',
(select left(af.filename,3)from sys.sysaltfiles af where af.name like '%MSDB%' and af.fileid = 1) as 'Drive',
ec.local_net_address as 'IP Addr',
ec.local_tcp_port as 'SQL Port'
from sys.dm_exec_connections ec
where ec.session_id = @@SPID
SERVERPROPERTY('ComputerNamePhysicalNetBIOS') as 'Node',
(select left(af.filename,3)from sys.sysaltfiles af where af.name like '%MSDB%' and af.fileid = 1) as 'Drive',
ec.local_net_address as 'IP Addr',
ec.local_tcp_port as 'SQL Port'
from sys.dm_exec_connections ec
where ec.session_id = @@SPID
Tuesday, January 15, 2013
getting Serial Number thru cmd
to get the serial number of the laptop/machine
type in cmd
wmic bios get serialnumber
Subscribe to:
Posts (Atom)