DB 관련

[MSSQL] 로그 및 빈공간 삭제

DevReff 2024. 12. 27. 08:23




728x90
반응형

<MSSQL2012>

1. dbcc sqlperf(logspace)

2. ALTER DATABASE [IMSDB] SET RECOVERY SIMPLE

3. Log 삭제
 - dbcc shrinkdatabase([IMSDB], truncateonly)
4. Database 빈공간 삭제
  1번째. dbcc SHRINKFILE ([IMSDB], NOTRUNCATE)
  2번째. dbcc SHRINKFILE ([IMSDB], truncateonly)
  3번째. dbcc SHRINKFILE ([IMSDB_log], NOTRUNCATE)
  4번째. dbcc SHRINKFILE ([IMSDB_log], truncateonly)

출처: https://devdb.tistory.com/13 [DB 관련:티스토리]