Help with app performance

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I needed a way to post a message to MSMQ form SQL Server so I found some
info online and created a console app


Sub Main(ByVal args() As String)

Dim msgQueue As MessageQueue = New MessageQueue(QUEUE_NAME)
Dim oObject As String

Try

'msgQueue = New MessageQueue(QUEUE_NAME)
oObject = args(0)
msgQueue.Send(oObject, oObject)
msgQueue.Close()

Catch ex As Exception

Finally

msgQueue = Nothing

End Try

End Sub

I then call it from SQL Server using a trigger with extended sp which
basically executes the console app upon the update of a table, however, every
time the app is executed I notice my processor performance jumps to 56 and if
I loop an update for 7 times on the table the processor jumps tp 100% since
it's executing the app 7 times. Is there any way I can reduce this
performance hit or are there any other alternatives to passing a message to
MSMQ form SQL Server?

Thanks
 
Back
Top