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


SQL Overview IV - DBA's Morning Review


SQL Overview IV - DBA's Morning Review

Author
Message
David Bird
David Bird
Old Hand
Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)

Group: General Forum Members
Points: 385 Visits: 1201
Comments posted to this topic are about the item SQL Overview IV - DBA's Morning Review

David Bird

My PC Quick Reference Guide
SuperDBA-207096
SuperDBA-207096
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1737 Visits: 711
Pretty good article and code... Well done!
Anipaul
Anipaul
SSCertifiable
SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)

Group: General Forum Members
Points: 6813 Visits: 1407
Excellent article. Thanks for the resources provided in the end. Smile



Igor Santos
Igor Santos
SSC Rookie
SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)

Group: General Forum Members
Points: 30 Visits: 245
The zip files seems to be unavailable.
Dugi
Dugi
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1730 Visits: 3511
Very nice article Cool

============================================================
SELECT YOUR PROBLEM FROM SSC.com WHERE PROBLEM DESCRIPTION =
http://www.sqlservercentral.com/articles/Best+Practices/61537/
David Bird
David Bird
Old Hand
Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)

Group: General Forum Members
Points: 385 Visits: 1201
Download the zip package under the Resources heading.

The one under Additional Resources does not work. Sorry

David Bird

My PC Quick Reference Guide
ephremm
ephremm
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 145
I was wondering what do you suggest for monitoring SQL job that are hanging or running non stop?
David Bird
David Bird
Old Hand
Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)

Group: General Forum Members
Points: 385 Visits: 1201
That problem has bitten me more a than a few times. I have yet to develop an approach to handle all jobs. For database backups, missing a backup could be caused by the job hanging. You would be notified of missing backups using the reports in this article.

For a specific job, I have used the following SQL in a job on the job's instance to check if the job has finished within the last day.


IF NOT EXISTS
(select 1

from msdb.dbo.sysjobhistory jh inner join msdb.dbo.sysjobs j on j.job_id = jh.job_id
where DATEADD (ss, (jh.run_duration/10000 * 3600) +
(jh.run_duration/100 %100 * 60) +
jh.run_duration %100, +
CAST(CAST(jh.run_date AS char(8)) + ' ' + -- Convert run_date to DateTime data type
STUFF(STUFF( -- Insert : into Time
RIGHT('000000' + -- Add leading Zeros
CAST(jh.run_time AS varchar(6)) ,6) , 3, 0, ':'), 6, 0, ':') AS datetime) )
> dateadd (dd,-1,getdate())

and j.name = 'DBA-Job that sometimes Hangs'
and jh.step_id = 0
)
BEGIN
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'Default',
@recipients = 'me@company.com',
@subject = '*** ALERT - Archive SPT Logs Not Finished ****',
@body = 'Check SERVER and see why the job DBA-Job has not finished' ;

END



To monitor all jobs for this type of problem is a goal of mine that I have yet to tackle.

David Bird

My PC Quick Reference Guide
wyfccc
wyfccc
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 147
great article!
But, I think some other points might need to be monitor,
for example, cpu usage, disk io, etc..; system event log, cluster log, etc..;
DB file growth, table space growth, etc..;
duration growthof jobs, index usage, health of data buffer, etc..

In addition, we can cycle errlog when finding errlog size is too big,
we can use logparser to filter the errorlog that is old history date before two days, to increase the ERRORLOG reading performance.
David Bird
David Bird
Old Hand
Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)

Group: General Forum Members
Points: 385 Visits: 1201
Wyfccc thanks for some great ideas.

I will looking into the Log Parser tool but if its executable needs to be on each server. It may not be worth using on all servers.

David Bird

My PC Quick Reference Guide
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