Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL agent job hanging for a long time


SQL agent job hanging for a long time

Author
Message
Ryan007
Ryan007
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1616 Visits: 1595
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//
shen-dest
shen-dest
SSC Veteran
SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)

Group: General Forum Members
Points: 246 Visits: 409
hi,
when job is executing, is there any blocking and what is the lastwaittype for that spid?

Regards,
MShenel
Ryan007
Ryan007
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1616 Visits: 1595
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//
Renuka__
Renuka__
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1024 Visits: 1370
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.

Renuka__
Ryan007
Ryan007
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1616 Visits: 1595
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//
Ananda-292708
Ananda-292708
Valued Member
Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)

Group: General Forum Members
Points: 69 Visits: 354
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
Ryan007
Ryan007
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1616 Visits: 1595
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//
subahan.munthamadugu
subahan.munthamadugu
Grasshopper
Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)

Group: General Forum Members
Points: 22 Visits: 73
Hi all,

what is RAM size(physical memory) and check currently how much physical memory is taking for running
sql server ( use task manager).
durai nagarajan
durai nagarajan
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1107 Visits: 2771
This is a 3 year old thread please dont post on this.

Regards
Durai Nagarajan
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search