Script a process

Posted on 2012-08-27
Last Modified: 2012-09-16
I want to script an issue that we have a manual process for. Im not sure if this is possible given the product.
Background info -
The product we use is Deltek MPM. We have a process that syncs projects in MPM to a SQL database. The task is faulty and you have to constantly keep an eye on it.
Basically what it does is you Log into your SQL server. Run a SQL job that we have set up which takes a minute. Then log into MPM and tell it to sync a specific Project. If you go over to the server that runs the sync (separate from the SQL server) you can see the event log that its syncing. If it fails (known bug with MPM) it shoots a bogus Error in the event log.  Then you have to repeat the process and it will sync the next time.

Id like to script this if possible where the script is looking for a failure in the event log (its a specific entry) and if it sees this entry it will run the SQL job and then will select the same project to sync again. I dont if there is a way to script for a project to sync since I dont know how MPM is written.

Any help, suggestions, examples would be great. I am somewhat new to scripting. Thanks!
Question by:k3vsmith
    LVL 10

    Expert Comment

    best thing is to use a monitoring tool to watch the log file (a log file sensor/agent) ; this way you get an alert (email) whenever a failure happens , almost all of the monitoring utilities support an action feature , so that you can tell that agent to run a batch file or a command whenever a failure happens.

    For your SQL part , you should be able to automate that by using SQL server agent .
    LVL 75

    Expert Comment

    by:Aneesh Retnakaran
    Why dont you modify the sql job -> jobstep , in the advanced properties there is an option to specify the no of retries in case of a failure, set this value

    Accepted Solution

    The underlying issue was not SQL as we already had that portion automated. The issue was with the application MPM. I had a vb guy come in and write code which works.

    Author Closing Comment

    Lack of detail on my part or maybe this was a bigger task than a simple post would fix.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
    In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
    This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
    This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now