Re: Executing a dotnet console application from SQL Server 2005/2008
- From: "Dan Guzman" <guzmanda@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 26 Jul 2009 13:32:14 -0500
Is the console application perhaps accessing data modified by the statement that fired the trigger? Keep in mind that the application is executing in a different session than the trigger and the modified data is still uncommitted. You will not be able to access the uncommitted data unless you specify a NOLOCK hint (not recommended).
I'm not sure what the app is doing but you might be better to either use a CLR trigger or using Service Broker. It's a good idea to avoid external access from a trigger since this can result in unnecessarily long-running transactions.
--
Hope this helps.
Dan Guzman
SQL Server MVP
http://weblogs.sqlteam.com/dang/
"Ariel Andrés Quesada" <ArielAndrsQuesada@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:F7212F1D-8E27-4820-8684-163CB899EBCB@xxxxxxxxxxxxxxxx
Hi, I have a SQL Server 2005 deployment. Besides, I have a c# 2.0 console
application that I want it to execute in a SQL trigger.
I am trying to use xp_cmdshell to execute the console application, but when
I try to execute the code, the sql server management studio stays "running
the query for long time" without generating results.
What I am doing wrong?
The code is
xp_cmdshell "C:\app.exe"
Thanks in advance.
--
Ariel Andrés Quesada
MSc Systems Engineering, MCBMSP CRM 4.0
MCTS: TFS, MOSS 2007,Forefront, Project 2007,
.NET 2.0: Web/Win Apps, SQL Svr 2005
MCSD, MCSE, MCT
.
- References:
- Executing a dotnet console application from SQL Server 2005/2008
- From: Ariel Andrés Quesada
- Executing a dotnet console application from SQL Server 2005/2008
- Prev by Date: Re: Executing a dotnet console application from SQL Server 2005/2008
- Next by Date: Re: Distributing an integer value over a set of records
- Previous by thread: Re: Executing a dotnet console application from SQL Server 2005/2008
- Next by thread: Distributing an integer value over a set of records
- Index(es):
Relevant Pages
|