MUSINGS

Getting XML Serialization and Webservices to work with SQL CLR

Getting XML Serialization and Webservices to work with SQL CLR

Microsoft SQL server has built-in security which prevents the dynamic loading of serialized assemblies. What this basically means is that an assembly which utilises Webservices and XML.Serialization will dynamically load the code and compile at runtime and SQL Server doesn’t like that. This is the error you will receive when running functions or procedures in such an assembly. Read more about Getting XML Serialization and Webservices to work with SQL CLR

Adding the Microsoft Exchange Webservices SQL CLR assembly the easy way

Adding the Microsoft Exchange Webservices SQL CLR assembly the easy way

If you try and load the Microsoft Exchange Web Services dll (Microsoft.Exchange.WebServices.dll) as an assembly in Microsoft SQL Server, you will receive errors relating to dependent assemblies not being loaded in the SQL catalog.
The MSDN article for CREATE ASSEMBLY states

Besides the root assembly specified by assembly_name, SQL Server tries to upload any assemblies that are referenced by the root assembly being uploaded. If a referenced assembly is already uploaded to the database because of an earlier CREATE ASSEMBLY statement, this assembly is not uploaded but is available to the root assembly. If a dependent assembly was not previously uploaded, but SQL Server cannot locate its manifest file in the source directory, CREATE ASSEMBLY returns an error.

BUT this isn’t always the case. The first rule is Read more about Adding the Microsoft Exchange Webservices SQL CLR assembly the easy way

How to automate the uninstall of Java from Windows PC’s

How to automate the uninstall of Java from Windows PC’s

The following script will identify all versions of Java installed on a Windows computer (it may have several different versions installed) and then proceed to silently remove them. This script can be setup as part of a group policy to run at either Windows Startup or Shutdown. By using a group policy Java can be mass uninstalled across a large number of Windows computers at once. Read more about How to automate the uninstall of Java from Windows PC’s

Windows Installer fails to install msi package with “This installation package could not be opened” error

Windows Installer fails to install msi package with “This installation package could not be opened” error

A windows 7 laptop was dropped off in the office with an unusual problem.  Any applications which were downloaded onto the PC would fail to install if they relied on Windows Installer, such as the Australian Tax Offices (ATO) E-tax application . The error tended to indicate that the installation was corrupt. However I knew this wasn’t the case as the very same msi package would install without issue on another PC. In fact through the process of elimination I could get Windows Installer to install the msi package if the run from the command prompt using msiexec.exe.  Read more about Windows Installer fails to install msi package with “This installation package could not be opened” error