Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL agent job hanging for a long time Expand / Collapse
Author
Message
Posted Monday, April 19, 2010 6:24 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, February 13, 2014 8:13 AM
Points: 1,588, Visits: 1,556
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//
Post #905895
Posted Monday, April 19, 2010 7:19 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, December 14, 2012 2:23 AM
Points: 244, Visits: 409
hi,
when job is executing, is there any blocking and what is the lastwaittype for that spid?


Regards,
MShenel
Post #905952
Posted Monday, April 19, 2010 7:25 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, February 13, 2014 8:13 AM
Points: 1,588, Visits: 1,556
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//
Post #905960
Posted Monday, April 19, 2010 7:35 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, April 07, 2014 5:31 AM
Points: 1,012, Visits: 1,315
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__
Post #905969
Posted Tuesday, April 20, 2010 2:57 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, February 13, 2014 8:13 AM
Points: 1,588, Visits: 1,556
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//
Post #906640
Posted Tuesday, April 20, 2010 4:34 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, March 12, 2014 2:32 AM
Points: 65, 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

Post #906696
Posted Tuesday, April 20, 2010 8:48 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, February 13, 2014 8:13 AM
Points: 1,588, Visits: 1,556
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//
Post #906910
Posted Friday, August 02, 2013 2:48 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, February 13, 2014 10:06 PM
Points: 16, 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).
Post #1480299
Posted Friday, August 02, 2013 2:52 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, March 19, 2014 5:48 AM
Points: 1,048, Visits: 2,646
This is a 3 year old thread please dont post on this.

Regards
Durai Nagarajan
Post #1480303
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse