Results 1 to 5 of 5

Thread: problems with xp..cmdshell

  1. #1
    Guest

    problems with xp..cmdshell

    Hi,
    As it was discussed many times on this forum my xp..cmdshell procedure doesn't run vb executable when I am trying to schedule a job.
    However it works fine thru DTS or vb executable works itself without any problem.
    I am pretty sure that all it can be solved with correctly assigning of the rights/permissions to SQLAgentCmdExec, but supprisingly when I go to Admin Tools -> User Manager for Domains, NT Account SQLAgentCmdExec is not there.

    Should I create it ( if it is not there) or it should be done differently?
    If someone has few minutes can it be written/explained what I should do in the Windows NT in order to properly assign rights/permissions to SQLAgentCmdExec.
    I am using Windowd NT authentication for SQL server;
    and SQL server authentication for SQL server agent.
    Thanks a lot,
    Andy


  2. #2
    cal Guest

    problems with xp..cmdshell (reply)

    In the SQL job properties,

    Select Operating System Command for Type
    specified the path (executable file) under the command window.

    Make sure the Owner (NT/Authentication) of this job does have permission to the your executable file.




    ------------
    at 3/12/01 12:01:13 PM

    Hi,
    As it was discussed many times on this forum my xp..cmdshell procedure doesn't run vb executable when I am trying to schedule a job.
    However it works fine thru DTS or vb executable works itself without any problem.
    I am pretty sure that all it can be solved with correctly assigning of the rights/permissions to SQLAgentCmdExec, but supprisingly when I go to Admin Tools -> User Manager for Domains, NT Account SQLAgentCmdExec is not there.

    Should I create it ( if it is not there) or it should be done differently?
    If someone has few minutes can it be written/explained what I should do in the Windows NT in order to properly assign rights/permissions to SQLAgentCmdExec.
    I am using Windowd NT authentication for SQL server;
    and SQL server authentication for SQL server agent.
    Thanks a lot,
    Andy


  3. #3
    andy Guest

    problems with xp..cmdshell (reply)

    Thanks Cal,
    here the code I use in command line of SQL job properties:
    declare @command varchar(255)
    SELECT @command="C:Mssql7BinnMyProject.exe"
    Exec ("master.dbo.xp_cmdshell '" + @command+ "'&#34

    Still it doesn't work (running for hours).
    The same code also doesn't work in query analyzer (running for hours).
    However, xp_cmdshell perform other tasks without problem ( so cannot blame xp_cmdshell for that)
    Any ideas,
    Andy




    ------------
    cal at 3/12/01 1:22:17 PM

    In the SQL job properties,

    Select Operating System Command for Type
    specified the path (executable file) under the command window.

    Make sure the Owner (NT/Authentication) of this job does have permission to the your executable file.




    ------------
    at 3/12/01 12:01:13 PM

    Hi,
    As it was discussed many times on this forum my xp..cmdshell procedure doesn't run vb executable when I am trying to schedule a job.
    However it works fine thru DTS or vb executable works itself without any problem.
    I am pretty sure that all it can be solved with correctly assigning of the rights/permissions to SQLAgentCmdExec, but supprisingly when I go to Admin Tools -> User Manager for Domains, NT Account SQLAgentCmdExec is not there.

    Should I create it ( if it is not there) or it should be done differently?
    If someone has few minutes can it be written/explained what I should do in the Windows NT in order to properly assign rights/permissions to SQLAgentCmdExec.
    I am using Windowd NT authentication for SQL server;
    and SQL server authentication for SQL server agent.
    Thanks a lot,
    Andy


  4. #4
    Kirk Guest

    problems with xp..cmdshell (reply)


    SQL xp_cmdshell needs to retain a handle on what is executed.
    It will not be able to run your VB program.

    Kirk.

    ------------
    andy at 3/12/01 2:26:06 PM

    Thanks Cal,
    here the code I use in command line of SQL job properties:
    declare @command varchar(255)
    SELECT @command="C:Mssql7BinnMyProject.exe"
    Exec ("master.dbo.xp_cmdshell '" + @command+ "'&#34

    Still it doesn't work (running for hours).
    The same code also doesn't work in query analyzer (running for hours).
    However, xp_cmdshell perform other tasks without problem ( so cannot blame xp_cmdshell for that)
    Any ideas,
    Andy




    ------------
    cal at 3/12/01 1:22:17 PM

    In the SQL job properties,

    Select Operating System Command for Type
    specified the path (executable file) under the command window.

    Make sure the Owner (NT/Authentication) of this job does have permission to the your executable file.




    ------------
    at 3/12/01 12:01:13 PM

    Hi,
    As it was discussed many times on this forum my xp..cmdshell procedure doesn't run vb executable when I am trying to schedule a job.
    However it works fine thru DTS or vb executable works itself without any problem.
    I am pretty sure that all it can be solved with correctly assigning of the rights/permissions to SQLAgentCmdExec, but supprisingly when I go to Admin Tools -> User Manager for Domains, NT Account SQLAgentCmdExec is not there.

    Should I create it ( if it is not there) or it should be done differently?
    If someone has few minutes can it be written/explained what I should do in the Windows NT in order to properly assign rights/permissions to SQLAgentCmdExec.
    I am using Windowd NT authentication for SQL server;
    and SQL server authentication for SQL server agent.
    Thanks a lot,
    Andy


  5. #5
    Markus Guest

    problems with xp..cmdshell (reply)

    Are you sure , your looking at the right place ? SQLAgentCmdExec is a LOCAL account not a domain account.
    It's usualy autocreated during setup. If this does not happen then probably the user running setup had no local admin rights. If that's the case sooner or later you will run into a lot ofother problems as well.

    Good luck
    Markus

    ------------
    at 3/12/01 12:01:13 PM

    Hi,
    As it was discussed many times on this forum my xp..cmdshell procedure doesn't run vb executable when I am trying to schedule a job.
    However it works fine thru DTS or vb executable works itself without any problem.
    I am pretty sure that all it can be solved with correctly assigning of the rights/permissions to SQLAgentCmdExec, but supprisingly when I go to Admin Tools -> User Manager for Domains, NT Account SQLAgentCmdExec is not there.

    Should I create it ( if it is not there) or it should be done differently?
    If someone has few minutes can it be written/explained what I should do in the Windows NT in order to properly assign rights/permissions to SQLAgentCmdExec.
    I am using Windowd NT authentication for SQL server;
    and SQL server authentication for SQL server agent.
    Thanks a lot,
    Andy


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •