Sunday, September 13, 2009

Shrink database log file in 2008

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

I was helped by the following post.
http://www.uhleeka.com/blog/2009/08/sql-2008-shrink-log-file-size-with-no_lo/

Friday, September 11, 2009

Shrink database log file

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.

select * from sys.database_files

I was helped by the following link.
http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/


Thursday, September 3, 2009

Javascript issues with IE 7 and IE8

For the past 2 years we have been using CRM 3 web URL with IE 6 and & and have done the javascripts according to these browsers. But not we get javascript errors. This is due to the fact that the customer have upgraded IE 7 to IE 8. Accessing labels are bit different in IE8. I will post some issues that we have faced in a nother post.