dbTalk Databases Forums  

Operating System Command (CmdExec) will not run from Job Agent

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Operating System Command (CmdExec) will not run from Job Agent in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ryan M. Lence
 
Posts: n/a

Default Operating System Command (CmdExec) will not run from Job Agent - 01-06-2005 , 10:33 AM






I am simply trying to run DTSrun.exe from the Job Agent in SQL Server and
everytime it Says that the job failed.

The job failed. The Job was invoked by User CHQPVUW0806\LenceRM. The last
step to run was step 1 (cmd).

The step failed.

This happens every if I just try to run dir or and other command.

My backup jobs are working, and other jobs that do not need CmdExec.

Help,

Reply With Quote
  #2  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Operating System Command (CmdExec) will not run from Job Agent - 01-06-2005 , 10:59 AM






See if this helps:
http://www.support.microsoft.com/?id=269074

--
Andrew J. Kelly SQL MVP


"Ryan M. Lence" <Ryan M. Lence (AT) discussions (DOT) microsoft.com> wrote

Quote:
I am simply trying to run DTSrun.exe from the Job Agent in SQL Server and
everytime it Says that the job failed.

The job failed. The Job was invoked by User CHQPVUW0806\LenceRM. The
last
step to run was step 1 (cmd).

The step failed.

This happens every if I just try to run dir or and other command.

My backup jobs are working, and other jobs that do not need CmdExec.

Help,



Reply With Quote
  #3  
Old   
ryanlence
 
Posts: n/a

Default Re: Operating System Command (CmdExec) will not run from Job Agent - 01-06-2005 , 02:09 PM



Thanks for the link. It did help me learn more about sql server but did not
really help me fix my issue.

Even if I try to run simply dir from the SQL Job Agent I will get the listed
error.

Ryan

"Andrew J. Kelly" wrote:

Quote:
See if this helps:
http://www.support.microsoft.com/?id=269074

--
Andrew J. Kelly SQL MVP


"Ryan M. Lence" <Ryan M. Lence (AT) discussions (DOT) microsoft.com> wrote in message
news:4F673B02-5757-4DD5-9FE8-2259ACFE6EEC (AT) microsoft (DOT) com...
I am simply trying to run DTSrun.exe from the Job Agent in SQL Server and
everytime it Says that the job failed.

The job failed. The Job was invoked by User CHQPVUW0806\LenceRM. The
last
step to run was step 1 (cmd).

The step failed.

This happens every if I just try to run dir or and other command.

My backup jobs are working, and other jobs that do not need CmdExec.

Help,




Reply With Quote
  #4  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Operating System Command (CmdExec) will not run from Job Agent - 01-06-2005 , 03:53 PM



If you look in the Job history you will see a checkbox labeled "show job
steps" (or similar). This should give you more details. But it is most
likely a permissions issue. Can you get dir to work using xp_cmdshell?

exec master..xp_cmdshell 'DIR *.*'

I assume you are running SQL 2000? If so there are two accounts that may
need permissions to do what you are asking. They are outlined in the KB
article. One is the account SQL Agent is running under and the other is the
Proxy depending on how you are running the job or what role the user is in.

--
Andrew J. Kelly SQL MVP


"ryanlence" <ryanlence (AT) discussions (DOT) microsoft.com> wrote

Quote:
Thanks for the link. It did help me learn more about sql server but did
not
really help me fix my issue.

Even if I try to run simply dir from the SQL Job Agent I will get the
listed
error.

Ryan

"Andrew J. Kelly" wrote:

See if this helps:
http://www.support.microsoft.com/?id=269074

--
Andrew J. Kelly SQL MVP


"Ryan M. Lence" <Ryan M. Lence (AT) discussions (DOT) microsoft.com> wrote in
message
news:4F673B02-5757-4DD5-9FE8-2259ACFE6EEC (AT) microsoft (DOT) com...
I am simply trying to run DTSrun.exe from the Job Agent in SQL Server
and
everytime it Says that the job failed.

