InterviewSolution
| 1. |
How To Truncate The Log In Sql Server 2012? |
|
Answer» BACKUP LOG TestDB WITH TRUNCATE_ONLY is gone. SQL server does not allow you to truncate the log now otherwise whole purpose of a DB is defeated. You have to make SURE whether you need log or not. If you do not need log then have the recovery model simple instead of FULL. If you do not want the log to be accumulated in some particular bulk logging then CHANGE the recovery model BULK LOGGED for that duration and take one TLog Backup just before and after this change. I shall discuss this later in my later BLOG. BACKUP LOG COMMAND backs up the t-log and frees the space in the log file. BACKUP LOG TestDB WITH TRUNCATE_ONLY is gone. SQL server does not allow you to truncate the log now otherwise whole purpose of a DB is defeated. You have to make sure whether you need log or not. If you do not need log then have the recovery model simple instead of full. If you do not want the log to be accumulated in some particular bulk logging then change the recovery model BULK LOGGED for that duration and take one TLog Backup just before and after this change. I shall discuss this later in my later blog. BACKUP LOG command backs up the t-log and frees the space in the log file. |
|