SQL agent job hanging for a long time

  • Hi,

    I have created an agent job in SQL server 2008 but it is getting hanged when executing.

    It is backup job which is running the below command

    BACKUP DATABASE master TO DISK = 'E:\MSSQL10.INSTANCE_02\BACKUP\SystemDB\master.bak'

    WITH NOFORMAT, NOINIT, NAME = N'System databases- Full Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10

    It shows executing and does not give any error. The job owner is sa. But whent excuting the same T-sql command in query window, it executes successfulle and creates the backups.

    Do you have any idea on this?

    Ryan
    //All our dreams can come true, if we have the courage to pursue them//

  • hi,

    when job is executing, is there any blocking and what is the lastwaittype for that spid?

    Regards,
    MShenel

  • Hi,

    There is no blocking when the job is executing.

    Ryan
    //All our dreams can come true, if we have the courage to pursue them//

  • Hi,

    Configure an output file and see if anything gets logged when the job runs the Backup ( like 'Job started at ...').

    Create a dummy step before the backup step with some select query and to output the result to a file and see if that gets executed.

    This is to check if the job execution is reaching the point of executing the Backup command.

    [font="Verdana"]Renuka__[/font]

  • Hi,

    I have run SQL server profiler and dont find anything. Any idea if it is the problem with the permission?

    No blocking and active transactions found.

    Ryan
    //All our dreams can come true, if we have the courage to pursue them//

  • create a batch file and then try calling it in the job

    SQLCMD -S srv -U usr -P pwd -Q "BACKUP DATABASE master TO DISK = 'E:\MSSQL10.INSTANCE_02\BACKUP\SystemDB\master.bak'

    WITH NOFORMAT, NOINIT, NAME = N'System databases- Full Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 " >> c:\111bkp.log

  • I got the answer. My SQL server agent was down though it was showing running state. I restarted the agent and it worked fine.

    Ryan
    //All our dreams can come true, if we have the courage to pursue them//

  • Hi all,

    what is RAM size(physical memory) and check currently how much physical memory is taking for running

    sql server ( use task manager).

  • This is a 3 year old thread please dont post on this.

    Regards
    Durai Nagarajan

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

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