Monthly Archives: April 2013

Database Mail issues on SQL Server 2008

On a SQL Server 2008 (SP3) Express Edition I tried sending an E-Mail using the Database Mail feature. I kept getting an error message in the Server Logs (use Management Studio and browse to Management\Server Logs in the Object Explorer on the left side) when trying to send an E-Mail:

Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException
Message: The read on the database failed. Reason: Fehler beim Laden von 'Msxmlsql.dll'.
Data: System.Collections.ListDictionaryInternal
TargetSite: Microsoft.SqlServer.Management.SqlIMail.Server.Objects.QueueItem GetQueueItemFromCommand(System.Data.SqlClient.SqlCommand)
HelpLink: NULL
Source: DatabaseMailEngine

I could resolve this issue by coping the files …\Microsoft SQL Server\msxmlsql.dll and Microsoft SQL Server\Resources\1033\msxmlsql.rll to the SQL Server instance folder Microsoft SQL Server\MSQL10.[INSTANCE]\MSSQL\Binn.

Linux: Trace file system activity of a process

To trace file system activity of a process the Linux utility strace can be used. strace traces all system calls, but using the -e trace=file option gives a nice output about file system activity of a given process. This gives a similar output to the SysInternals Process Monitor which I used sometimes on Windows.

In order to use the utility for a multithreaded program (like Java) the -f parameter helps too. Using the output of strace (blue text) I could manage to find a missing file which crashed a Java program:

 [pid 5997] open("/home/sag/My Documents/BookSmartData/log-2013.04.11-00.29.57.txt", O_RDWR|O_CREAT|O_EXCL, 0666) = -1 ENOENT (No such file or directory) No such file or directory
 at Method)
 at com.blurb.booksmart.util.vent.Vent.writeLogFile(
 at com.blurb.booksmart.util.vent.Vent$ExceptionHandler.handle(
 at com.blurb.booksmart.util.vent.Vent$BookSmartThreadGroup$
 at java.awt.event.InvocationEvent.dispatch(
 at java.awt.EventQueue.dispatchEventImpl(
 at java.awt.EventQueue.access$200(
 at java.awt.EventQueue$
 at java.awt.EventQueue$
 at Method)
 at java.awt.EventQueue.dispatchEvent(
 at java.awt.EventDispatchThread.pumpOneEventForFilters(
 at java.awt.EventDispatchThread.pumpEventsForFilter(
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(
 at java.awt.EventDispatchThread.pumpEvents(
 at java.awt.EventDispatchThread.pumpEvents(