SQL MP Job Last Run Status Monitor doesn't alert

Hi Guys,
Last run Status Monitor in SQL MP that checks the last run status of agent jobs and generates alerts is not generating any alerts in SCOM. Although we had overrided the monitor to trigger the alerts.
Jobs are discovered under SQL agent Job state view and state changes to warning as well but no alerts at all.
Please guide.
Regards,
Daya Ram

Hi!
Enable "Generates Alert" by override.
Set "Alert On State" to "The monitor is in a warning health state" by override.
Optionally change the "Alert severity" so that it matches the health state.
Set "Auto-Resolve Alert" to true by override.
Cheers,
Patrick
Please remember to click “Mark as Answer” on the post that helped you.
Patrick Seidl (System Center and Private Cloud)
Website: http://www.syliance.com
Blog: http://www.systemcenterrocks.com

Similar Messages

  • Last Run status of Report is not showing in Infoview

    Post Author: mega-bo
    CA Forum: Authentication
    Hey,
    Infoview is not showing the Last Run status of the Report. It is always showing 'Never Run' as a status.
    Any idea how to get the Last Run info?
    Cheers!

    Post Author: TAZ
    CA Forum: Authentication
    I believe this setting is a bit misleading, last run doesn't mean the last time you accessed the reoprt or ran on - demand. It's used for the last time you scheduled a report. If you schedule the report to run now and then check back after it was run the date should change.
    Regards,
    Tim

  • Jobs with running status in OEM while it was already finished

    Hi
    We have rebooted our server and all the jobs which are suppose to run some scripts in the server are showing running state for more than 16hours now! checking the scripts logs it was successfully executed and finished. When trying to delete the running jobs and schedule a new one it refuses to stop (although its not even running in reality). What can we do to clear this running status and let oem to schedule new ones? or how can we resolve this situation?
    We are running Enterprise manager 10g
    Swaid

    Hi Jozsef,
    I've tried to follow the instructions in that Metalink note and the job seems to be deleted from mgmt_job table as well as the executions for that job in mgmt_job_execution; but still everything is hanging and when i checked in the EM page it still shows the job in running state! how can I clean it? and why is it hanging in the first place?
    I've looked into the agent trace and its not getting updated since the problem has started and here is a bit of the last messages we have in the trace:
    2009-04-17 12:05:09 Thread-2413 ERROR http: secondary header = Host, value = snmsmaster:3938
    2009-04-17 12:05:09 Thread-2413 ERROR http: secondary header = Connection, value = Keep-Alive, TE
    2009-04-17 12:05:09 Thread-2413 ERROR http: secondary header = TE, value = trailers, deflate, gzip, compress
    2009-04-17 12:05:09 Thread-2413 ERROR http: secondary header = User-Agent, value = RPT-HTTPClient/0.3-3
    2009-04-17 12:05:09 Thread-2413 ERROR http: secondary header = Accept-Encoding, value = gzip, x-gzip, compress, x-compress
    2009-04-17 12:05:09 Thread-2413 ERROR http: secondary header = Content-type, value = application/octet-stream
    2009-04-17 12:05:09 Thread-2413 ERROR http: secondary header = Content-length, value = 593
    2009-04-17 12:05:09 Thread-2413 ERROR http: --- Error context dump end for incoming request ---
    The emoms trace is getting updated with some repeated error messages that looks like below:
    2009-04-18 15:56:57,114 [HealthMonitor] ERROR em.jobs pingPastDue.604 - Job step continuing
    2009-04-18 15:57:13,362 [HealthMonitor] ERROR emd.main run.291 - HealthMonitor : Found errant task : TaskRegn:ID3440,Callback:class oracle.sysman.emdrep.jobs.JobWorker,Iterative:true,Duration:900,DueTime:1240059433359
    2009-04-18 15:57:13,363 [HealthMonitor] ERROR em.jobs pingPastDue.602 - Entry - 15 Minute timeout error for jobstep:Stepname: Command
    Commandname: remoteOp
    Commandtype: Short-Running
    StepId: 97914
    jobIdStr: 679733b18b7a5698e04400144fa10220
    executionIdStr: 67bd0ff86c9b4268e04400144fa10220
    iterateParam: null
    iterateParamIndex: -1
    Swaid

  • Sql Server Agent last run duration in minutes

    Hello Forum Members,
    Can you please advise me on this:
    There are 5 sqlagent jobs and they run many times in a day ranging from 10 seconds to 1 hour. I would like to know the duration of run in minutes during their last run.
    Kind Regards,
    Sqlquery9

    Hi
    This isn't as easy as it should be due to the job duration in sysjobhistory being stored as an INT, so you need to extract the hours,mins,seconds and add them together. 
    Here's an example:
    SELECT rec_job.job_name,
    run_duration/10000 hrs, --hrs
    run_duration/100%100 mins, --mins
    run_duration%100 secs, --secs,
    ((run_duration/10000) * 60 ) +
    (run_duration/100%100) +
    (CASE when run_duration%100 > 29
    THEN 1
    ELSE 0
    end) Total_mins ---total mins
    FROM msdb.dbo.sysjobhistory jh
    INNER JOIN ( select j.job_id, MAX(h.instance_id) instance_id, MAX(j.name) job_name
    FROM msdb.dbo.sysjobhistory h
    INNER JOIN msdb.dbo.sysjobs j on h.job_id = j.job_id
    WHERE step_id = 0 --overall outcome
    AND j.name IN
    ( 'Job Name 1',
    'Job Name 2',
    'Job Name 3',
    'Job Name 4',
    'Job Name 5')
    GROUP BY j.job_id
    ) rec_job ON rec_job.instance_id = jh.instance_id
    The code above assume that any duration of 30secs or over will be counted as one minute, you can fill in the job names that you're interested in.

  • Ping Status Monitor doesn't create any alert

    Hello,
    for Windows Server you have the Ping Status Monitor testing connection to the servers. We have the problem, that if a server is not reachable the alert does not occure. We test it with one server - disebled the network card and the monitor does not alert.
    If I ping the server from the scom console it fails but status view and state change are still green.
    Is there something wrong with the monitor?

    Hi,
    Ping Status Monitor
    This monitor pings a agentless computer using an ICMP ping. If the computer is agent-managed, it ping itself locally.
    Please try to enable the Monitor Computer Not Reachable and
    Health Service Heartbeat Failure.
    For more information, please review the link below:
    How Heartbeats Work in Operations Manager
    http://technet.microsoft.com/en-us/library/hh212798.aspx
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • 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

  • How to Run SSIS Package through SQL AGENT Job

    I am good with SSIS, I created a package which will load the excel files to SQL SERVER  tables. To Implement this I wrote the C# code to extract the first sheet name only, and then
    package will load the data present the first sheet only. The package working fine when i run this through BIDS. But the same package throwing error at C# code step when i am running this package through SQL AGENT JOB. When i searched for this, i have seen
    many posts saying that, this is happening becoz of using Microsoft.interop.excel references inside the c# code. Please help me with this. Is there any alternate way in c# to extract the first sheet name(not based on ascending order) of an excel file with out
    using interop. Or
    How to configure SQL AGENT job to run suceessfully when using interop inside the code.
    My UAT server is of 64 bit. And i have to run this in the same server.
    I tried creating  "Desktop" folder in "C:\Windows\System32\config\systemprofile\"
    Error:Description: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.     at ST_ecfa668f250a45e18c95639c9ffd64d4.csproj.ScriptMain.Main()
        --- End of inner exception stack trace ---     at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)    
    at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)     at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr,
    Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)     at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)     at
    System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)     at System.Type.InvokeMember(String name, BindingFlags
    invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)     at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()  End Error  Error: 2015-02-27 11:24:00.23     Code: 0x00000001
        Source: User Mail      Description: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: A network-related or instance-specific error
    occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could
    not open a connection to SQL Server)     at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
        at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
        at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)     at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
    host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)     at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString
    connectionOptions, String newPassword, Boolean redirectedUserInstance)     at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword,
    SqlConnection owningObject, Boolean redirectedUserInstance)     at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)  
      at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)     at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owning...
     The package execution fa...  The step failed
    using System;
    using System.Data;
    using System.Diagnostics;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    using System.Data.OleDb;
    using Microsoft.Office.Interop;
    using System.Runtime.InteropServices;
    namespace ST_ecfa668f250a45e18c95639c9ffd64d4.csproj
    [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
    public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
    #region VSTA generated code
    enum ScriptResults
    Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
    Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
    #endregion
    public void Main()
    { /*Passing the file path via User::File_Name Variable*/
    string FileName = Dts.Variables["User::File_Name"].Value.ToString();
    Microsoft.Office.Interop.Excel.Application xlApp = null;
    Microsoft.Office.Interop.Excel.Workbook excelBook = null;
    try
    xlApp = new Microsoft.Office.Interop.Excel.Application();
    excelBook = xlApp.Workbooks.Open(FileName, Type.Missing,
    Type.Missing, Type.Missing, Type.Missing,
    Type.Missing, Type.Missing, Type.Missing, Type.Missing,
    Type.Missing, Type.Missing, Type.Missing, Type.Missing,
    Type.Missing, Type.Missing);
    string[] excelSheets = new string[excelBook.Worksheets.Count];
    int i = 0;
    foreach (Microsoft.Office.Interop.Excel.Worksheet wSheet in excelBook.Worksheets)
    excelSheets[i] = wSheet.Name;
    i++;
    Dts.Variables["User::WorkSheetName"].Value = excelSheets[0] + "$";
    catch (Exception ex)
    excelBook.Close(false, FileName, null);
    Marshal.ReleaseComObject(excelBook);
    string error = ex.Message;
    finally
    excelBook.Close(false, FileName, null);
    Marshal.ReleaseComObject(excelBook);
    Dts.TaskResult = (int)ScriptResults.Success;

    I installed office in my machine...but this doesn't solved my problem...
    Finally i figured out the solution for this and it is working now, Here is the solution...!
    Create the folder with name "Desktop" inside the below mentioned path
    C:\Windows\SysWOW64\config\systemprofile\   
    But i really don't understand the logic behind this. Can someone explain it pls....

  • SQL agent job status

    In my SQL server stored procedure I need to check if a sql agent job is running or not. If Not running then start it immediately, and if it's already running then do nothing.
    Could you send me some neat and trustworthy script to achieve this? Thanks.
    FYI - I use SQL Server 2014
    Thanks & Regards, <br/> <b>Please do "Mark As Answer" if this helps you.</b>

    Try this:
    DECLARE @JOB_NAME SYSNAME = N'Daily update of indexes & statistics';
    IF NOT EXISTS(
    select 1
    from msdb.dbo.sysjobs_view job
    inner join msdb.dbo.sysjobactivity activity on job.job_id = activity.job_id
    where
    activity.run_Requested_date is not null
    and activity.stop_execution_date is null
    and job.name = @JOB_NAME
    BEGIN
    PRINT 'Starting job ''' + @JOB_NAME + '''';
    EXEC msdb.dbo.sp_start_job @JOB_NAME;
    END
    ELSE
    BEGIN
    PRINT 'Job ''' + @JOB_NAME + ''' is already started ';
    END
    Source:
    http://gallery.technet.microsoft.com/scriptcenter/Check-if-a-SQL-Server-75b889b4
    If this post answers your query, please click "Mark As Answer" or "Vote as Helpful".

  • Prime Infrastructure 2.1 Can I make a report on the run status of jobs?

    To be more specific. I want a report mailed telling the Last Run Status of a Configuration Archive job

    Hi Edwin,
    unfortunately , I don't see this option available in PI at the moment.
    Thanks-
    Afroz

  • How to pass parameters to sql agent job run configured ssis package

    Hi all,
    I have a big problem at my small project.
    I build my SSIS package that get its variables values from a configuration file..
    and when i build a SQL agent job to run this package in a schedule i set the values of variables in it .. but in run-time the package still get its parameters from the configuration file !??
    any help please ?

    >SQL agent job to run this package in a schedule i set the values of variables in it
    One way, setup a configuration table for the package. Let the package read the values for the variables from there.
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Cisco Prime 2.0 - System-Defined Jobs keep running

    Hi PI Experts,
    The following two jobs keep running for two weeks. Is it normal?
    They are under Job Dashboard -> System-Defined.
    Not sure what are they for. Cannot find them with google.
    Is there any way to stop them from running if it's not normal?
    SAM_Poller_22_15_GETVPNPoller_-253935627
    PollerJob
    In-Progress
    Running
    2014-02-13 12:12
    SAM_Poller_22_15_GETVPNPoller_961682338
    PollerJob
    In-Progress
    Running
    2014-02-11 12:10
    Thanks
    Cedar

    My 2.0 box has 4 SAM_Poller Jobs all of which have a Last Run status of Success
    SAM_Poller_700_15_CPU_622922702
    SAM_Poller_700_15_DVAVAILABILITY_2064595572
    SAM_Poller_700_15_ENVTEMP_-477657161   
    SAM_Poller_700_15_MEMORY_-1199548056
    The names of mine indicate Memory, Envmonitoring, CPU and Availability-
    By the looks of the names on your two processes that aren't finishing it appears they have something to do with VPN.
    This raises the question: are you monitoring any devices that are VPN capable?  If no, perhaps you could disable that functionality on the monitored device...

  • Management Studio Crashing When Adding SSIS Step to SQL Agent Job

    Hi
    I am running Windows Server 2012, SQL Server 2012 SP2 CU2, SQL Server Management Studio 2012 and Visual Studio 2012.
    I have existing SQL Agent Jobs that run SSIS packages and they all currently work. However, if I try to edit them or add a new job that uses a SSIS package Management Studio will crash.  I was having this problem a couple weeks ago when I was still
    on SQL Server 2012 SP1 CU9, so I updated to SQL Server 2012 SP2 CU2 and the problem went away for a couple weeks and I was able to add new SQL Agent jobs that run SSIS packages.  But now it issue is back and there are no new updates to try and fix it.
    Has anyone seen this before and found a reliable fix to it?
    Steps to cause crash:
    1) Open new SQL Agent Job
    2) Select Steps and add a New Step
    4) Change the job type to SQL Server Integration Services Package.
    5) SSMS Crashes
    Error Message Below:
    ===================================
    The type initializer for '<Module>' threw an exception. (SqlManagerUI)
    Program Location:
       at Microsoft.SqlServer.Management.SqlManagerUI.DTSJobSubSystemDefinition.Microsoft.SqlServer.Management.SqlManagerUI.IJobStepPropertiesControl.Load(JobStepData data)
       at Microsoft.SqlServer.Management.SqlManagerUI.JobStepProperties.UpdateJobStep()
       at Microsoft.SqlServer.Management.SqlManagerUI.JobStepProperties.typeList_SelectedIndexChanged(Object sender, EventArgs e)
       at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
       at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
       at System.Windows.Forms.ComboBox.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m)
       at System.Windows.Forms.Control.WmCommand(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.UserControl.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
       at System.Windows.Forms.Control.DefWndProc(Message& m)
       at System.Windows.Forms.Control.WmCommand(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ComboBox.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.RunDialog(Form form)
       at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
       at System.Windows.Forms.Form.ShowDialog()
       at Microsoft.SqlServer.Management.SqlManagerUI.JobSteps.newJobStep_Click(Object sender, EventArgs e)
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.RunDialog(Form form)
       at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
       at System.Windows.Forms.Form.ShowDialog()
       at Microsoft.SqlServer.Management.SqlMgmt.RunningFormsTable.RunningFormsTableImpl.ThreadStarter.StartThread()
    ===================================
    The C++ module failed to load.
     (DTEParseMgd)
    Program Location:
       at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* )
       at .cctor()
    ===================================
    Index was outside the bounds of the array. (DTEParseMgd)
    Program Location:
       at _getFiberPtrId()
       at <CrtImplementationDetails>.LanguageSupport._Initialize(LanguageSupport* )
       at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* )
    Thanks,
    Anthony

    I ended up being able to work around this without having to recreate everything on a Windows Server 2008 R2. I did this by setting up an azure point to site VPN from
    my computer to the Windows Server 2012 hosted on azure.  I was then able to connect SSMS from my computer to the Azure VM allowing me to create and edit new SQL Agent jobs that run SSIS packages. Here are the steps to do this
    1) Connect to the VPN from another machine besides the server.
    2) Open SSMS using the runas.exe command with the Domain\User Name of a Windows account on the server.
    - Ex. Runas.exe /netonly /user:DOMAIN\USER "C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe"
    2) Connect to the VM's Database Engine using its internal IP address and the port that SQL Server is listening on (default is 1433) and a SQL Login
    setup on the server.
    -Ex IP, 10.0.0.1,1433
    3) Create a new job with the type SQL Server Integration
    Services Package. Select the package source (SSIS Catalog). I could not get the server to be automatically discovered here so enter the server’s internal IP address and select the package you want to run.
    4) Right click the new SQL Agent Job and choose Script Job As, CREATE To, New Query Window. This is the script to create the
    SQL Agent Job and it needs to be edited to contain the Name of the server on the internal IP address that was used earlier.
    5) Edit the @command= line of the script to use the server name. Change the highlighted part below to the server name.
    - Ex . @command=N'/ISSERVER "\"\SSISDB\PACKAGELOCATION\"" /SERVER
    "\"10.0.0.1\"" /Par "\"$ServerOption::LOGGING_LEVEL(Int16)\"";1 /Par "\"$ServerOption::SYNCHRONIZED(Boolean)\"";True /CALLERINFO SQLAGENT /REPORTING E',
                - Change to this
                            - @command=N'/ISSERVER "\"\SSISDB\PACKAGELOCATION\""
    /SERVER SERVERNAME /Par "\"$ServerOption::LOGGING_LEVEL(Int16)\"";1 /Par "\"$ServerOption::SYNCHRONIZED(Boolean)\"";True /CALLERINFO SQLAGENT /REPORTING E',
    6) Now change the name of the package in the script and run it. Now the new package can be edited in the GUI to change things like the schedule and alerts. Also you
    can edit any existing packages.

  • Help finding the SQL agent job status messages

    I am building a report in SSRS which will show the status of all the SQL agent jobs ran on a particular day. IMHO, the status messages created in the job history are not that useful. So, I would like to show the status message which can found by following
    the path given below:
    Integration Services Catalog -> SSISDB -> Solution Name -> Projects -> Project Name -> Packages -> Right click Package Name-> Reports -> Standard Reports -> All Executions -> Click on All Messages
    If you follow the exact path, we find out the exact error related to last unsuccessful execution of the job.
    Can someone please tell me how to find it?
    The message from [msdb].[dbo].[sysjobhistory] is not helpful for me.

    Thank you all for your help. After taking cues from what you guys said..I have come up with this:
    USE [msdb]
    GO
    /****** Object:  StoredProcedure [dbo].[SQL_Agent_Jobs_Details]    Script Date: 3/24/2015 4:02:09 PM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[SQL_Agent_Jobs_Details](@JobName varchar(5000)
    ,@LastRunDate nvarchar(20)
    ,@LastRunStatus varchar(50)
    AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;
    DECLARE @SQL VARCHAR(8000)
    DECLARE @NewLastRunStatus INT
        -- Insert statements for procedure here
    SET @NewLastRunStatus = (SELECT CASE @LastRunStatus 
    WHEN 'Created' THEN 1
    WHEN 'Running' THEN 2
    WHEN 'Canceled' THEN 3
    WHEN 'Failed' THEN 4
    WHEN 'Pending' THEN 5
    WHEN 'Ended unexpectedly' THEN 6
    WHEN 'Succeeded' THEN 7
    WHEN 'Stopping' THEN 8
    ELSE 9
    END )
    SET @SQL = '
    SELECT DISTINCT 
    E.folder_name
    ,E.project_name
    ,S.JobName
    ,E.package_name
    ,E.environment_name
    --,E.execution_id
    ,E.executed_as_name
    --,E.operation_type
    --,E.process_id
    , CASE e.[status]
    WHEN 1 THEN ''Created''
    WHEN 2 THEN ''Running''
    WHEN 3 THEN ''Canceled''
    WHEN 4 THEN ''Failed''
    WHEN 5 THEN ''Pending''
    WHEN 6 THEN ''Ended unexpectedly''
    WHEN 7 THEN ''Succeeded''
    WHEN 8 THEN ''Stopping''
    ELSE ''Completed''
    END [Status]
    ,E.start_time
    ,E.end_time
    ,E.server_name
    ,E.machine_name
    ,EM.event_name
    ,EM.message_source_name
    ,EM.message_time
    ,case EM.[message_type] WHEN 120 THEN ''Error'' else ''TaskFailed'' END [message_type]
    ,EM.[message]
    ,EM.execution_path
    FROM     [SSISDB].[catalog].[executions] E
    LEFT OUTER JOIN
    [SSISDB].[catalog].[event_messages] EM ON E.[execution_id] = EM.[operation_id]
    LEFT JOIN
    [MSDB].DBO.SQL_Agent_Jobs_Packages S
    ON S.PackageName = E.package_name
    WHERE EM.message_type in(120,130) AND 1=1 
    --AND E.package_name = ''Anna_Maria_Daily_Contacts_Parent.dtsx'' 
    IF @JobName IS NOT NULL 
    BEGIN
    SET @SQL  = @SQL + '  AND S.JobName IN (' +''''+REPLACE(@JobName,',',''',''')+''')' 
    END
    IF (cast(@LastRunDate as date) IS NOT NULL AND cast(@LastRunDate as date)!='1900-01-01')
    BEGIN
    SET @SQL  = @SQL + ' AND CAST(isnull(EM.message_time, ''1900-01-01'') AS DATE) IN ('+''''+REPLACE(cast(@LastRunDate as date),',',''',''')+''')' 
    END
    IF @LastRunStatus IS NOT NULL 
    BEGIN
    SET @SQL  = @SQL + '  AND e.[status] IN (' +''''+REPLACE(@NewLastRunStatus,',',''',''')+''')' 
    END
    SET @SQL  = @SQL + ' ORDER BY E.start_time DESC,E.end_time DESC'
    --SELECT @SQL
    EXEC (@SQL)
    END
    You can use the above script to create a dynamic sproc which takes the above mentioned params.

  • Run SQL Agent Job in endless loop(When it's done, start over again)

    Hi All,
    There is an SQL Agent Job containing a complex Integration Services Package performing some ETL Jobs. It takes between 1 and 4 hours to run, depending on our data sources. The Job currently runs daily, without problems. What I would like to do now is to
    let it run in an endless loop, which means: When it's done, start over again.
    The scheduler doesn't seem to provide this option. I found that it would be possible to use the steps interface to go to step one after the last step is finished, but there's a problem using that method: If I need to stop the job, I would need to do that in
    a forceful way. However I would like to be able to let the job stop after the next iteration. How can I do that?
    Thanks in Advance...

    Seriously I cant think of a reason for continuosly running a step like this
    Do you mean you need to keep on polling db for something continuosly ?
    If thats the requirement there's no need of continuosly calling the step
    Instead of that you can include a loop with wait logic to keep on checking for your condition until it satisfies. You can WAITFOR clause for that
    see an example here where I've implemented similar logic in SSIS
    http://visakhm.blogspot.in/2011/12/simulating-file-watcher-task-in-ssis.html
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • SQL Server Agent Job intermittently running for packages on SSISDB

    I created an SSIS package to pull data from OLAP Cube and push it into SQL Server using SSIS 2o12. I deployed the same on the SQL Server SSIS DB and created a SQL Server Agent Job to run the package. I have an account configured to run the job (not by
    creating proxy in the job, but SQL Server Agent is running under that account), that has access to the OLAP Cube. The job is running sometimes and failing sometimes. Why the job behaving weirdly. Any help on the issue will help me a lot. I am using SQL Server
    2012 SP1 enterprise edition (11.0.3000.0) (if it helps). The error message which pops up when it fails is :
    OLE DB Source failed the pre-execute phase and returned error code 0xC0202009
    SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E05.
    An OLE DB record is available.  Source: ""Microsoft OLE DB Provider for SQL Server 2012 Analysis Services.""  Hresult: 0x00000001  Description: ""Error Code = 0x80040E05, External Code = 0x00000000:."".
    "

    Hi,
    You are using Execute SQL Task to run a MDX query, right?  If so, here is an approach/workaround for your reference. If the MDX query doesn’t have parameters, you can create a view in SQL running the MDX query and make the Execute SQL Task to get data
    from that view. If the MDX query has parameters, you can try a Function and create a stored procedure, and then set the Execute SQL Task to execute that stored procedure.
    Regards,
    Mike Yin
    TechNet Community Support

Maybe you are looking for

  • Forms: How to set a maximum size in Text Fields with automatic size

    ¡Hi! When I set a text field on my forms and I use automatic size for te text that the user can write, if the user don't need more space than the field size, when the text appears, Adobe Acrobat Pro always set the text-size to 14 or higher. How can I

  • Default maximum number of connections in Sun Ray

    Hi All, I need to know how many users can be supported by Oracle Sun Ray Servers in a single high availability load balance environment using Sun Ray's in-built load balancing and high availability capabilities. SRSS version - latest 5.4.x on Linux.

  • How do I expand albums in photoshop

    would like a solution to the above problem

  • Regarding  miro tcode copy to zmiro.

    Hi Experts, i got requirement like copy miro tcode to zmiro, i copied all includes  and all objects, finaly  transaction code is also created. while executing the program i got the dump, how to solve this dump , please give me an idea to solve this i

  • Developing simple web app

    Hi, Really just want to know, I have this task to develop a sime web app that involves a database (to add new records, retrieve data, del, perform queries etc), where there are a number of user access levels. I'm envisioning that users will perform a