SQL Management Pack Agent Job Unit Monitors

I am trying to utilize the SQL Agent Job Monitors included with the SQL Management Pack (page 81 of the MP guide), particularly the "Last Run Status" monitor. I have set an Override for "Generate Alerts" to True. The goal
is to have an email notification sent when any SQL Agent job fails on a specific group of computers. However, I am not familiar enough with what "Last Run Status" is actually monitoring and if it will do what I am looking for. Does this monitor
check the job status of any agent job on the target group? I tried setting up a job for it to fail, which it does fail, but it does not generate an alert. Any suggestions appreciated. Thanks.

1) For monitoring SQL server job status, you can refer to the following blog
http://blogs.technet.com/b/kevinholman/archive/2011/08/05/how-to-monitor-sql-agent-jobs-using-the-sql-management-pack-and-opsmgr.aspx
2) For troubleshoot: Make sure that your SQL agent job is discovered, you may find the discovered job under Microsoft SQL Server --> SQL Agent --> SQL agent job status. By default, the discovery is disabled and you should enabled the discovery by using
override.
Roger
Thanks. So I enabled Agent Job discovery for the systems that I want. It discovered those objects. Now, I still cannot get the alerting to work. I can see the Health State of the job change to a Warning, indicating "Last Run Status" equals Failed, but
it is not generating an alert. I set Overrides (Generates Alert = True) on a Group that included one of the job objects, nothing. I also set the same Override directly on the job object and I still do not receive an alert. Any ideas? I
noticed someone in the comments mentioned in the blog you linked, a similar issue, except with the Job Duration monitor. However, he was able to get alerts to generate by setting the Override directly on the Job object and noted that it is not a
feasible solution due to the number of jobs he wants to monitor. Again, I tried the same, but still could not get alerts. That solution would not be acceptable for me either because of the number of jobs that I would have to set individual Overrides for.

