Home All Groups Group Topic Archive Search About

the CmdExec job has a problem in the first command

Author
14 Oct 2006 1:16 PM
netman Mo
hi

I have used an agent to do some of my works in sql server with CmdExec job I have set the command of this job with this statement:

c:\windows\system32\notepad.exe

when I start this job nothing will happen and when I stop this job it says that it is cancelled.


even I have used his command but with no result :

exec master.dbo.xp_cmdshell 'c:\windows\system32\notepad'


so what do I have to do to solve my problem

would you please help me ?

thanks for your attention

netman

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com

Author
14 Oct 2006 2:01 PM
Jasper Smith
You can't launch an exe that has a gui from the SQL service as there's no
visible desktop. It will appear as if the spid has hung. Why are you trying
to launch notepad from a SQL job?

--
HTH,
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com


Show quote
<netman Mo> wrote in message news:2006101491647netman_networld@yahoo.com...
> hi
>
> I have used an agent to do some of my works in sql server with CmdExec job
> I have set the command of this job with this statement:
>
> c:\windows\system32\notepad.exe
>
> when I start this job nothing will happen and when I stop this job it says
> that it is cancelled.
>
>
> even I have used his command but with no result :
>
> exec master.dbo.xp_cmdshell 'c:\windows\system32\notepad'
>
>
> so what do I have to do to solve my problem
>
> would you please help me ?
>
> thanks for your attention
>
> netman
>
> EggHeadCafe.com - .NET Developer Portal of Choice
> http://www.eggheadcafe.com

AddThis Social Bookmark Button