Question : SQL dump tran with no_log

I had a problem where the log file grows very big. I set the databse "under options to auto -shrink. Since then it appears that the log file is under control. I have a different problem however. The tempdb is now growing like crazy.

I am suspecting that it has to do with some batch files (bulk inserts) I am running every 15minutes. The sql script worked fine under SQL 7. The code has this line repeated in every sql script:
 "dump tran Mydatabase
  with no_log
   go"
I found out that this syntax is not supported by SQL 2008. I am suspecting that "Commit transaction" is the equivalent of the above. Is this the case?

 

Answer : SQL dump tran with no_log

UPDATE: for SQL 2008, this command has been depricated, and no longer works
If you need to do an immediate dump, without backing it up, here's a solution
(in my example, the name of the database is "log_db"

USE [master]
GO
USE [log_db]
ALTER DATABASE [log_db] SET RECOVERY SIMPLE WITH NO_WAIT
GO
-- This is the name of my "log" tran file - edit the database, click on "files" to get the name if it is not standard
DBCC SHRINKFILE ('Log_db_log' , 1)
GO
USE [master]
GO
ALTER DATABASE [log_db] SET RECOVERY FULL WITH NO_WAIT
GO
Random Solutions  
 
programming4us programming4us