Error in sp_configure 'xp_cmdshell'

  • Hi i'm executing the sql query in ssms...

    exec master..xp_cmdshell 'tablediff.exe -sourceserver SQL2008R2\KILIMANJARO64 -sourcedatabase SSISDBSource -sourcetable Customer -destinationserver SQL2008R2\KILIMANJARO64 -destinationdatabase SSISDBDest -destinationtable Customer -f C:\Temp\Diff'

    but i'm getting the following error ...

    'tablediff.exe' is not recognized as an internal or external command,

    operable program or batch file.

    NULL

    what to do ...

    I have also check for tablediff

    by executing this sp_configure 'xp_cmdshell'

    xp_cmdshell 0111

    and i got this ..

    help me ...

  • You need to specify the full path of the executable, otherwise it will look in the default SQL Server file location.

    i.e exec master..xp_cmdshell '"C:\tablediff.exe".....'

  • as already said when shelling out specify the path like so

    exec xp_cmdshell '"C:\Program Files\Microsoft SQL Server\90\COM\tablediff.exe" blah'

    Alternatively go onto the server and add the path for the TABLEDIFF.EXE to the path variable, this will then negate the need to specify the path for the EXE

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Hi ... thanks for reply ... Got it ...

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply