Miant Plan -batch file execution

  • HI,

    I have one batch file which copies data from from one folder to tape drive,

    while running manualy it si wworking fine ,it is removing the data and moving into tape

    i would like to add this task after the backup of the job,so i created 1 maint plan

    and try to add the

    below comments it is not working,can anyone suggest

    Use master

    exec xp_cmdshell 'G:\MSSQL\file.bat'

    go

  • If you run the command on its own through Management Studio what message do you get?

    Facts are stubborn things, but statistics are more pliable - Mark Twain
    Carolyn
    SQLServerSpecialists[/url]

  • A few things you need to look at as long as the file runs fine when you run it.

    1. What user is the SQL server agent running as? If the tape drive is not local you will need a user that can access the tape drive.

    2. If it is running as a user log into the machine as that user and see if the script works.

    The command shell will run with the authority of calling user so you probably need to look there. Use the configuration manager to change it and this should clear it up.

    I have also found that making sure SP2 is installed as this has solved a lot of problems for me.

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

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