The job failed. The Job was invoked by User CHQPVUW0806\LenceRM. The
last
step to run was step 1 (cmd).

The step failed.

This happens every if I just try to run dir or and other command.

My backup jobs are working, and other jobs that do not need CmdExec.

Help,






Reply With Quote
  #5  
Old   
ryanlence
 
Posts: n/a

Default Re: Operating System Command (CmdExec) will not run from Job Agent - 01-06-2005 , 04:45 PM



exec master..xp_cmdshell 'DIR *.*'

Ran just fine

"Andrew J. Kelly" wrote:

Quote:
If you look in the Job history you will see a checkbox labeled "show job
steps" (or similar). This should give you more details. But it is most
likely a permissions issue. Can you get dir to work using xp_cmdshell?

exec master..xp_cmdshell 'DIR *.*'

I assume you are running SQL 2000? If so there are two accounts that may
need permissions to do what you are asking. They are outlined in the KB
article. One is the account SQL Agent is running under and the other is the
Proxy depending on how you are running the job or what role the user is in.

--
Andrew J. Kelly SQL MVP


"ryanlence" <ryanlence (AT) discussions (DOT) microsoft.com> wrote in message
news:6E3CC620-119D-40B9-B38A-6E541E9BEEC9 (AT) microsoft (DOT) com...
Thanks for the link. It did help me learn more about sql server but did
not
really help me fix my issue.

Even if I try to run simply dir from the SQL Job Agent I will get the
listed
error.

Ryan

"Andrew J. Kelly" wrote:

See if this helps:
http://www.support.microsoft.com/?id=269074

--
Andrew J. Kelly SQL MVP


"Ryan M. Lence" <Ryan M. Lence (AT) discussions (DOT) microsoft.com> wrote in
message
news:4F673B02-5757-4DD5-9FE8-2259ACFE6EEC (AT) microsoft (DOT) com...
I am simply trying to run DTSrun.exe from the Job Agent in SQL Server
and
everytime it Says that the job failed.

The job failed. The Job was invoked by User CHQPVUW0806\LenceRM. The
last
step to run was step 1 (cmd).

The step failed.

This happens every if I just try to run dir or and other command.

My backup jobs are working, and other jobs that do not need CmdExec.

Help,







Reply With Quote
  #6  
Old   
ryanlence
 
Posts: n/a

Default Re: Operating System Command (CmdExec) will not run from Job Agent - 01-07-2005 , 10:17 AM



I created a proxy account, from what I understand SQL Server should only need
to use the account if the job owner is not a member of sa.

Having created a proxy account who is a memeber of the local admin group I
now get a new error message saying.

Step 1 of job 'DTSRun' (0x0F9B5D8784E34341960EC066AE7E7858) has caused an
exception in the CmdExec subsystem and has been terminated.

Any Ideas

"Andrew J. Kelly" wrote:

Quote:
If you look in the Job history you will see a checkbox labeled "show job
steps" (or similar). This should give you more details. But it is most
likely a permissions issue. Can you get dir to work using xp_cmdshell?

exec master..xp_cmdshell 'DIR *.*'

I assume you are running SQL 2000? If so there are two accounts that may
need permissions to do what you are asking. They are outlined in the KB
article. One is the account SQL Agent is running under and the other is the
Proxy depending on how you are running the job or what role the user is in.

--
Andrew J. Kelly SQL MVP


"ryanlence" <ryanlence (AT) discussions (DOT) microsoft.com> wrote in message
news:6E3CC620-119D-40B9-B38A-6E541E9BEEC9 (AT) microsoft (DOT) com...
Thanks for the link. It did help me learn more about sql server but did
not
really help me fix my issue.

Even if I try to run simply dir from the SQL Job Agent I will get the
listed
error.

Ryan

"Andrew J. Kelly" wrote:

See if this helps:
http://www.support.microsoft.com/?id=269074

--
Andrew J. Kelly SQL MVP


