At job not being scheduled throug SSIS

  • The snapshot of script is as follows

    echo C:\winnt\system32\at %dumpt4% %batchfile% >> %logfile%

    C:\winnt\system32\at %dumpt4% %batchfile%

    IF ERRORLEVEL 1 echo Error in AT_TSM_ARCHIVE_BACKUP.bat Unable to create AT Job (unable to get time) >> %logfile%

    when script is executed from command prompt it works fine but when executed from SQL using xp_cmdshell the script is not able to schedule the job. I have used AT command for scheduling purpose.

    Please help me ,is there any where we need to modify

    This is running through a scheduled job.Once the backup is taken into harddisk ,it has to move to tape after 5 minutes

    However backup is happening but the files are not moving into tape.when we execute the batch file manualy,it is moving to tape

  • does the account sql is running under have access to create at jobs?

    Try running the cmd file from a sql agent job with an server administrator proxy instead of using xp_Cmdshell. That will probably work for you.

  • yes,this account is running with admin rights,login is having sys admin rights

  • whil3 executing manulay all the backusp are moving to tape.when i execute the job ,it take only the backup to harddisk,but not moving the backed up db to tape.code is perfect.as when i run manualy it moves to tape ic an see that

  • did you try running it through an agent job with a proxy account? I'd personally go this way. You'll get more logging, notification and control this way.

    And you won't have to deal with figuring out permissions etc.

  • hi,

    could you please let me know how to do that ,i have not worked on that

    please give me the code some guidence

  • here what i did is i created an ssis package and it will do backup and tsm,till backup it is working ,tsm part is working manualy executing .what i want is it has to execute automaticaly once the job completes

    If you can guide me how to create a proxy and how to enable that

  • First create a credential

    http://msdn.microsoft.com/en-us/library/ms190703(SQL.90).aspx

    Then create a proxy

    http://msdn.microsoft.com/en-us/library/ms190698(SQL.90).aspx

    Then create a CMDEXEC agent job to run your cmd file and schedule it according to your schedule

    http://msdn.microsoft.com/en-us/library/ms190264(SQL.90).aspx

    Note - once you have the job created, you can run this job through a maintenance plan as a "Execute SQL Server Agent Job Task"

    I do something similar to copy backups to another server. Do a backup task and "On success" execute the agent job task you created to run the cmd script.

Viewing 8 posts - 1 through 7 (of 7 total)

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