Archive for February, 2015

steps taken to discover source of account lockout

February 26, 2015

*microsoft network monitor with authentication filter to capture pre authentication failures (program files)
*eventcombmt to parse security logs (success and failure) on domain controller event code 644 675 4771 4625 which revealed pre authentication failures and source machine, (logs stored in c:\temp, app in desktop\lockout)
*lockout status to unlock account, (located on desktop\lockout)

used to above to track the lockouts to a server. temporarily disabled kerberos pre authentication until we can work out what on the server is causing the lockouts

view database permissions

February 20, 2015

SELECT princ.name principal_name ,
princ.type_desc principal_type ,
perm.permission_name ,
perm.state_desc permission_type ,
obj.name object_name ,
s.name schema_name ,
obj.type_desc object_type
FROM sys.database_principals princ
LEFT JOIN sys.database_permissions perm ON perm.[grantee_principal_id] = princ.[principal_id]
LEFT JOIN sys.objects obj ON perm.[major_id] = obj.[object_id]
LEFT JOIN sys.schemas s ON s.schema_id = obj.schema_id

Create a Gantt chart effect in SSRS

February 19, 2015

I want to create something like this:

Capture2

http://pnarayanaswamy.blogspot.co.uk/2010/09/range-bar-chart-gantt-chart-using-ssrs.html

Narayana Swamy Palla’s Blog_ Range Bar Chart (Gantt Chart) using SSRS 2008

example rdl, change extension to rdl

Database is stuck ‘In Recovery’ with an unacceptably long delay before it is available and you dont care about any pending rollbacks completing.

February 19, 2015

Stop the sql server service
Rename the log file of the database that is in recovery
start the service

alter database XXX set emergency, single_user
alter database xxx rebuild log on (NAME = ‘log file name’, filename = ‘G:\Logs\log file name.ldf’)
alter database xxx set online, multi_user

the database is back online and the rollback has been partially completed

sort tempdb session usage by size

February 10, 2015

select * from tempdb.sys.dm_db_session_space_usage
order by internal_objects_alloc_page_count desc