"Ryan M. Lence" <Ryan M. Lence (AT) discussions (DOT) microsoft.com> wrote in
message
news:4F673B02-5757-4DD5-9FE8-2259ACFE6EEC (AT) microsoft (DOT) com...
I am simply trying to run DTSrun.exe from the Job Agent in SQL Server
and
everytime it Says that the job failed.

The job failed. The Job was invoked by User CHQPVUW0806\LenceRM. The
last
step to run was step 1 (cmd).

The step failed.

This happens every if I just try to run dir or and other command.

My backup jobs are working, and other jobs that do not need CmdExec.

Help,







Reply With Quote
  #7  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Operating System Command (CmdExec) will not run from Job Agent - 01-07-2005 , 01:26 PM



Did you ever get xp_cmdshell to work?

--
Andrew J. Kelly SQL MVP


"ryanlence" <ryanlence (AT) discussions (DOT) microsoft.com> wrote

Quote:
I created a proxy account, from what I understand SQL Server should only
need
to use the account if the job owner is not a member of sa.

Having created a proxy account who is a memeber of the local admin group I
now get a new error message saying.

Step 1 of job 'DTSRun' (0x0F9B5D8784E34341960EC066AE7E7858) has caused an
exception in the CmdExec subsystem and has been terminated.

Any Ideas

"Andrew J. Kelly" wrote:

If you look in the Job history you will see a checkbox labeled "show job
steps" (or similar). This should give you more details. But it is most
likely a permissions issue. Can you get dir to work using xp_cmdshell?

exec master..xp_cmdshell 'DIR *.*'

I assume you are running SQL 2000? If so there are two accounts that may
need permissions to do what you are asking. They are outlined in the KB
article. One is the account SQL Agent is running under and the other is
the
Proxy depending on how you are running the job or what role the user is
in.

--
Andrew J. Kelly SQL MVP


"ryanlence" <ryanlence (AT) discussions (DOT) microsoft.com> wrote in message
news:6E3CC620-119D-40B9-B38A-6E541E9BEEC9 (AT) microsoft (DOT) com...
Thanks for the link. It did help me learn more about sql server but
did
not
really help me fix my issue.

Even if I try to run simply dir from the SQL Job Agent I will get the
listed
error.

Ryan

"Andrew J. Kelly" wrote:

See if this helps:
http://www.support.microsoft.com/?id=269074

--
Andrew J. Kelly SQL MVP


"Ryan M. Lence" <Ryan M. Lence (AT) discussions (DOT) microsoft.com> wrote in
message
news:4F673B02-5757-4DD5-9FE8-2259ACFE6EEC (AT) microsoft (DOT) com...
I am simply trying to run DTSrun.exe from the Job Agent in SQL Server
and
everytime it Says that the job failed.

The job failed. The Job was invoked by User CHQPVUW0806\LenceRM.
The
last
step to run was step 1 (cmd).

The step failed.

This happens every if I just try to run dir or and other command.

My backup jobs are working, and other jobs that do not need CmdExec.

Help,









Reply With Quote
  #8  
Old   
ryanlence
 
Posts: n/a

Default Re: Operating System Command (CmdExec) will not run from Job Agent - 01-07-2005 , 01:33 PM



Yes,

It ran just fine

"Andrew J. Kelly" wrote:

Quote:
Did you ever get xp_cmdshell to work?

--
Andrew J. Kelly SQL MVP


"ryanlence" <ryanlence (AT) discussions (DOT) microsoft.com> wrote in message
news:C476E8B3-206B-4FB2-B047-9F55E4D0B493 (AT) microsoft (DOT) com...
I created a proxy account, from what I understand SQL Server should only
need
to use the account if the job owner is not a member of sa.

Having created a proxy account who is a memeber of the local admin group I
now get a new error message saying.

Step 1 of job 'DTSRun' (0x0F9B5D8784E34341960EC066AE7E7858) has caused an
exception in the CmdExec subsystem and has been terminated.

Any Ideas

"Andrew J. Kelly" wrote:

If you look in the Job history you will see a checkbox labeled "show job
steps" (or similar). This should give you more details. But it is most
likely a permissions issue. Can you get dir to work using xp_cmdshell?

exec master..xp_cmdshell 'DIR *.*'

I assume you are running SQL 2000? If so there are two accounts that may
need permissions to do what you are asking. They are outlined in the KB
article. One is the account SQL Agent is running under and the other is
the
Proxy depending on how you are running the job or what role the user is
in.

--
Andrew J. Kelly SQL MVP


"ryanlence" <ryanlence (AT) discussions (DOT) microsoft.com> wrote in message
news:6E3CC620-119D-40B9-B38A-6E541E9BEEC9 (AT) microsoft (DOT) com...
Thanks for the link. It did help me learn more about sql server but
did
not
really help me fix my issue.

Even if I try to run simply dir from the SQL Job Agent I will get the
listed
error.

Ryan

"Andrew J. Kelly" wrote:

See if this helps:
http://www.support.microsoft.com/?id=269074

--
Andrew J. Kelly SQL MVP


"Ryan M. Lence" <Ryan M. Lence (AT) discussions (DOT) microsoft.com> wrote in
message
news:4F673B02-5757-4DD5-9FE8-2259ACFE6EEC (AT) microsoft (DOT) com...
I am simply trying to run DTSrun.exe from the Job Agent in SQL Server
and
everytime it Says that the job failed.

The job failed. The Job was invoked by User CHQPVUW0806\LenceRM.
The
last
step to run was step 1 (cmd).

The step failed.

This happens every if I just try to run dir or and other command.

My backup jobs are working, and other jobs that do not need CmdExec.

Help,










Reply With Quote
  #9  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Operating System Command (CmdExec) will not run from Job Agent - 01-07-2005 , 03:21 PM



Well now it sounds like you have a problem with the package itself or how
you are calling it. Maybe someone else can help here but that isn't a whole
lot to go on.

--
Andrew J. Kelly SQL MVP


"ryanlence" <ryanlence (AT) discussions (DOT) microsoft.com> wrote

Quote:
Yes,

It ran just fine

"Andrew J. Kelly" wrote:

Did you ever get xp_cmdshell to work?

--
Andrew J. Kelly SQL MVP


"ryanlence" <ryanlence (AT) discussions (DOT) microsoft.com> wrote in message
news:C476E8B3-206B-4FB2-B047-9F55E4D0B493 (AT) microsoft (DOT) com...
I created a proxy account, from what I understand SQL Server should only
need
to use the account if the job owner is not a member of sa.

Having created a proxy account who is a memeber of the local admin
group I
now get a new error message saying.

Step 1 of job 'DTSRun' (0x0F9B5D8784E34341960EC066AE7E7858) has caused
an
exception in the CmdExec subsystem and has been terminated.

Any Ideas

"Andrew J. Kelly" wrote:

If you look in the Job history you will see a checkbox labeled "show
job
steps" (or similar). This should give you more details. But it is
most
likely a permissions issue. Can you get dir to work using
xp_cmdshell?

exec master..xp_cmdshell 'DIR *.*'

I assume you are running SQL 2000? If so there are two accounts that
may
need permissions to do what you are asking. They are outlined in the
KB
article. One is the account SQL Agent is running under and the other
is
the
Proxy depending on how you are running the job or what role the user
is
in.

--
Andrew J. Kelly SQL MVP


"ryanlence" <ryanlence (AT) discussions (DOT) microsoft.com> wrote in message
news:6E3CC620-119D-40B9-B38A-6E541E9BEEC9 (AT) microsoft (DOT) com...
Thanks for the link. It did help me learn more about sql server but
did
not
really help me fix my issue.

Even if I try to run simply dir from the SQL Job Agent I will get
the
listed
error.

Ryan

"Andrew J. Kelly" wrote:

See if this helps:
http://www.support.microsoft.com/?id=269074

