I have posted a command that should be used to truncate database logs previously But that is not valid for SQL 2008 databases as truncate only command has been deprecated. I have added the command tat should be used to truncate transaction log in SQL 2008 below.
Use Test Alter Database Test Set Recovery Simple DBCC SHRNIKFILE (Test_log) Alter Database Test Set Recovery Full
Even though from SQL manager we have the option to shrink database log files, sometimes it does not work as the log files size is big. Then you need to use TSQL statements to do this. I have given below such a statement that can be used to do so.
USE Test1 GO DBCC SHRINKFILE(Test1_log, 10) BACKUP LOG Test1 WITH TRUNCATE_ONLY DBCC SHRINKFILE(Test1_log, 10) GO
if you do not know the log file name use the following command to find it.
My wife has been telling me that i am putting a l lot of details about me in to this blog, but not mentioning anything about her here. My Wife's name is Harshi. What i should mention here is she is a very understanding wife. Although we were planning to go on a holiday for our first anniversary becuase of some deadlines i had to cancel my leave. She understood this very well, but was bit dissapointed. I will be going on a holiday with her next month to one of the beautiful hotels in Sri Lanka.
Thank you very much dear for being so understanding.
By the way this might be the first blog that i mention about my family.