views:

20

answers:

2

Hi everyone,

I am looking for a tsql or query which will clear the transaction log file/

Thanks in advance.

+2  A: 

try:

DUMP TRANSACTION [database_name] WITH NO_LOG
KM
Will it also delete the DB Data? It will be safe right?
Braveyard
don't ever run anything on your database that you do not completely understand, and that you have not completely checked out. look it up in the manual. **If you just run stuff you find on the internet you are open to a social engineering attack.** would you run the `DROP DATABASE .....`
KM
A: 

' execute with admin priveleges

BACKUP LOG db_name WITH NO_LOG

GO

DBCC SHRINKDATABASE( db_name, 0)

GO

amit-agrawal