--
Andrew J. Kelly SQL MVP


"Ryan M. Lence" <Ryan M. Lence (AT) discussions (DOT) microsoft.com> wrote in
message
news:4F673B02-5757-4DD5-9FE8-2259ACFE6EEC (AT) microsoft (DOT) com...
I am simply trying to run DTSrun.exe from the Job Agent in SQL
Server
and
everytime it Says that the job failed.

The job failed. The Job was invoked by User CHQPVUW0806\LenceRM.
The
last
step to run was step 1 (cmd).

The step failed.

This happens every if I just try to run dir or and other command.

My backup jobs are working, and other jobs that do not need
CmdExec.

Help,












Reply With Quote
  #10  
Old   
ryanlence
 
Posts: n/a

Default Re: Operating System Command (CmdExec) will not run from Job Agent - 01-07-2005 , 04:09 PM



It is not the package as anything that is run from CmdExec Sql Agnet job will
fail. You can try DTSRun, dir, ping, hostname, and command that you run from
the job queue will fail.

"Andrew J. Kelly" wrote:

Quote:
Well now it sounds like you have a problem with the package itself or how
you are calling it. Maybe someone else can help here but that isn't a whole
lot to go on.

--
Andrew J. Kelly SQL MVP


"ryanlence" <ryanlence (AT) discussions (DOT) microsoft.com> wrote in message
news:69FBFC46-95A2-4433-B935-EC4F3CA0649F (AT) microsoft (DOT) com...
Yes,

It ran just fine

"Andrew J. Kelly" wrote:

Did you ever get xp_cmdshell to work?

--
Andrew J. Kelly SQL MVP


"ryanlence" <ryanlence (AT) discussions (DOT) microsoft.com> wrote in message
news:C476E8B3-206B-4FB2-B047-9F55E4D0B493 (AT) microsoft (DOT) com...
I created a proxy account, from what I understand SQL Server should only
need
to use the account if the job owner is not a member of sa.

Having created a proxy account who is a memeber of the local admin
group I
now get a new error message saying.

Step 1 of job 'DTSRun' (0x0F9B5D8784E34341960EC066AE7E7858) has caused
an
exception in the CmdExec subsystem and has been terminated.

Any Ideas

"Andrew J. Kelly" wrote:

If you look in the Job history you will see a checkbox labeled "show
job
steps" (or similar). This should give you more details. But it is
most
likely a permissions issue. Can you get dir to work using
xp_cmdshell?

exec master..xp_cmdshell 'DIR *.*'

I assume you are running SQL 2000? If so there are two accounts that
may
need permissions to do what you are asking. They are outlined in the
KB
article. One is the account SQL Agent is running under and the other
is
the
Proxy depending on how you are running the job or what role the user
is
in.

--
Andrew J. Kelly SQL MVP


"ryanlence" <ryanlence (AT) discussions (DOT) microsoft.com> wrote in message
news:6E3CC620-119D-40B9-B38A-6E541E9BEEC9 (AT) microsoft (DOT) com...
Thanks for the link. It did help me learn more about sql server but
did
not
really help me fix my issue.

Even if I try to run simply dir from the SQL Job Agent I will get
the
listed
error.

Ryan

"Andrew J. Kelly" wrote:

See if this helps:
http://www.support.microsoft.com/?id=269074

--
Andrew J. Kelly SQL MVP


"Ryan M. Lence" <Ryan M. Lence (AT) discussions (DOT) microsoft.com> wrote in
message
news:4F673B02-5757-4DD5-9FE8-2259ACFE6EEC (AT) microsoft (DOT) com...
I am simply trying to run DTSrun.exe from the Job Agent in SQL
Server
and
everytime it Says that the job failed.

The job failed. The Job was invoked by User CHQPVUW0806\LenceRM.
The
last
step to run was step 1 (cmd).

The step failed.

This happens every if I just try to run dir or and other command.

My backup jobs are working, and other jobs that do not need
CmdExec.

Help,













Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.