We have both our sql server and agent running under an
account of sqlservice. I run a winrar job in the agent as
a CMDExec step and it fails everytime. If I terminal
service into the box under the sqlservice account I can
create new files on both the source and destination file
systems. I can also run the job as a batch script from the
command line.
I'm baffeled, if I can run the job as the same account
the agent is running under and specify the job as that
same user. What is stopping this job from running?
"c:\Program Files\WinRAR\rar" a -ep1 "\\Ixcorpnas01
\public1\bmurtha\telnform
[DATE].rar" "G:\MSSQL\BACKUP\telnform.BAK"
I get this error:
Executed as user: IXCORPSQL01\SqlService. The process
could not be created for step 2 of job
0x0C7C1F1321CA844D884F666429C26A67 (reason: The system
cannot find the file specified). The step failed.
But runs fine on the command line when logged in as
sqlservice.
Please help,
BryanHi Bryan
Is the service you are using a Domain account or a local account? The error
you get says it's executed as user 'IXCOPRSQL01\...' which to me sounds like
a local account rather than a domain account. If you are running it as a
local user, you might have problems getting to your '\\Ixcoprnas01\....'
share.
Regards
Steen
Bryan Murtha wrote:
> We have both our sql server and agent running under an
> account of sqlservice. I run a winrar job in the agent as
> a CMDExec step and it fails everytime. If I terminal
> service into the box under the sqlservice account I can
> create new files on both the source and destination file
> systems. I can also run the job as a batch script from the
> command line.
> I'm baffeled, if I can run the job as the same account
> the agent is running under and specify the job as that
> same user. What is stopping this job from running?
> "c:\Program Files\WinRAR\rar" a -ep1 "\\Ixcorpnas01
> \public1\bmurtha\telnform
> [DATE].rar" "G:\MSSQL\BACKUP\telnform.BAK"
> I get this error:
> Executed as user: IXCORPSQL01\SqlService. The process
> could not be created for step 2 of job
> 0x0C7C1F1321CA844D884F666429C26A67 (reason: The system
> cannot find the file specified). The step failed.
> But runs fine on the command line when logged in as
> sqlservice.
> Please help,
> Bryan|||Hi Steve,
Oddly enough I didn't figure out what was happening
until I took that line and executed in Query Analyizer
with xp_cmdshell. It wound up it was path to RAR that was
blowing up. It had nothing to to with the NAS or the
backup path. I just stuck RAR in system32 and changed this:
"c:\Program Files\WinRAR\rar" to rar and it was all good.
Regards,
Bryan
>--Original Message--
>Hi Bryan
>Is the service you are using a Domain account or a local
account? The error
>you get says it's executed as user 'IXCOPRSQL01\...'
which to me sounds like
>a local account rather than a domain account. If you are
running it as a
>local user, you might have problems getting to
your '\\Ixcoprnas01\....'
>share.
>Regards
>Steen
>
>Bryan Murtha wrote:
>> We have both our sql server and agent running under an
>> account of sqlservice. I run a winrar job in the agent
as
>> a CMDExec step and it fails everytime. If I terminal
>> service into the box under the sqlservice account I can
>> create new files on both the source and destination file
>> systems. I can also run the job as a batch script from
the
>> command line.
>> I'm baffeled, if I can run the job as the same account
>> the agent is running under and specify the job as that
>> same user. What is stopping this job from running?
>> "c:\Program Files\WinRAR\rar" a -ep1 "\\Ixcorpnas01
>> \public1\bmurtha\telnform
>> [DATE].rar" "G:\MSSQL\BACKUP\telnform.BAK"
>> I get this error:
>> Executed as user: IXCORPSQL01\SqlService. The process
>> could not be created for step 2 of job
>> 0x0C7C1F1321CA844D884F666429C26A67 (reason: The system
>> cannot find the file specified). The step failed.
>> But runs fine on the command line when logged in as
>> sqlservice.
>> Please help,
>> Bryan
>
>.
>
Showing posts with label agent. Show all posts
Showing posts with label agent. Show all posts
Saturday, February 25, 2012
CMDExec not working in sql agent job.
We have both our sql server and agent running under an
account of sqlservice. I run a winrar job in the agent as
a CMDExec step and it fails everytime. If I terminal
service into the box under the sqlservice account I can
create new files on both the source and destination file
systems. I can also run the job as a batch script from the
command line.
I'm baffeled, if I can run the job as the same account
the agent is running under and specify the job as that
same user. What is stopping this job from running?
"c:\Program Files\WinRAR\rar" a -ep1 "\\Ixcorpnas01
\public1\bmurtha\telnform
[DATE].rar" "G:\MSSQL\BACKUP\telnform.BAK"
I get this error:
Executed as user: IXCORPSQL01\SqlService. The process
could not be created for step 2 of job
0x0C7C1F1321CA844D884F666429C26A67 (reason: The system
cannot find the file specified). The step failed.
But runs fine on the command line when logged in as
sqlservice.
Please help,
BryanHi Bryan
Is the service you are using a Domain account or a local account? The error
you get says it's executed as user 'IXCOPRSQL01\...' which to me sounds like
a local account rather than a domain account. If you are running it as a
local user, you might have problems getting to your '\\Ixcoprnas01\....'
share.
Regards
Steen
Bryan Murtha wrote:
> We have both our sql server and agent running under an
> account of sqlservice. I run a winrar job in the agent as
> a CMDExec step and it fails everytime. If I terminal
> service into the box under the sqlservice account I can
> create new files on both the source and destination file
> systems. I can also run the job as a batch script from the
> command line.
> I'm baffeled, if I can run the job as the same account
> the agent is running under and specify the job as that
> same user. What is stopping this job from running?
> "c:\Program Files\WinRAR\rar" a -ep1 "\\Ixcorpnas01
> \public1\bmurtha\telnform
> [DATE].rar" "G:\MSSQL\BACKUP\telnform.BAK"
> I get this error:
> Executed as user: IXCORPSQL01\SqlService. The process
> could not be created for step 2 of job
> 0x0C7C1F1321CA844D884F666429C26A67 (reason: The system
> cannot find the file specified). The step failed.
> But runs fine on the command line when logged in as
> sqlservice.
> Please help,
> Bryan|||Hi Steve,
Oddly enough I didn't figure out what was happening
until I took that line and executed in Query Analyizer
with xp_cmdshell. It wound up it was path to RAR that was
blowing up. It had nothing to to with the NAS or the
backup path. I just stuck RAR in system32 and changed this:
"c:\Program Files\WinRAR\rar" to rar and it was all good.
Regards,
Bryan
>--Original Message--
>Hi Bryan
>Is the service you are using a Domain account or a local
account? The error
>you get says it's executed as user 'IXCOPRSQL01\...'
which to me sounds like
>a local account rather than a domain account. If you are
running it as a
>local user, you might have problems getting to
your '\\Ixcoprnas01\....'
>share.
>Regards
>Steen
>
>Bryan Murtha wrote:
as[vbcol=seagreen]
the[vbcol=seagreen]
>
>.
>
account of sqlservice. I run a winrar job in the agent as
a CMDExec step and it fails everytime. If I terminal
service into the box under the sqlservice account I can
create new files on both the source and destination file
systems. I can also run the job as a batch script from the
command line.
I'm baffeled, if I can run the job as the same account
the agent is running under and specify the job as that
same user. What is stopping this job from running?
"c:\Program Files\WinRAR\rar" a -ep1 "\\Ixcorpnas01
\public1\bmurtha\telnform
[DATE].rar" "G:\MSSQL\BACKUP\telnform.BAK"
I get this error:
Executed as user: IXCORPSQL01\SqlService. The process
could not be created for step 2 of job
0x0C7C1F1321CA844D884F666429C26A67 (reason: The system
cannot find the file specified). The step failed.
But runs fine on the command line when logged in as
sqlservice.
Please help,
BryanHi Bryan
Is the service you are using a Domain account or a local account? The error
you get says it's executed as user 'IXCOPRSQL01\...' which to me sounds like
a local account rather than a domain account. If you are running it as a
local user, you might have problems getting to your '\\Ixcoprnas01\....'
share.
Regards
Steen
Bryan Murtha wrote:
> We have both our sql server and agent running under an
> account of sqlservice. I run a winrar job in the agent as
> a CMDExec step and it fails everytime. If I terminal
> service into the box under the sqlservice account I can
> create new files on both the source and destination file
> systems. I can also run the job as a batch script from the
> command line.
> I'm baffeled, if I can run the job as the same account
> the agent is running under and specify the job as that
> same user. What is stopping this job from running?
> "c:\Program Files\WinRAR\rar" a -ep1 "\\Ixcorpnas01
> \public1\bmurtha\telnform
> [DATE].rar" "G:\MSSQL\BACKUP\telnform.BAK"
> I get this error:
> Executed as user: IXCORPSQL01\SqlService. The process
> could not be created for step 2 of job
> 0x0C7C1F1321CA844D884F666429C26A67 (reason: The system
> cannot find the file specified). The step failed.
> But runs fine on the command line when logged in as
> sqlservice.
> Please help,
> Bryan|||Hi Steve,
Oddly enough I didn't figure out what was happening
until I took that line and executed in Query Analyizer
with xp_cmdshell. It wound up it was path to RAR that was
blowing up. It had nothing to to with the NAS or the
backup path. I just stuck RAR in system32 and changed this:
"c:\Program Files\WinRAR\rar" to rar and it was all good.
Regards,
Bryan
>--Original Message--
>Hi Bryan
>Is the service you are using a Domain account or a local
account? The error
>you get says it's executed as user 'IXCOPRSQL01\...'
which to me sounds like
>a local account rather than a domain account. If you are
running it as a
>local user, you might have problems getting to
your '\\Ixcoprnas01\....'
>share.
>Regards
>Steen
>
>Bryan Murtha wrote:
as[vbcol=seagreen]
the[vbcol=seagreen]
>
>.
>
CMDExec not working in sql agent job.
We have both our sql server and agent running under an
account of sqlservice. I run a winrar job in the agent as
a CMDExec step and it fails everytime. If I terminal
service into the box under the sqlservice account I can
create new files on both the source and destination file
systems. I can also run the job as a batch script from the
command line.
I'm baffeled, if I can run the job as the same account
the agent is running under and specify the job as that
same user. What is stopping this job from running?
"c:\Program Files\WinRAR\rar" a -ep1 "\\Ixcorpnas01
\public1\bmurtha\telnform
[DATE].rar" "G:\MSSQL\BACKUP\telnform.BAK"
I get this error:
Executed as user: IXCORPSQL01\SqlService. The process
could not be created for step 2 of job
0x0C7C1F1321CA844D884F666429C26A67 (reason: The system
cannot find the file specified). The step failed.
But runs fine on the command line when logged in as
sqlservice.
Please help,
Bryan
Hi Bryan
Is the service you are using a Domain account or a local account? The error
you get says it's executed as user 'IXCOPRSQL01\...' which to me sounds like
a local account rather than a domain account. If you are running it as a
local user, you might have problems getting to your '\\Ixcoprnas01\....'
share.
Regards
Steen
Bryan Murtha wrote:
> We have both our sql server and agent running under an
> account of sqlservice. I run a winrar job in the agent as
> a CMDExec step and it fails everytime. If I terminal
> service into the box under the sqlservice account I can
> create new files on both the source and destination file
> systems. I can also run the job as a batch script from the
> command line.
> I'm baffeled, if I can run the job as the same account
> the agent is running under and specify the job as that
> same user. What is stopping this job from running?
> "c:\Program Files\WinRAR\rar" a -ep1 "\\Ixcorpnas01
> \public1\bmurtha\telnform
> [DATE].rar" "G:\MSSQL\BACKUP\telnform.BAK"
> I get this error:
> Executed as user: IXCORPSQL01\SqlService. The process
> could not be created for step 2 of job
> 0x0C7C1F1321CA844D884F666429C26A67 (reason: The system
> cannot find the file specified). The step failed.
> But runs fine on the command line when logged in as
> sqlservice.
> Please help,
> Bryan
|||Hi Steve,
Oddly enough I didn't figure out what was happening
until I took that line and executed in Query Analyizer
with xp_cmdshell. It wound up it was path to RAR that was
blowing up. It had nothing to to with the NAS or the
backup path. I just stuck RAR in system32 and changed this:
"c:\Program Files\WinRAR\rar" to rar and it was all good.
Regards,
Bryan
>--Original Message--
>Hi Bryan
>Is the service you are using a Domain account or a local
account? The error
>you get says it's executed as user 'IXCOPRSQL01\...'
which to me sounds like
>a local account rather than a domain account. If you are
running it as a
>local user, you might have problems getting to
your '\\Ixcoprnas01\....'[vbcol=seagreen]
>share.
>Regards
>Steen
>
>Bryan Murtha wrote:
as[vbcol=seagreen]
the
>
>.
>
account of sqlservice. I run a winrar job in the agent as
a CMDExec step and it fails everytime. If I terminal
service into the box under the sqlservice account I can
create new files on both the source and destination file
systems. I can also run the job as a batch script from the
command line.
I'm baffeled, if I can run the job as the same account
the agent is running under and specify the job as that
same user. What is stopping this job from running?
"c:\Program Files\WinRAR\rar" a -ep1 "\\Ixcorpnas01
\public1\bmurtha\telnform
[DATE].rar" "G:\MSSQL\BACKUP\telnform.BAK"
I get this error:
Executed as user: IXCORPSQL01\SqlService. The process
could not be created for step 2 of job
0x0C7C1F1321CA844D884F666429C26A67 (reason: The system
cannot find the file specified). The step failed.
But runs fine on the command line when logged in as
sqlservice.
Please help,
Bryan
Hi Bryan
Is the service you are using a Domain account or a local account? The error
you get says it's executed as user 'IXCOPRSQL01\...' which to me sounds like
a local account rather than a domain account. If you are running it as a
local user, you might have problems getting to your '\\Ixcoprnas01\....'
share.
Regards
Steen
Bryan Murtha wrote:
> We have both our sql server and agent running under an
> account of sqlservice. I run a winrar job in the agent as
> a CMDExec step and it fails everytime. If I terminal
> service into the box under the sqlservice account I can
> create new files on both the source and destination file
> systems. I can also run the job as a batch script from the
> command line.
> I'm baffeled, if I can run the job as the same account
> the agent is running under and specify the job as that
> same user. What is stopping this job from running?
> "c:\Program Files\WinRAR\rar" a -ep1 "\\Ixcorpnas01
> \public1\bmurtha\telnform
> [DATE].rar" "G:\MSSQL\BACKUP\telnform.BAK"
> I get this error:
> Executed as user: IXCORPSQL01\SqlService. The process
> could not be created for step 2 of job
> 0x0C7C1F1321CA844D884F666429C26A67 (reason: The system
> cannot find the file specified). The step failed.
> But runs fine on the command line when logged in as
> sqlservice.
> Please help,
> Bryan
|||Hi Steve,
Oddly enough I didn't figure out what was happening
until I took that line and executed in Query Analyizer
with xp_cmdshell. It wound up it was path to RAR that was
blowing up. It had nothing to to with the NAS or the
backup path. I just stuck RAR in system32 and changed this:
"c:\Program Files\WinRAR\rar" to rar and it was all good.
Regards,
Bryan
>--Original Message--
>Hi Bryan
>Is the service you are using a Domain account or a local
account? The error
>you get says it's executed as user 'IXCOPRSQL01\...'
which to me sounds like
>a local account rather than a domain account. If you are
running it as a
>local user, you might have problems getting to
your '\\Ixcoprnas01\....'[vbcol=seagreen]
>share.
>Regards
>Steen
>
>Bryan Murtha wrote:
as[vbcol=seagreen]
the
>
>.
>
CmdExec Jobs
Hello - I am trying to set up a job through sql server agent. The job sets
the osqluser and osqlpassword, then calls a bunch of batch files. When I ru
n
it in dos, it works great, but in the sql job, it does nothing. Does the
syntax need to be different or something'
SET uname=Uname
SET pword=Pword
osql -Ssrvname -i inputfile -n > d:\outputfile.txt
Thanks!
MitchYou can only execute one command in a CmdExec job step. Having several job s
teps will probably not
cut it as I guess that the SET settings won't be saved between job step exec
utions. Do the commands
in a bat file instead and schedule this bat file.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Mitch" <Mitch@.discussions.microsoft.com> wrote in message
news:7848BB7E-494B-4F6D-B3A7-B5C2E71C4912@.microsoft.com...
> Hello - I am trying to set up a job through sql server agent. The job set
s
> the osqluser and osqlpassword, then calls a bunch of batch files. When I
run
> it in dos, it works great, but in the sql job, it does nothing. Does the
> syntax need to be different or something'
> SET uname=Uname
> SET pword=Pword
> osql -Ssrvname -i inputfile -n > d:\outputfile.txt
> Thanks!
> Mitch
the osqluser and osqlpassword, then calls a bunch of batch files. When I ru
n
it in dos, it works great, but in the sql job, it does nothing. Does the
syntax need to be different or something'
SET uname=Uname
SET pword=Pword
osql -Ssrvname -i inputfile -n > d:\outputfile.txt
Thanks!
MitchYou can only execute one command in a CmdExec job step. Having several job s
teps will probably not
cut it as I guess that the SET settings won't be saved between job step exec
utions. Do the commands
in a bat file instead and schedule this bat file.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Mitch" <Mitch@.discussions.microsoft.com> wrote in message
news:7848BB7E-494B-4F6D-B3A7-B5C2E71C4912@.microsoft.com...
> Hello - I am trying to set up a job through sql server agent. The job set
s
> the osqluser and osqlpassword, then calls a bunch of batch files. When I
run
> it in dos, it works great, but in the sql job, it does nothing. Does the
> syntax need to be different or something'
> SET uname=Uname
> SET pword=Pword
> osql -Ssrvname -i inputfile -n > d:\outputfile.txt
> Thanks!
> Mitch
cmdexec in SQL agent Jobs
If I do xp_cmdexec 'dir' it displays the directory:
C:\Program Files\Common Files\System\Mapi\1033\NT
on a different sql server the same command shows the directory:
C:\WINNT\system32
How do you set the directory which xp_cmdexec uses?My guess is that it uses the PATH environment variable. You should be able to check that from a DOS
box:
SET
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"AR" <remove_rittingAThot_mail_DOT_C_O_M> wrote in message
news:uRZPa2erDHA.3504@.TK2MSFTNGP11.phx.gbl...
> If I do xp_cmdexec 'dir' it displays the directory:
> C:\Program Files\Common Files\System\Mapi\1033\NT
> on a different sql server the same command shows the directory:
> C:\WINNT\system32
> How do you set the directory which xp_cmdexec uses?
>
>
C:\Program Files\Common Files\System\Mapi\1033\NT
on a different sql server the same command shows the directory:
C:\WINNT\system32
How do you set the directory which xp_cmdexec uses?My guess is that it uses the PATH environment variable. You should be able to check that from a DOS
box:
SET
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"AR" <remove_rittingAThot_mail_DOT_C_O_M> wrote in message
news:uRZPa2erDHA.3504@.TK2MSFTNGP11.phx.gbl...
> If I do xp_cmdexec 'dir' it displays the directory:
> C:\Program Files\Common Files\System\Mapi\1033\NT
> on a different sql server the same command shows the directory:
> C:\WINNT\system32
> How do you set the directory which xp_cmdexec uses?
>
>
Subscribe to:
Posts (Atom)