SQL Server Monitoring - Automating SQL Server Health Checks (SQL Server 2005 & Above)

Who is online?  88 guests and 0 members
home  »  blogs  »  Ritesh Medhe  »  SQL Server Monitoring - Automating SQL Server Health Checks (SQL Server 2005 & Above)

Training on Microsoft Products & Technologies

  Rate This Blog Entry:  register  or  login

Author

riteshmedhe Ritesh Medhe (Member since: 3/31/2011 11:34:25 AM)

View Ritesh Medhe 's profile

Comments (3)

mujahid
3/8/2012 1:28:07 PM mujahid said:

When i try to execute the procedure , it gives me an error saying

Msg 8164, Level 16, State 1, Procedure sp_get_composite_job_info, Line 72

An INSERT EXEC statement cannot be nested.

can u plz help me with this

 

by
Abdul Mohammed
3/12/2012 6:35:48 PM Abdul Mohammed said:

Ritesh,

Thanks very much. This is very handy script to monitor the servers.

Hi Mujahid,

Even i got the same error when i tried to execute the stored procedure. In order to fix that i made a change to the code while inserting the stored prodeure execution results data into a temp table and the error didnt occur again.Please see below what i have modified.

I modified this "INSERT #jobs_status EXEC msdb.dbo.sp_help_job" code with the code below and it worked.

INSERT

#jobs_status

SELECT

 

* FROM OPENROWSET

 

 

 

('SQLOLEDB','Server=(local);TRUSTED_CONNECTION=YES;','set fmtonly off EXEC msdb.dbo.sp_help_job')

Ritesh,

Please correct me if i am wrong here.

Thanks,

Abdul

 

by
Wendy
4/13/2012 11:04:28 AM Wendy said:

I am new to SQL Server - coming from DB2 Mainframe background and this was a life saver

 

Thank you so much, works perfectly for 2008 R 2

by

Leave a comment

Name:
  *  
Email:  (your email is kept secure)
 *  
Website:

example: "http://www.SQLServerGeeks.com"

 
Type the characters:
 *
 
   

Training on Microsoft Products & Technologies

Training on Microsoft Products & Technologies

Email Subscriptions

   Get the Most Recent Blogs in your inbox
Blogs RSS Feed

Ritesh Medhe's latest blog posts

Blogs RSS Feed

Latest community blog posts

  • Dear SQL Geek, SQLServerGeeks.com cordially invites you to SQL Server Day, the monthly dose of SQL Server knowledge & learning. And after successful events in Bangalore, Kolkata & Mumbai, we a...
  • Hi SQL Geeks, The Microsoft® SQL Server® 2012 Feature Pack is a collection of stand-alone packages which provide additional value for Microsoft® SQL Server® 2012. You can download the ...
  • Hi Friends, Here is an interesting function: QUOTENAME() which returns a Unicode string with the delimiters added to make the input string a valid SQL Server delimited identifier. (from Books Online) ...
  • Hi All, It is a great news to all those who use SQL Server Express editions. Microsoft has increased the database size limit of SQL Server 2008 R2 Express edition from 4GB to 10GB. Previous versions o...
  • Hello Friends, It’s been a while that I have posted any blog. So here it is- Well with the arrival of SQL Server 2000, Microsoft has introduced the concept of User Defined Function (UDF). So the...
  • Exciting news! SQL Server 2012 has released to manufacturing. Customers and partners can download an evaluation of the product today and can expect general availability to begin on April 1. Microsoft ...