Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sent_sara
Constraint Violating Yak Guru
377 Posts |
Posted - 2008-09-18 : 01:44:44
|
| Hi Friend ,I need to Clear The Log Fileson daily basis by scheduling ,can any one correct the below queryTxs in AdvanceDeclare @ctr int,@i intDeclare @dbname varchar(10)set i=0select @ctr=count(*) from sys.databaseswhile @i<=@ctr begin -->HoW to Call the Db name @str='dump tran '+ @dbname + ' with no_log' Exec (dbcc @str)set @i=@i+1 end |
|
|
YellowBug
Aged Yak Warrior
616 Posts |
Posted - 2008-09-18 : 03:48:33
|
| Why do you require this? In production or development/test server?What recovery model and backup/restore strategy are you using for the databases?Instead of doing this daily, consider setting your databases to the SIMPLE recovery model, if appropriate.Look up the BACKUP LOG statement in BOL. |
 |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-09-18 : 08:27:13
|
| Better to backup log more frequently if you are in Full Recovery model. |
 |
|
|
|
|
|