Recently do a data acquisition project using the SQLSSERVER2014 database
Did not expect data to collect two or three days, C disk space has left 8M
Hurriedly looked at the SQLSEREVR database folder
Located in C:\Program Files\Microsoft SQL Server\mssql12. Mssqlserver\mssql\data
found that the database file is not big, only dozens of m, but the log file has reached 70G, no wonder 100G of hard disk space is full.
The following solutions are available on-line search
Use [Master]GOALTER DATABASE [rm_db] SETRECOVERY Simple withno_waitGOALTER DATABASE [rm_db] SETRECOVERY Simple--Simple ModeGO Use [rm_db]GODBCCShrinkfile (N'Rm_db_log', One, Truncateonly)--Shrinking database
GO
Where rm_db is the database name, you can modify it according to your own situation
After cleanup, the log file becomes more than 10 m
This method is suitable for SQLServer2014, and some lower versions (such as 2005 and 2008) may not perform the same command
Clean up SQL Server logs