Source Code



Deleting Log MSSQL Database

  • anonymous
  • Jul 31' 13
  • SQL
  • 534
  • 25
  • United States

The more transactions, the greater the size of the database, the greater the size of the database means that many of the processes that have occurred, the whole process was well saved by the server in the LOG file. For most who frequent database Meadowsweet sometimes this can be a problem if the size of the LOG become increasingly bulge to shrink it needs to be done in order to be efficient storage disk locations.


Reduce/remove SQL Server 2000 database log

BACKUP LOG DatabaseName WITH TRUNCATE_ONLY DBCC
SHRINKFILE(FileNameLogicalLDF,1)
go 
DBCC SHRINKDATABASE (DatabaseName, 1)

Reduce log for SQL Server 2008

BACKUP LOG NamaDatabase TO DISK='Null'
DBCC SHRINKFILE(NamaFileLogicalLDF, 0 , TRUNCATEONLY)
WITH NO_INFOMSGS
DBCC SHRINKDATABASE( DatabaseName, 0,TRUNCATEONLY )
WITH NO_INFOMSGS

note: use this code for see the database properties

select * from sys.database_files


Happy query !

  • Tags :
comments powered by Disqus

Related Code

Restore and Backup Database MSSQL Using Query

SQL Database backup using Query

Piramida bintang rata kanan

Program design Pot

Program piramida bintang rata kiri bawah

Piramida bintang rata kanan bawah

Piramida bintang bawah

Bintang piramida atas

Bintang piramida rata kiri

Program bintang piramida Love



Category