Archive for January, 2010

Oracle vs. MS SQL Server – Security Comparison

Posted in Microsoft, Microsoft SQL Server on 2010/01/31 by CRCerr0r

An interesting read comparing the security flaws discovered in the Oracle and Microsoft SQL Server code bases.

http://www.databasesecurity.com/dbsec/comparison.pdf

Automatic start/restart recovery action for Windows Service in SCOM 2007

Posted in Monitoring, SCOM with tags , on 2010/01/26 by CRCerr0r

I am not sure if I am missing something, or simply nobody has thought of an easier way of doing this but I have run into this issue twice already. I am setting up SCOM 2007 (once with RTM +SP1 and once with R2) and I setup standard Windows service monitoring, so that I am notified when a Windows service stops or dies. The issue is that there seems to be no EASY way to create an automatic recovery action for the monitor to restart the service if it goes down.

If you try to modify to default monitor “Service Running State” from the Windows Service Library management pack and add a recovery action to it to start the service if the monitor goes into a Critical state, you would get this pleasant error:

Date: 1/28/2010 10:08:19 AM
Application: System Center Operations Manager 2007 R2
Application Version: 6.1.7221.0
Severity: Error
Message:

: Verification failed with [1] errors:
——————————————————-
Error 1:
: Failed to verify Recovery [MomUIGenaratedRecoverybdae2c715da44a0797df0f2dbd5b41dc]
The requested ManagementPackElement [Type=ManagementPackMonitor, ID=Microsoft.SystemCenter.NTService.ServiceStateMonitor] in ManagementPack [ManagementPack:[Name=Microsoft.SystemCenter.NTService.Library, KeyToken=31bf3856ad364e35, Version=6.1.7221.0]] is not Accessible outside this ManagementPack.
——————————————————-

Failed to verify Recovery [MomUIGenaratedRecoverybdae2c715da44a0797df0f2dbd5b41dc]The requested ManagementPackElement [Type=ManagementPackMonitor, ID=Microsoft.SystemCenter.NTService.ServiceStateMonitor] in ManagementPack [ManagementPack:[Name=Microsoft.SystemCenter.NTService.Library, KeyToken=31bf3856ad364e35, Version=6.1.7221.0]] is not Accessible outside this ManagementPack.
: Failed to verify Recovery [MomUIGenaratedRecoverybdae2c715da44a0797df0f2dbd5b41dc]
The requested ManagementPackElement [Type=ManagementPackMonitor, ID=Microsoft.SystemCenter.NTService.ServiceStateMonitor] in ManagementPack [ManagementPack:[Name=Microsoft.SystemCenter.NTService.Library, KeyToken=31bf3856ad364e35, Version=6.1.7221.0]] is not Accessible outside this ManagementPack.
: The requested ManagementPackElement [Type=ManagementPackMonitor, ID=Microsoft.SystemCenter.NTService.ServiceStateMonitor] in ManagementPack [ManagementPack:[Name=Microsoft.SystemCenter.NTService.Library, KeyToken=31bf3856ad364e35, Version=6.1.7221.0]] is not Accessible outside this ManagementPack.

So… After some digging I found out this is one (or THE) way of getting this accomplished:

1. Create a new Basic Service Monitor under Authoring\Management Pack Objects\Monitors – Windows Service\Entity Health\Availability called Service Run State (the name of the monitor is arbitrary, but it is close enough to the original name, Service Running State, that it makes sense…). Make sure you don’t add it to the Default Management Pack.

2. For Service Name enter this string:

$Target/Property[Type=”MicrosoftSystemCenterNTServiceLibrary!Microsoft.SystemCenter.NTService”]/ServiceName$

Update: This string may vary for you. The best way to find it (and you should probably do that, instead of simply copying mine) is to try and create a recovery action in the original Service Running State monitor. When you get to the point of entering a command, click the arrow next to the Parameters box. The fly-out will have a list of parameters. Pick the one on top called Service Name. The UI will place the string in the parameters box. Once you have it there, copy it and save it. Cancel the Create Recovery Task Wizard. In my latest install the string looks like this:

$Target/Property[Type=”MicrosoftSystemCenterNTServiceLibrary6172210!Microsoft.SystemCenter.NTService”]/ServiceName$

3. Accept all other defaults. Once it is created, go into the properties of it, under Diagnostics and Recovery

4. Create a Recovery Action Run A Command. The command line should be:

Full path to file: net.exe

Parameters: start “$Target/Property[Type=”MicrosoftSystemCenterNTServiceLibrary!Microsoft.SystemCenter.NTService”]/DisplayName$”

5. Save it.

You are done.

— If you this post helped you, please, rate it/”Like” it.

Advertisement

Adobe Acrobat does not show preview in Windows 7

Posted in Windows with tags , on 2010/01/23 by CRCerr0r

A few days ago I noticed that preview stopped working on my Windows 7 Home Premium 64-bit machine for PDF files. All other files were previewing fine, just PDFs stopped. I remembered there was a patch that I was prompted to install a few days prior to that, so my guess is the patch reset the reg keys that make the preview possible. Anway, after some digging I found a couple of posts with the info on how to reset this (sorry, can’t seem to find the original postings at the moment to give the authors credit 😦 ) Here is the reg file that correct the problem.

P.S. Here is the link to the original post that helped me.