Similar Messages

  • How to create a package/sql agent job to monitor a table constantly

    I have a situation like this: there is a log table. once a while, there will be a row inserted into this log table.  What i'd like to do is to create a ssis package/sql agent job, to monitor this log table.  As soon as a new row got inserted
    into the log table, do something process it (process time might be as long as a few minutes).  Timing is quite important here.  I'd like to make sure the new row get processed as soon as it got inserted into the log table (so I don't like the ideas
    to schedule the sql agent job to run every 5 minutes, or something like that).  What is the best way to achive this?  Thanks a lot in advance!
    Tim

    Hi,
    There is one System Stored Procedure: dbo.sp_Start_job
    Which excepts values are like :-
      @job_name    sysname          = NULL,
      @job_id      UNIQUEIDENTIFIER = NULL,
      @error_flag  INT              = 1,    -- Set to 0 to suppress the error from sp_sqlagent_notify if SQLServerAgent is not running
      @server_name sysname          = NULL, -- The specific target server to start the [multi-server] job on
      @step_name   sysname          = NULL, -- The name of the job step to start execution with [for use with a local job only]
      @output_flag INT              = 1     -- Set to 0 to suppress the success message
    First Create one Trigger on your table which call above Store Procedure
    Trigger is look like below:-
    ALTER TRIGGER dbo.MyTrigger
        ON  dbo.MyTable       
        AFTER INSERT     
    AS       
        BEGIN         
            SET NOCOUNT ON;
            DECLARE @MyTableTypeTVP AS MyTableType;
            INSERT INTO @MyTableTypeTVP(job_name, job_id, @error_flag ,@server_name,@step_name,@output_flag)
            SELECT 'Your JOb Name',generate UNIQUEIDENTIFIER,1,'Localhost','Any Step if',1
            EXEC [dbo].[sp_start_job] @MyTableTypeTVP;
        END
    Thanks
    Prasad

  • SQL Management Pack - login to databases required?

    I've recently imported the SQL Management Packs (version 6.5.4.0) and discovery has been working fine - Databases are being discovered and displayed in the Databases view in the SCOM console. On one of the 2012R2 SQL servers, I noticed these errors in the
    OpsMgr Event Log (see below)
    The information that the MP needs for the Database properties (DB Free space, source log shipping, etc.) seems like it could be achieved without having to login to each individual database. Is there a reason why the SQL MP requires this type of intrusive
    mechanism for querying information? Is there a way to disable these login scripts but still obtain the information about databases?

    You can find the content of the monitoring script here
    http://systemcentercore.com/?GetElement=Microsoft.SQLServer.2012.DBSizeRawPerfProvider&Type=DataSourceModuleType&ManagementPack=Microsoft.SQLServer.2012.Monitoring&Version=6.5.1.0
    I don't have toroughly reviewed it, but if you do you'll probably find
    how it works and why it needs to log into every database.
    Now, if you do believe that you can obtain the same informations using WMI and without logging into the DBs, you'll have to disable every monitor that tries to connect into them and write your own ones...

  • SQL Management Pack - Page Life Expectancy Alert

    We have SCOM 2012 SP1 and SQL Management Pack 6.4.1.0 in our environment.   It seems that the majority of our SQL servers are reporting the Engine Page Life Expectancy error.  However when I look at the performance data, the alerts are triggering
    at random times even when according to the performance data, it is not even close to the threshold.  Even on the alert context, the value well above the threshold in most cases.  
    When I look at the monitor in the Authoring pane, the configuration states the threshold and the interval but it does not state what counter it is looking at.  Not sure if that is normal.
    I was wondering if anyone else is experiencing this issue.  I am about to disable the monitor since I am not getting consistant alerts
    Thanks!

    Please also change the critical alert to a warning through creation of an override for all of these objects.
    SQL SERVER – What is Page Life Expectancy (PLE) Counter
    http://blog.sqlauthority.com/2010/12/13/sql-server-what-is-page-life-expectancy-ple-counter/
    Niki Han
    TechNet Community Support

  • SQL Permissions for the SQL Managment Pack

    Hi,
    Were implementing version 6.5.1.0 of the SQL 2005 2008 2012 Managment pack.  Its going ok, but there is a line...
    Add “SQLDefaultAction” to the dbmodule_users database role.
    that makes no sense.  I can't see dbmodule_users as a database role.  Am i being thick?
    Chris
    Chris Gibson

    Hi Chris,
    Did you follow the SQL management pack guide downloaded here:
    http://www.microsoft.com/en-us/download/details.aspx?id=10631
    To configure runas account for SQL monitor, you may check the article below:
    http://blogs.technet.com/b/kevinholman/archive/2010/09/08/configuring-run-as-accounts-and-profiles-in-r2-a-sql-management-pack-example.aspx
    Regards,
    Yan Li
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • How to get the SQL Signon that Agent Jobs "Run As" or "Executed as User"

    How to get the SQL Signon that Agent Jobs "Run As" or "Executed as User"?
    I have an install SQL scripts that creates a Linked Server. I want to put some security on the Linked Server and only grant the Agent Job Signon (the "Run As" or "Executed as User") access to the linked server. I need to retrieve the
    Agent Job Signon (something like "NT SERVICE\SQLAgent$FIDEV360BI02").
    I could query certain jobs and SUBSTRING the Message column - using some form of the query below, which would return "Executed as user: NT SERVICE\SQLAgent$SSDEVBI02. The step succeeded." But that is pretty imprecise.
    use msdb
    SELECT [JobName] = JOB.name,
    [Step] = HIST.step_id,
    [StepName] = HIST.step_name,
    [Message] = HIST.message,
    [Status] = CASE WHEN HIST.run_status = 0 THEN 'Failed'
    WHEN HIST.run_status = 1 THEN 'Succeeded'
    WHEN HIST.run_status = 2 THEN 'Retry'
    WHEN HIST.run_status = 3 THEN 'Canceled'
    END,
    [RunDate] = HIST.run_date,
    [RunTime] = HIST.run_time,
    [Duration] = HIST.run_duration,
    [Retries] = HIST.retries_attempted
    FROM sysjobs JOB
    INNER JOIN sysjobhistory HIST ON HIST.job_id = JOB.job_id
    -- CHANGE THIS
    -- WHERE JOB.name like '%GroupMaster%' or Job.name like '%etlv%'
    ORDER BY HIST.run_date, HIST.run_time

    by default all sql jobs are executed as sql server agent account, unless otherwise a proxy is setup.
    you can get the proxy information as Olaf mentioned, if the proxy_id is null for the step, it implies that the job step was executed as sql server service account and in such case it will be null
    so, if it is null, it ran as sql server agent account.
    so, one work around is get the sql server agent service account and if the proxy is null, that means it ran as sql server agent account, so, use isnull function. the disadvantage would be if the sql server agent account was switched, you might not get the
    accurate information as the new account will show up though the job really ran as old account, to get this information, you need to  get this from the logmessage column as you mentioned above.
     try this code...
    /*from sql 2008r2 sp1, you get the service accounts using tsql,otherwise you have to query the registry keys*/
    declare @sqlserveragentaccount varchar(2000)
    select @sqlserveragentaccount= service_account
    from sys.dm_server_services
    where servicename like '%sql%server%agent%'
    select message,isnull(name,@sqlserveragentaccount) as AccountName
    from sysjobhistory a inner join sysjobsteps b
    on a.step_id=b.step_id and a.job_id=b.job_id
    left outer join sysproxies c on c.proxy_id=b.proxy_id
    Hope it Helps!!

  • SQL Server Agent Job Duration monitor alerts incorrectly

    As per SQL Server MP guide, changes in Dec 2007 update : Fixed a script that was resulting in invalid alerts being generated from the agent job's Job Duration monitor.
    In my SCOM 2012 environment on few SQL servers I'm getting an alert from Job Duration monitor for SQL jobs that have completed well within the defined thresholds. Interestingly this monitor then resets on its own(The monitor has been initialized for
    the first time or it has exited maintenance mode) and immediately turns critical again. I do not see any pattern around these state changes. These are weekly jobs, however the Job Duration monitor continues to alert for these specific jobs 10-15 times a day.
    This is creating unnecessary noise in the environment.
    Is anyone else facing this issue? I know I can disable this default monitor and create my own monitor. However I want to check if this is a known bug in this SQL MP(version 6.4.1.0).
    Note : I'm aware about an updated MP version 6.5.1.0, however the release note doesn't specify if it fixes this issue.
    Thanks,
    Harry
    Thanks, Harry :-)

    Resolution: The issue was that the SCOM Agent was getting restarted repeatedly. Post restart health calculation was done again and the SQL Job duration monitors would reset and generate new alerts.
    There is a recovery configured in an aggregate monitor to restart the SCOM Agent if Handle Count/Private Bytes of Health Service/Monitoring Host breach a set threshold. I had to create an override to change the thresholds for all Health Service/Monitoring
    Host and exclude the recovery on Physical servers.
    If there are large number of workflow on an SCOM Agent due to multiple MP(SQL, HP, etc.), the increase in Handle Count/Private Bytes is usual.
    Thanks, Harry :-)

  • SQL Server 2005 agent job runs a SSIS package ( Analysis Services Processing Task) fails

     Hi,
    SQL Server 2005 standard edition.
     I have a SSIS package which has a  Analysis Services Processing Task. I have tested the package in BIDS and it runs ok. But when I created a agent job and run it from the job it reports error:
    Code: 0xC0012024     Source: Analysis Services Processing Task      Description: The task "Analysis Services Processing Task" cannot run on this edition of Integration Services.
    It requires a higher level edition.
    This is the result of select @@version
    Microsoft SQL Server 2005 - 9.00.4035.00 (Intel X86)   Nov 24 2008 13:01:59   Copyright (c) 1988-2005 Microsoft Corporation  Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1) 
    Any idea?

     Hi,
    SQL Server 2005 standard edition.
     I have a SSIS package which has a  Analysis Services Processing Task. I have tested the package in BIDS and it runs ok. But when I created a agent job and run it from the job it reports error:
    Code: 0xC0012024     Source: Analysis Services Processing Task      Description: The task "Analysis Services Processing Task" cannot run on this edition of Integration Services. It
    requires a higher level edition.
    This is the result of select @@version
    Microsoft SQL Server 2005 - 9.00.4035.00 (Intel X86)   Nov 24 2008 13:01:59   Copyright (c) 1988-2005 Microsoft Corporation  Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1) 
    Any idea?
    Anyway, I have found a work around:
    http://technet.microsoft.com/en-us/library/ff929186.aspx

  • Do we need both management Pack and ADP  for monitoring SOA suite 11g

    Hi,
    Do we need to Both management pack and ADP (OCAMM) Application Dependancy and Performance for monitoring SOA Suite 11g.
    I was creating a monitoring template for SOA Composite and SOA Infrastructure and wanted to know if I need to install additional ( management packs, ADP and Middleware Plugins ) packs to get an effective template.

    A management pack generally refers to the set of pages in EM Grid/Cloud Control which provide functionality for a given set of target types. Since EM Grid Control 11g, the ADP functionality has been part of the Grid Control release and the pages licensed via the Management Pack Plus for SOA or the SOA Management Pack EE.
    To populate the ADP pages with data, additional steps must be performed in order to deploy an ADP manager and ADP agents. Doing this is optional, depending on whether or not you require the additional capability that those pages provide.
    ADP data, however, are collected and stored separately from the core GC/CC metrics and are not related to the monitoring template functionality.

  • Management Studio Express job activities monitoring

    Hi all
    I have a user installed management studio express, and can't view job activity monitor
    unable to execute requested.....
    any workaround......?? i don't want to install management studio( server version )

    Management studio express doest have this feature I assume and there are no shortcuts. You might need full version SSMS or else you can use evaluation edition to check this.
    http://thelonelydba.wordpress.com/2012/08/18/unable-to-open-job-activity-monitor-in-sql-2008-ssms-express/
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f71d42f8-4045-4531-b3f9-bf7949222c68/job-activity-monitor-wont-start-if-you-have-installed-sql-server-2008-ssms-basic-only?forum=sqltools
    Another option is to use T-SQL Queries to check what you need to check
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • HP Storage Management Pack Conflicts with Network Monitoring SNMP

    The HP Storage management pack that I installed requires starting the Windows SNMP services, which creates a conflict with SNMP used for SCOM network monitoring.  I am spinning up a second SCOM mangement server so I can split these functions. What would
    you recommend to split these functions across the two management servers?  Uninstall the HP Storage Management Pack, and install on the new server?  Or move the network monitoring to the second server?
    Thank you for your help!

    Does the HP Storage pack support resource pools? What I've found with these 3rd party packs that implement connector services is they do not provide true HA via SCOM resource pools - they are standalone systems with a connector service. This is true for
    the NetApp (DataONTAP) pack, and it's a huge disappointment.
    Vendors do this because they have an API, and they think the only way to implement discovery and monitoring in SCOM is to create a service that accesses the API - and then the service is basically a collector in this case, and typically has a handful of
    rules (sometimes just one rule) that scrape events on the management server and they are misinterpreted to be alerts coming from some instance.
    I turn green when I run into this type of problem, because all this can be accomplished with native modules or managed code that are designed to work very well with SCOM.
    I know this doesn't answer your question - it's more a way for me to express my distain for these type of packs.
    Jonathan Almquist | SCOMskills, LLC (http://scomskills.com)

  • GG Management Pack and third-party monitoring solutions

    Hi!
    I would like to know which third-party monitoring solutions can be integrated with the GG Management
    Pack (Director)?
    Tks
    Adelmo

    Adelmo,
    Any text log file scraping monitoring solution can key off of the ggserr.log looking for key words such as ERROR and WARNING.
    We will be releasing in the coming months OGG Monitor, which will have SNMP traps built in.
    Regards,
    -joe

  • Grant Agent Job Reader/Operator permission in SQL SERVER 2000

    Hello Experts
    Today I got a request to grant sql server agent job read access. The server is SQL 2000. It was totally new for me. I googled but couldn't find anything useful. I feel pretty uncomfortable with SQL 2000. Have never worked before. Please help.
    Thanks alot in advance

    Hi Prasant,
    If you grant a user read access to SQL Server 2000 agent jobs by adding the user to TargetServersRole role in msdb, please note that TargetServerRole is available from SQL Server 2000 Service Pack 3. Prior to SQL Server 2000 SP3 the user must be added to the
    sysadmin group in order to view the jobs that are owned by sysadmin group.
    Besides, if you need to grant a user permission to create/modify/delete jobs in SQL Server 2000, then the user must be added as a member of the sysadmin role.
    Reference:
    How to allow access to non sysadmin users to view status of sysadmin owned scheduled jobs?
    Thanks,
    Lydia Zhang

  • SQL Cluster Management Pack

    Hello,
    I do not see a specific Management Pack for SQL Cluster... It seems to be the SQL Management Pack 6.1.400.0 and the Operating System Cluster Management Pack...6.0.6720.0 for Windows Server 2008 Cluster Management Library ...
    Am I right?
    Thanks,
    Dom
    System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 / Forefront Client Security / Forefront Identity Manager

    I implemented the low-privilege setup from the SQL MP guide because on a few standalone SQL instances and one SQL 2012 cluster, not all scripts were running.  The SQL cluster is a two node cluster with 2 SQL instances in and active/active config (One
    instance is active on each node in the cluster).  On the standalone SQL instances, the low-privilege setup is working great.  On the SQL cluster it is not.  Reading the latest SQL MP guide, it appears that SQL 2012 cluster are supported for
    monitoring.  I've made the additional configuration changes that the MP guide says is required for cluster monitoring.  I am getting PowerShell script execution error messages in the OpsMgr console stating a lack of permissions.  When I look
    at the SQL error logs, I see that something is trying to log into the databases as NT AUTHORITY\SYSTEM and can't because access is denied.  That login is not mapped to any databases - obviously.  Why would these workflows be trying to execute as
    NT AUTHORITY\SYSTEM and not one of the the action accounts in the SQL RunAs profiles that I've setup and deployed to the two cluster nodes? 

  • AlwaysOn Management Pack not functioning - SCOM 2007R2

    Hi all
    I am a DBA but am new to SCOM and have been trying to get the AlwaysOn Management pack to work.  I manually installed some agents on the 2 boxes I want to manage and can see they are being monitored in the inventory.
    The management pack was already pre-installed by another employee but when I looked into the Administration > Management Packs and clicked on Import I could see that for that particular pack the AlwaysOn features were not installed.  Thinking this
    was the reason why it was not working I installed them.
    I can now see when I go to Discovered Inventory and Change Target Type the AlwaysOn components however they are not monitoring anything.  The only one with an entry is the AlwaysOn seed which shows the 2 boxes, but in a not monitored state.
    Does anyone have any suggestions about how to get this to work?
    Many thanks

    Hi
    SQL needs Run As Accounts and Profiles configuring:
    http://blogs.technet.com/b/kevinholman/archive/2010/09/08/configuring-run-as-accounts-and-profiles-in-r2-a-sql-management-pack-example.aspx
    Is the SQL DBEngine discovered and do you see discovered databases on the server. I suspect you do as it seems to have discovered the Always On components but just want to check.
    Also have you enabled the Agent Proxy setting - Admininstration, Agent Managed, double click - security tab.
    Have you run through page 43 onwards from the guide:
    http://www.microsoft.com/en-us/download/details.aspx?id=10631
    Cheers
    Graham
    Regards Graham New System Center 2012 Blog! -
    http://www.systemcentersolutions.co.uk
    View OpsMgr tips and tricks at
    http://systemcentersolutions.wordpress.com/

Maybe you are looking for

  • How do I "REPLACE" photos in a timeline?

    Is there a way to "replace" photos that are currently in a timeline (in iMovie 06)? I looks like I only have the option to delete a current photo in the timeline and the replace it with the new one that I want to put in. There must be some sort of "r

  • Install jdev11g version 11.1.1.1.0 in solaris

    hi, my environment is opensolaris. the Installation of jdev 11.1.1.1.0 run perfect but when i open jdev give me this error: Log File: /export/home/mvt/.jdeveloper/system11.1.1.1.33.54.07/o.j2ee.adrs/CreateDefaultDomain.log Label: JDEVADF_11.1.1.1.0_G

  • Make Firefox open URLs passed from external applications in new tabs

    I upgraded Firefox (Mac) from 3.6.13 to 3.6.14 yesterday. Since then Firefox does not respond to URLs passed from external applications, as it has always done. The external apps pass the URL, FireFox is brought to the front, but no Tab (or new window

  • Error message when landline trys to call my iPhone

    My mom has been trying to call me for months since I got my phone. I can call her just fine, but she can't get through to me. It gives her an error message that says, "Invalid number or code, please input the number or code again". I really need my m

  • Unable to read ITResource details using Platform class

    Hi, When I try to read the ITResource parameters using Platform class, it says ITResource does not exist, code below: tcITResourceInstanceOperationsIntf itTResourceOperationsIntf=Platform.getService(tcITResourceInstanceOperationsIntf.class); Hashtabl