Sunday, August 30, 2015
Error: 17049, Severity: 16, State: 1. DBCC ErrorLog fail
DBCC ERRORLOG
Error: 17049, Severity: 16, State: 1.
Unable to cycle error log file from 'D:\MSSQL10_50.MSSQLSERVER\MSSQL\Log\ERRORLOG' to 'D:\MSSQL10_50.MSSQLSERVER\MSSQL\Log\ERRORLOG.1' due to OS error '32(The process cannot access the file because it is being used by another process.)'. A process outside of SQL Server may be preventing SQL Server from reading the files. As a result, errorlog entries may be lost and it may not be possible to view some SQL Server errorlogs. Make sure no other processes have locked the file with write-only access."
SELECT *
FROM sys.dm_exec_requests a
OUTER APPLY sys.dm_exec_sql_text(a.sql_handle) b
WHERE session_id > 50
and session_id <> @@spid AND( text = 'xp_readerrorlog' OR text = 'sp_cycle_errorlog')
ORDER BY start_time
kill the spid
rerun DBCC ERRORLOG and it successful
reference : Unable to cycle error log due to lock that will not clear
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment