SQL Job, .BAT file and progress status

  • Hi All,

    I have one SQL Job, which executing one .BAT file, when I am running this SQL job it keep going on, however as per my target it should not take more than 1 minute.

    Now I want to see progress with .BAT file, problem here how I can see what running from .BAT side.

    Appreciate for your quick response.

    Thanks.

  • that's a tough one, since the bat could be doing anything, and it's outside of SQL server.

    you could open up Task Manager on the server, but the real question is what is the bat file doing? if it calls an application, and the application renders a gui, or raises a popup/confirm, it would hang forever.

    we could probably identify the issue if you show us what the bat file is doing.

    also there might be more than one way to do what the bat file is doing, so we might offer suggestions.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Well .BAT file copying files from one folder to other folder using robocopy command utility

  • wwwnlc111 (5/7/2016)


    Well .BAT file copying files from one folder to other folder using robocopy command utility

    are you saying that the SQL agent job fails or is just slow?

    could be a permissions issues on the folders......when you run it manually your credentials are used but when it runs automatically by SQL Agent, the agent's credentials and permissions are used.

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • Manually it is working perfectly fine, actually my destination is network shared location , even SQL job working perfectly fine as destination local driver but with network location keep running and not able to see what's wrong

  • wwwnlc111 (5/7/2016)


    Manually it is working perfectly fine, actually my destination is network shared location , even SQL job working perfectly fine as destination local driver but with network location keep running and not able to see what's wrong

    so have you confirmed and verified that SQL agent has permissions on your network folder?

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

Viewing 6 posts - 1 through 5 (of 5 total)

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