SQL Server ERRORLOG way too big Im running SQL server 2014 on a VPS with 150Gb ssd. Today i found that my hard disk was full 100% and there's a very large file from SQL Server Error log that was 45.7Gb.
I tried manually delete the file, but Windows says the disk space doesnt change at all.
How can I delete this file ? I dont need error log data, it's fine for me to delete it and regain the disk space.
Thank you very much for your support.
You can limit the number and size of SQL Server error log files to avoid excessive space. This can be done from SSMS Object Explorer by right-clicking on the SQL Server Logs folder and selecting Configure. Alternatively, use a T-SQL script like the below example that limits the number of error logs to 10 files of up to 100MB each for your default instance:
EXEC master..xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer'
    , N'ErrorLogSizeInKb'
    , REG_DWORD
    , 100;
EXEC master..xp_instance_regwrite N'HKEY_LOCAL_MACHINE'
    , N'Software\Microsoft\MSSQLServer\MSSQLServer'
    , N'NumErrorLogs'
    , REG_DWORD
    , 10;

Examine the log to identify and remediate the root cause for the excessive size. The reason could be repeated login failures due to an attack, misconfigured application, repeated stack dumps, etc.
To view the current log, double-click on it from SSMS Object Explorer under Management--&gt;SQL Server Logs or with the query below. In either case, you may need to stop the query due to the very large log size but the sampled records should be enough to identify the cause.
EXEC xp_readerrorlog 0, 1;