[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Script a process

Posted on 2012-08-27
Medium Priority
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
  • 2
LVL 10

Expert Comment

ID: 38337706
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
ID: 38337716
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

k3vsmith earned 0 total points
ID: 38387985
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

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

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
Suggested Courses

873 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