Monday, April 10, 2017

How to Shrink MS SQL Server Transaction Logs

Using T-SQL

ALTER DATABASE [db name]
SET RECOVERY SIMPLE
GO
DBCC SHRINKFILE('log_file_name.ldf', 100)--whatever size you need in MB's 
GO
ALTER DATABASE [db name]
SET RECOVERY FULL

To Find Log file name use below T-SQL

use [db name]
GO
select name as [log_file_name] from sys.database_files
where [type_desc] = 'LOG'

Saturday, April 8, 2017

Windows Installer MSI Error 1001/2869

Make sure to disable any antivirus software

Solution 1:
  1. Run cmd as administrator
  2. go to directory containing the msi file using "cd"
  3. then run "msiexec /i File.msi
Solution 2:
  1. Run cmd as administrator
  2. go to directory containing the msi file using "cd"
  3. then run msiexec /a File.msi /qb targetdir="e:/NewPath/"
  4. this will extract the contents of file where you may be able to launch the application