Quantcast
Channel: Stefan Stranger's Weblog – Manage your IT Infrastructure
Viewing all 69 articles
Browse latest View live

OpsMgr 2007 Event 21402

$
0
0
A colleague of mine Dirk van Coeverden has written an excellent article about troubleshooting OpsMgr 2007 Event 21402. With this article you can see how you can use the Workflow name from the Event details to trace which rule/discovery/monitor is causing the error.

Introduction

This article describes how to troubleshoot OpsMgr 2007 Event 21402, which indicates a script error or warning. However the article is intended to be an example for other events, since a lot of details are also in other events (like Workflow name).

        Event Type: Warning
        Event Source: Health Service Modules
        Event ID: 21402
        Description:
                Forced to terminate the following process started 
                at 12:08:50 PM because it ran past the configured 
                timeout 120 seconds.
 

With this article you will find

  • The discovery, monitor or rule which causes the event
  • Retrieve the script content in a SQL table (limited by SQL2005 Studio)
  • How it looks in XML and understand the workflow

The query to find the discovery, monitor or rule should work for every event where the workflow name is listed. The script content is more specific to 21402 but might give an impression on how to retrieve content from an XML columns (of NVARCHAR type).

The queries aren't tested for performance, so the best course is to import the MP of the customer in your test environment and run them on your own machine.

 

21402 details

An example of 21402 is

        Event Type: Warning
        Event Source: Health Service Modules
        Event Category: None
        Event ID: 21402
        Date: 7-4-2008
        Time: 4:05:34
        User: N/A
        Computer: server01
        Description:
        Forced to terminate the following process started at 
        04:05:04 because it ran past the configured timeout 30 
        seconds.


        Command executed: "C:\WINDOWS\system32
        \cscript.exe" /nologo "C:\Program Files\System Center 
        Operations Manager 2007\Health Service State\Monitoring Host 
        Temporary Files 297\177
        \CheckVirtualMachineNameMatchComputerName.vbs"


        Working Directory: C:\Program Files\System Center Operations 
        Manager 2007\Health Service State\Monitoring Host Temporary 
        Files 297\177\ 


        One or more workflows were affected by this.  


        Workflow name: Microsoft.Virtualization.VirtualServer.2005R2.VirtualMachineName_does_not_match_computer_name.rule
        Instance name: servern01.contoso.com 
        Instance ID: {3B3FA6E2-BB6B-CD49-274A-8722250C3D0C} 
        Management group: OpsMgrdemo


        For more information, see Help and Support Center at 
        http://go.microsoft.com/fwlink/events.asp.

Important Event Elements

Command Executed:

"C:\WINDOWS\system32cscript.exe" /nologo "C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 297\177\CheckVirtualMachineNameMatchComputerName.vbs"

Working Directory:

C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 297\177\

Script:

CheckVirtualMachineNameMatchComputerName.vbs

Workflow:

Microsoft.Virtualization.VirtualServer.2005R2.VirtualMachineName_does_not_match_computer_name.rule

Which discovery monitor or rule?

To find out which discovery monitor or rule the script belongs to run the following SQL script (based on the example event above) on the OperationsManager database.

 DECLARE @ObjectName NVARCHAR(256)


 SET @ObjectName = 'Microsoft.Virtualization.VirtualServer.2005R2.VirtualMachineName_does_not_match_computer_name.rule'


 IF EXISTS (SELECT 1 FROM DiscoveryView WITH (NOLOCK) WHERE Name = @ObjectName) 
        SELECT 
                'Discovery' As 'Object Type',
                d.DisplayName AS 'Displayname in Console',
                d.Name AS 'Internal Monitor Name',
                d.Id AS 'MonitorId',
                p.Displayname AS 'ManagementPack',
                p.Version AS 'ManagementPack Version',
                p.Name AS 'Management Pack Library Name'
        FROM DiscoveryView d WITH (NOLOCK)
        INNER JOIN ManagementPackView p WITH (NOLOCK) ON d.ManagementPackId = p.Id
        WHERE d.Name = @ObjectName
 ELSE IF EXISTS (SELECT 1 FROM MonitorView WITH (NOLOCK) WHERE Name = @ObjectName) 
        SELECT 
                'Monitor' AS 'Object Type',
                m.DisplayName AS 'Displayname in Console',
                m.Name AS 'Internal Monitor Name',
                m.Id AS 'MonitorId',
                p.Displayname AS 'ManagementPack',
                p.Version AS 'ManagementPack Version',
                p.Name AS 'Management Pack Library Name'
        FROM MonitorView m WITH (NOLOCK) 
        INNER JOIN ManagementPackView p WITH (NOLOCK) ON m.ManagementPackId = p.Id
        WHERE m.Name = @ObjectName
 ELSE IF EXISTS (SELECT 1 FROM RuleView WITH (NOLOCK) WHERE Name = @ObjectName) 
        SELECT 
                'Rule' AS 'Object Type',
                r.DisplayName AS 'Displayname in Console',
                r.Name AS 'Internal Rule Name',
                r.Id AS 'RuleId',
                p.Displayname AS 'ManagementPack',
                p.Version AS 'ManagementPack Version',
                p.Name AS 'Management Pack Library Name'
        FROM RuleView r WITH (NOLOCK) 
        INNER JOIN ManagementPackView p WITH (NOLOCK) ON r.ManagementPackId = p.Id
        WHERE r.Name = @ObjectName

This will give the following results

Object Type Displayname_in_Console Internal Rule Name RuleId ManagementPack ManagementPack Version Management Pack Library Name
RuleVirtual Machine: Virtual machine name does not match computer name Microsoft.Virtualization.VirtualServer.2005R2. VirtualMachineName.rule E465679D-BC55-C4D3-FEF0-C108DF37DFD9 Microsoft Virtual Server 2005 R2 1.0.2627.0 Microsoft.Virtualization.VirtualServer.2005R2

In the OpsMgr Console / Authoring you can find the Discovery, Monitor or Rule (depending on Object Type) in Management Pack Objects.

Retrieve the script content

To retrieve the script you can run the following SQL query on the OperationsManager database.

 SELECT 
         ManagementPackId,
         ScriptName,
         ScriptFile
 FROM (        
         SELECT 
                 ManagementPackId,
                 Script.Col.value('(Name/text())[1]', 'NVARCHAR(128)') AS ScriptName,
                 Script.Col.value('(Contents/text())[1]', 'NVARCHAR(MAX)') AS ScriptFile
         FROM (SELECT ManagementPackId, CONVERT(XML, MPXML) AS MPXMLFormat, MPName FROM ManagementPack) p 
         CROSS APPLY p.MPXMLFormat.nodes('//File') Script(Col)
         WHERE p.MPName LIKE '%2005R2%') s
 WHERE s.ScriptName = 'CheckVirtualMachineNameMatchComputerName.vbs'

Take note that SQL 2005 Studio has a limit of (about) 8000 char for its return results. Also since the MPXML field of the ManagementPack table is not of type XML but NVARCHAR, the formatting isn't really fancy. However it might give you a quick impression of what the script is about.

If people find this a useful query, I can work out one which gives a nice formatted output of the script content.

In XML

If you want to see how it is build up and configured in XML than

  • Export MP (Powershell Export-ManagementPack)
  • In .xml search for <Rule ID="Microsoft.Virtualization.VirtualServer.2005R2.VirtualMachineName_does_not_match_computer_name.rule"

This looks like

<Rule ID="Microsoft.Virtualization.VirtualServer.2005R2.VirtualMachineName_does_not_match_computer_name.rule" Enabled="true" Target="Windows! Microsoft.Windows.Computer" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100"><Category>AvailabilityHealth</Category><DataSources><DataSource ID="DS" TypeID="Microsoft.Virtualization.VirtualServer.2005R2.CheckVirtualMachineName"><IntervalInSeconds>60</IntervalInSeconds><Expression><And><Expression><SimpleExpression><ValueExpression><XPathQuery Type="String">Property[@Name='IsVirtualMachine']</XPathQuery></ValueExpression><Operator>Equal</Operator><ValueExpression><Value Type="String">True</Value></ValueExpression></SimpleExpression></Expression>
         ...

Here you find all the properties of the (in this case) the rule. Actually you can read the workflow of this object here. One part of the workflow is the Databasource ModuleType

<DataSource ID="DS" TypeID="Microsoft.Virtualization.VirtualServer.2005R2.CheckVirtualMachineName">

This points to the ModulesType part of the XML file

<ModuleTypes><DataSourceModuleType ID="Microsoft.Virtualization.VirtualServer.2005R2.VirtualServerVirtualMachineDiscovery" Accessibility="Internal" Batching="false"><DataSourceModuleType ID="Microsoft.Virtualization.VirtualServer.2005R2.RelVirtualMachineComputerDiscovery" Accessibility="Internal" Batching="false"><DataSourceModuleType ID="Microsoft.Virtualization.VirtualServer.2005R2.VirtualMachineComputerDiscovery" Accessibility="Internal" Batching="false"><DataSourceModuleType ID="Microsoft.Virtualization.VirtualServer.2005R2.VirtualMachineState" Accessibility="Internal" Batching="false"><DataSourceModuleType ID="Microsoft.Virtualization.VirtualServer.2005R2.CheckVirtualMachineName" Accessibility="Internal" Batching="false"><Configuration><IncludeSchemaTypes><SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType></IncludeSchemaTypes><xsd:element name="IntervalInSeconds" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /><xsd:element name="Expression" type="ExpressionType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /></Configuration><OverrideableParameters><OverrideableParameter ID="IntervalInSeconds" Selector="$Config/IntervalInSeconds$" ParameterType="int" /></OverrideableParameters>
       ....

Here you will find the Module itself which is executed

<MemberModules><DataSource ID="DS" TypeID="System!System.CommandExecuterPropertyBagSource"><IntervalSeconds>$Config/IntervalInSeconds$</IntervalSeconds><ApplicationName>%windir%\system32\cscript.exe</ApplicationName><WorkingDirectory /><CommandLine>/nologo $file/CheckVirtualMachineNameMatchComputerName.vbs$</CommandLine><TimeoutSeconds>30</TimeoutSeconds><RequireOutput>true</RequireOutput><Files><File><Name>CheckVirtualMachineNameMatchComputerName.vbs</Name><Contents>        
 ' Copyright (c) Microsoft Corporation. All rights reserved.
 ' VBScript source code
 ' CheckVirtualMachineNameMatchComputerName.vbs
 ' Arg 0 : SourceID
 Option Explicit 


 Const StrVMMManagementGroupInstallationRegKey = "HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager 2007 Server\Setup\InstallPath"
 Const StrVirtualServerRegKey = "HKLM\System\CurrentControlSet\Services\Virtual Server\Start"
 Const StrVMMServerInstallationRegKey = "HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager 2007 Server\Setup\InstallPath"
 Const StrVMMServerVersionRegKey = "HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager 2007 Server\Setup\ProductVersion"
 Const StrVMMSelfServiceServerInstallationRegKey = "HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager 2007 Self-Service  Portal\Setup\InstallPath"
 Const StrVMMSSsiteEngineMachineRegKey = "HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager 2007 Self-Service  Portal\Settings\VmmServerName"
 Const StrVMMDatabaseServerRegKey = "HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager 2007 Server\Settings\Sql\OnRemoteServer"
 Const StrVMMDatabaseNameRegKey = "HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager 2007 Server\Settings\Sql\DatabaseName"
 Const StrVMMDatabaseInstanceRegKey = "HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager 2007 Server\Settings\Sql\InstanceName"
 Const StrVMMRemoteDatabaseMachineFQDNRegKey = "HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager 2007  Server\Settings\Sql\MachineFQDN"
 Const StrVMMConsoleInstallationRegKey = "HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager 2007 Administrator Console\Setup\InstallPath"
 Const StrVMNameRegKey = "HKLM\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters\VirtualMachineName"


 Const StrWebsitDisplayName = "Microsoft System Center Virtual Machine Manager 2007 Self-Service Portal"
 Const StrSQLServerDefaultInstance = "MSSQLSERVER"
 Const StrEmpty = ""
 Const StrFolderSeparator = "\"
 Const StrLocationHost = "Host"
 Const StrLocationLibrary = "Library"


 '=============
 ' Method:       ReadRegistry
 ' Description:  This function read the regiestry, return true if the registry exit; otherwise return false
 '=============
 Function ReadRegistry(ByVal regString, ByRef regValue)
     Dim bHasRegistry
     Dim oReg
     Set oReg = CreateObject("WScript.Shell")   


     On Error Resume Next    
     regValue = oReg.RegRead(regString)
     If Err.number &lt;> 0 Then
         bHasRegistry = False
     Else
         bHasRegistry = True
     End If
     On Error Goto 0 


     ReadRegistry = bHasRegistry
 End Function 


 Call Main()


 ... 

The Health of the Root Management Server is in a Gray “Not Monitored” State

$
0
0

Source: SMS&MOM

J.C. Hornbeck published an article from Lenny Wile on the Health of the Root Management Server is in a Grey “Not Monitored” State a couple of days ago. And you know what? I was facing the same issue after migrating my VM’s to Hyper-V yesterday.

image

 

imageimage

 

But I also saw the next eventlogs:

imageimage image

 imageimageimage

Resetted the passwords for above users and restarted the  Health Service.

image

 

And the RMS was Healthy again.

image

image

Ok not completely Healthy, but not grey anymore ;-)

Reporting issue: Loading reporting hierarchy failed

$
0
0

Update: This is caused by by how the particular domain environment was constructed. Read more on http://blogs.technet.com/operationsmgr/archive/2009/01/27/opsmgr-2007-error-running-report-message-loading-reporting-hierarchy-failed-access-is-denied.aspx

After trying to open Reporting from the Ops Console I got the next error:

image

I checked if Reporting was configured correctly with the Configure Report Server tool.

image

Checked if SharePoint Integration was enabled. And that wasn’t the case.

Tried to open ReportServer in a Browser.

image

Restarted the SQL Server Reporting Services (MSSQLSERVER) service. But still no luck.

Opened Configure Report Server tool again and applied the Default Settings for the Report Server Virtual Directory and Report Manager Virtual Directory.

image

Re-entered the correct password for the Windows Service Identity and clicked Apply.

image

Now the Web Service Identity failed.

image

Changed the Web Service Identity for the Report Server and Report Manager from the DefaultAppPool to ReportServer. After the refresh the ASP.NET Service Account changed automatically from NT Authority\NetworkService to CONTOSO\OM_DRA.

image

Clicked Apply and did a Refresh and that solved it.

image

Answer: Operations Manager Authoring questions from SQLBatman

$
0
0

I saw a question of SQLBatman about Operations Manager Authoring.

Here my attempt to answer those questions.

Q: Referenced MP could not be found

A: Search on your (Root) Management Server for *.mp files and copy all these files to one directory, like c:\Mps.  If your Authoring Console is on another machine then your (Root) Management Server copy these files to this machine.

Add this directory to the References in Options
image

Q: Create a custom attribute to the SQL DB Engine

A: I only found that there are only two WMI Providers for Microsoft SQL Server 2005: WMI Provider for Configuration Management and WMI Provider for Server Events.
    Source: Microsoft Windows PowerShell and SQL Server 2005 WMI Providers – Part 1 and Microsoft Windows PowerShell and SQL Server 2005 WMI Providers - Part 2

    I’ve to look for more info about this question, but I at the moment I don’t have much time. But I’ll try to look into this soon.

Debugging OpsMgr Scripts

$
0
0

One of the great advantages of OpsMgr 2007 against MOM 2005 is that you can easily test OpsMgr 2007 scripts from the command prompt.

Just go to the C:\Program Files\System Center Operations Manager 2007\Health Service State and open a command prompt.

Type DIR /B /S *.vbs and you find all the scripts that are used on that specific agent. And if you have found your script to debug you can easily run it with cscript and see what happens.

But what if a scripts needs some parameters? Most of the time these are GUIDS and how do you find the right parameters?

A colleague of mine Dirk van Coeverden found an easy way to find these parameters.

Let’s Look at the Operational Database Space Free (%) Monitor.

image

This Monitor uses a vbscript GetOpsMgrDBPercentageFreeSpace.vbs which needs two parameters to work

image

So if we want to debug this script we need two parameters; DatabaseServerName and DatabaseName.

How do we find those parameters?

First we need to go to the Authoring Pane in the Opsmgr Console and find the monitor which runs this script.

image

Then we change the default timeout of the script to something smaller then the default with an override. Say 1 second.

image

Now we have to wait for this monitor to run again and hopefully see that the script timeouts because of the lower timeout settings. And if the script runs longer than the timeout period an event 21402 – Script ran longer than the timeout period will be created.

image

Now you can debug the script from the commandprompt with the correct parameters. Don’t forget to remove the overrides.

image

Using SQL Nexus to troubleshoot OpsMgr SQL Server performance issues

$
0
0

SQL Nexus is a tool that helps you identify the root cause of SQL Server performance issues. It loads and analyzes performance data collected by SQLDiag and PSSDiag. It can dramatically reduce the amount of time you spend manually analyzing data.

With the RML Utilities you can answer questions such as the following:

  • Which application, database or login is consuming the most resources, and which queries are responsible for that.
  • Whether there were any plan changes for a batch during the time when the trace was captured and how each of those plans performed.
  • What queries are running slower in today's data as compared to a previous set of data.

If you think you have OpsMgr SQL Server performance issues maybe SQL Nexus together with SQLDiag and RML Utilities can help with performance tuning and analysis.

Steps:

  1. Download SQLNexus , RML Utilities for SQL Server, Microsoft Report Viewer 2008 Redistributable and PerfStatsScript from websites.
  2. Install Microsoft Report Viewer 2008 Redistributable
    image
  3. Install RML Utilities for SQL Server.
    image
  4. Install\Run SQLNexus by running sqlnexus.exe in folder where you extracted the zipfile.
  5. Connect to SQL server
    image
  6. After starting SQLNexus a new database sqlnexus is created.
    image
  7. Create a folder SQLDiag and Unzip PerfStatsScript files to folder.
  8. Open StartSQLDiagTrace.cmd and change configuration as needed.
    image
  9. Give SQL server service account full control on D:\SQLDIAG folder if you aren’t using the local system account.
  10. Start D:\SQLDiag\StartSQLDiagTrace.cmd. This script registers sqldiag as a service and starts the service with a template (both profiler and perfmon trace)
    Output is being dumped in D:\SQLDiag\SQLDiagOutput folder
    image
    image

    Remark:
    On a busy system quite some data can be collected!!!!. Watch your freespace carefully! Customer experience on opsmgr environment with 2500 agents 20GB of data is collected in 10 minutes.
    Have it running for 10 mins and then stop the SQLDiag service.
  11. Stop SQLDiag with StopSQLDiagTrace.cmd script.

    image
  12. Importing trace data by selecting File\Import in SQLNexus tool.
    image

    Select Options and select BLG Blaster on Enabled and Drop Current DB before Importing.

     image

    image

    Remark: If you are getting the Message PerfStatsAnalysis.sql doesn’t exist message. Just copy the PerfStatsAnalyis.sql file to the requested folder.

    image

    image
  13. The Next Reports are available:
    • Via SQLNexus
      1. Bottleneck Analysis
      2. Blocking and Resource Wait Statistics
      3. Performance Overview with subreports
        • Resource Consumption
        • Unique Batch TopN
        • Interesting Events

image


 image

      I want to thank David Scheltens for showing me how to use SQL Nexus and creating the PerfStatsScripts.

      References:

      SQLNexus

      http://www.codeplex.com/sqlnexus

      SQLDiag (installed default with SQL2005 and SQL2008)

      http://msdn.microsoft.com/en-us/library/ms162833(SQL.90).aspx

      PSSDiag (to use with SQL2000)

      http://msdn.microsoft.com/en-us/library/aa175399(SQL.80).aspx

      RML Utilities

      http://blogs.msdn.com/psssql/archive/2007/12/18/rml-utilities-for-microsoft-sql-server-released.aspx

      Audio / Video from the January 2009 SCVUG Meeting

      $
      0
      0

      Source: System Center Forum

      Today I was watching the latest recording of the January 2009 SCUG Meeting and to my surprise I was seeing some info about Debugging Scripts which I blogged about some time ago. 

       

      image

      So if you didn’t had time to join the livemeeting go download the recording.

      Below are the starting times in the video for each speaker so you can fast forward to whatever you like.

      • 1:05 - Savision Live Maps v3 Demo (Dennis Rietvink)
      • 51:46 - Custom Scripting and Script Debugging in OpsMgr 2007 (Pete Zerger)
      • 1:19:45 - Top MS Support Issues for Operations Manager 2007 (Steve Rachui) 

      Microsoft Technet: Tip: Uncover Memory-Related Bottlenecks

      $
      0
      0

      Source: Microsoft Technet

      “Memory is often the source of performance problems, and you should always rule out memory problems before examining other areas of the system. Systems use both physical and virtual memory. To rule out memory problems with a system, you should configure application performance, memory usage, and data throughput settings, and then monitor the server’s memory usage to check for problems.
      Application performance and memory usage settings determine how system resources are allocated. In most cases you want to give the operating system and background applications the lion’s share of resources. This is especially true for Active Directory, file, print, and network and communications servers. On the other hand, for application, database, and streaming media servers, you’ll want to give the programs the server is running the most resources.

      Here’s an overview of counters that you’ll want to track to uncover memory, caching, and virtual memory (paging) bottlenecks.”

      Read more on source.


      Everything you wanted to know about OpsMgr Data Warehouse Grooming but were afraid to ask

      $
      0
      0

      I know there are already quite some other blog posts about OpsMgr Data Warehouse Grooming.  But I was helping a customer with grooming their OpsMgr Data Warehouse Database (OperationsManagerdw) and got some questions. And you may have the same questions but you are afraid to ask ;-)

      1. How can I change the Grooming settings for the OpsMgr Data Warehouse?
        This cannot be done from within the OpsMgr Console.
        So what are the options then?
        1. DWdatarp tool

          Use the Data Warehouse Data Retention Policy (dwdatarp.exe) tool from the MOM team weblog.

          Tip: if after running the tool you don’t see any results, you may not be dbowner on the OperationsManagerDW database.

          image 

          You can save the results to a csv, but you need to do some manual stuff in Excel to have a nice formatted overview.
           image

          Read the help (dwdatarp /?) for all the options. You can also change the Grooming settings for the OpsMgr Data Warehouse with this tool.
        2. SQL queries
          You have to use some SQL queries and run those on the operationsmanagerdw database in SQL Server Management Studio.
          image 

          To view the Current OpsMgr Data Warehouse queries I use the next SQL queries from several sources.

          --Current Grooming Settings
          USE OperationsManagerDW
          SELECT AggregationIntervalDurationMinutes, BuildAggregationStoredProcedureName, GroomStoredProcedureName, MaxDataAgeDays, GroomingIntervalMinutes, MaxRowsToGroom FROM StandardDatasetAggregation

          --Last Grooming Time
          USE OperationsManagerDW
          select
          min(datetime) as MinDate,
          max(datetime) as MaxDate,
          datediff(d,min(datetime),max(datetime)) AS NoOfDaysInDataSet
          from Perf.vPerfHourly

          --To view the number of days of total data of each type in the DW:
          USE OperationsManagerDW
          SELECT DATEDIFF(d, MIN(DWCreatedDateTime), GETDATE()) AS [Current Alert] FROM Alert.vAlert
          SELECT DATEDIFF(d, MIN(DateTime), GETDATE()) AS [Current Event] FROM Event.vEvent
          SELECT DATEDIFF(d, MIN(DateTime), GETDATE()) AS [Current Perf Raw] FROM Perf.vPerfRaw
          SELECT DATEDIFF(d, MIN(DateTime), GETDATE()) AS [Current Perf Hourly] FROM Perf.vPerfHourly
          SELECT DATEDIFF(d, MIN(DateTime), GETDATE()) AS [Current Perf Daily] FROM Perf.vPerfDaily
          SELECT DATEDIFF(d, MIN(DateTime), GETDATE()) AS [Current State Raw] FROM State.vStateRaw
          SELECT DATEDIFF(d, MIN(DateTime), GETDATE()) AS [Current State Hourly] FROM State.vStateHourly
          SELECT DATEDIFF(d, MIN(DateTime), GETDATE()) AS [Current State Daily] FROM State.vStateDaily

          --To view the oldest and newest recorded timestamps of each data type in the DW:
          USE OperationsManagerDW
          select min(DateTime) AS [Oldest Event Date] from Event.vEvent
          select max(DateTime) AS [Newest Event Date] from Event.vEvent
          select min(DateTime) AS [Oldest Perf Date]from Perf.vPerfRaw
          select max(DateTime) AS [Newest Perf Date]from Perf.vPerfRaw
          select min(DWCreatedDateTime) AS [Oldest Alert Date] from Alert.vAlert
          select max(DWCreatedDateTime) AS [Newest Alert Date] from Alert.vAlert

          --Which Tables used the most space
          USE OperationsManagerDW
          SELECT so.name,
          8 * Sum(CASE WHEN si.indid IN (0, 1) THEN si.reserved END) AS data_kb,
          Coalesce(8 * Sum(CASE WHEN si.indid NOT IN (0, 1, 255) THEN si.reserved END), 0) AS index_kb,
          Coalesce(8 * Sum(CASE WHEN si.indid IN (255) THEN si.reserved END), 0) AS blob_kb
          FROM dbo.sysobjects AS so JOIN dbo.sysindexes AS si ON (si.id = so.id)
          WHERE 'U' = so.type GROUP BY so.name  ORDER BY data_kb DESC


          If you look at results of the first two queries (current grooming settings and last grooming time)
           image
          Another interesting query is the “Which Tables used the most space” query. You can run this query before and after changing the grooming settings to see if the grooming had any effect.
          If you want to change the Grooming settings you can use the next queries.
          N.B. Change to the values you want to have your Grooming settings configured!!

          -- From http://ops-mgr.spaces.live.com/blog/cns!3D3B8489FCAA9B51!176.entry
          -- Alert Data:

          USE OperationsManagerDW
          UPDATE StandardDatasetAggregation
          SET MaxDataAgeDays = 100
          WHERE GroomStoredProcedureName = 'AlertGroom'

          --Event Data:
          USE OperationsManagerDW
          UPDATE StandardDatasetAggregation
          SET MaxDataAgeDays = 40
          WHERE GroomStoredProcedureName = 'EventGroom'

          --Performance Data:
          USE OperationsManagerDW
          UPDATE StandardDatasetAggregation
          SET MaxDataAgeDays = 100
          WHERE GroomStoredProcedureName = 'PerformanceGroom' AND AggregationIntervalDurationMinutes = '60'

          USE OperationsManagerDW
          UPDATE StandardDatasetAggregation
          SET MaxDataAgeDays = 200
          WHERE GroomStoredProcedureName = 'PerformanceGroom' AND AggregationIntervalDurationMinutes = '1440'

          --State Data:
          USE OperationsManagerDW
          UPDATE StandardDatasetAggregation
          SET MaxDataAgeDays = 40
          WHERE GroomStoredProcedureName = 'StateGroom' AND MaxDataAgeDays = 180

          USE OperationsManagerDW
          UPDATE StandardDatasetAggregation
          SET MaxDataAgeDays = 100
          WHERE GroomStoredProcedureName = 'StateGroom' AND AggregationIntervalDurationMinutes = '60'

          USE OperationsManagerDW
          UPDATE StandardDatasetAggregation
          SET MaxDataAgeDays = 200
          WHERE GroomStoredProcedureName = 'StateGroom' AND AggregationIntervalDurationMinutes = '1440'

      2. How can I see if Grooming has worked?
        You can check if Grooming has worked after changing the Grooming settings by looking at the dwdatarp tool results or by running some SQL queries.

        Tip: save the results from the dwdatarp tool or SQL queries before and after changing the grooming settings to compare them.

        If you have used the dwdatarp tool for saving the before and after grooming results you can have a look at the columns Current Size and Current Row Count if they changed after changing the grooming settings. 
        image   

        If you like to use SQL you can run the “Which Tables used the most space” sql query to look if those have changed after changing the grooming settings.

        It’s also important to look at the current size and free space of the operationsmanagerdw before starting to groom.

        image
      3. Why don’t my database files shrink after grooming?
        That’s another question people often ask, and that is because the SQL DB files are static – they are manually sized. You can check your autogrow settings for the OperationsManagerDW with the Microsoft SQL Server Management Studio. For the OperationsManager Database Autogrow is default disabled and for the OperationsManagerDW the default setting for Autogrow is enabled.
        image
        If you look at the Autoshrink setting for the OperationsManagerDW you can see it’s disabled.
        image
        That’s why the database files won’t shrink after grooming has taken place. Please keep in mind that we don’t support/recommend EVER shrinking a DB file for OpsMgr. It causes fragmentation issues.

        The only thing that will change (shrink) after grooming is the used space in the database. You can check the used space for a database with the Disk Usage Report in Microsoft SQL Server Management Studio.
        image

        image

        But, sometimes shrinking the database is the only option left if you don’t have any space left…

      Disclaimer

      Please be very careful when changing your grooming settings, you can loose data ;-) Posts in this blog are provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified in the Terms of Use

      Links to other blog posts about Grooming:

      Basic Troubleshooting Discovery Script (follow up on Kevin’s Post)

      $
      0
      0

      This week I’m having a MP Authoring Workshop from Brian Wren in the UK and one of the modules of this workshop is Discovery.

      And to my surprise Kevin Holman published a blog post on Basic troubleshooting of discovery script yesterday. It’s a good start but I’ve some more help on troubleshooting a Discovery script.

      Here are mine (with some help of Brian):

      1. Verify that MP has been committed on agent
      2. Check agent for eventlog errors
      3. Check management server for errors
      4. Verify that discovery is running
      5. Enable debug events in script
      6. Debug script on agent

       

      Step 1. Verify that MP has been committed on agent.
      How?
      There are several ways. One of them is looking in the OpsMgr eventlog for EventId 1201.

      Step 2. Check for agent errors.
      How?
      Check for OpsMgr EventId’s like 31876 or 21405 or other Health Service Module source errors.

      Step 3. Check for management server errors
      How?
      Check for OpsMgr EventId’s 10801

      Step 4. Verify that discovery is running

      How?
      You can look for your discovery script in the C:\Program Files\System Center Operations Manager 2007\Health Service State\ subdirectories with the next command:
      dir /B /S mycooldiscovery.vbs

      Did you found it? I hope so;-) More info here. Now you can use Process Monitor from SystInternals to monitor your cscript vb discovery script. For more info on how to use Process Monitor go to Jeevan Bish’s blog.

      Step 5. Enable debug events in script.
      How?
      You can add a debug function to you discovery script that writes info the eventlog using oAPI.LogScriptEvent in your discovery script. For more info on using oAPI.LogScriptEvent take a look at MSDN.

      Step 6. Debug script on Agent.
      How?
      See Kevin’s post on how to do this. You can alslo take a look at Brian Wren’s Demo Store App Management on OpsManJam for an LogDebugEvent Function.

      '

      '==================================================================================
      ' Sub:        LogDebugEvent
      ' Purpose:    Logs an informational event to the Operations Manager event log
      '            only if Debug argument is true
      '==================================================================================
      Sub LogDebugEvent(EventNo,Message)

          Message = VbCrLf & Message
          If bDebug = True Then
              Call oAPI.LogScriptEvent(SCRIPT_NAME,EventNo,EVENT_LEVEL_INFO,Message)
          End If
      End Sub


      More blogposts on MP Authoring after this week of MP Authoring training.

      Checking dll version of updated files after installation of hotfixes

      $
      0
      0

      Today I was troubleshooting an OpsMgr Issue what seemed to be caused by using the wrong MOMIISModules.dll.

      On some servers we saw the next OpsMgr EventID’s popping up:

      Log Name: Operations Manager
      Source: HealthService
      Date: 28-9-2010 10:12:55
      Event ID: 4507
      Task Category: Health Service
      Level: Error
      Keywords: Classic
      User: N/A
      Computer: servername1.customer.corp
      Description:Creation of module with CLSID "{64D5DB86-322D-4A18-AAA9-4BFE063624A5}" failed with error "0x800700C1" in rule "Microsoft.Windows.InternetInformationServices.2008.Discover24To32WebSites" running for instance "IIS Web Server" with id:"{8CD0918D-53F7-8B5A-9655-523CFD38BE5E}" in management group "MG1".

       

      Followed by:

      Log Name: Operations Manager
      Source: HealthService
      Date: 28-9-2010 10:12:55
      Event ID: 1103
      Task Category: Health Service
      Level: Warning
      Keywords: Classic
      User: N/A
      Computer: servername1.customer..corp
      Description:
      Summary: 1 rule(s)/monitor(s) failed and got unloaded, 1 of them reached the failure limit that prevents automatic reload. Management group "MG1". This is summary only event, please see other events with descriptions of unloaded rule(s)/monitor(s).

      All the event errors are generated by the IIS 7.0 MP.

      Background info:
      OpsMgr Environment: OpsMgr 2007 SP1
      IIS 7.0 MP and version: Windows Server 2008 Internet Information Services 7.0, version: 6.0.6539.0
      Hotfixes installed: KB 954049; KB 957123 QFE; KB971541-ENU;

       

      Troubleshooting steps:

      1. Checking error info about 0x800700C1.
      You can use the tool ERR.exe for this purpose. ERR.exe helps to determine error values from decimal and hexadecimal error codes in Microsoft Windows® operating systems.

      E:\Err>err 0x800700C1
      # as an HRESULT: Severity: FAILURE (1), Facility: 0x7, Code 0xc1 # for hex 0xc1 / decimal 193 :
      SPECIAL_POOL_DETECTED_MEMORY_CORRUPTION bugcodes.h
      SQL_193_severity_15 sql_err
      # The object or column name starting with '%.*ls' is too # long. The maximum length is %d characters.
      ERROR_BAD_EXE_FORMAT winerror.h
      # %1 is not a valid Win32 application.
      # 3 matches found for "0x800700C1"

      This could indicate that there is something wrong one of the *Module.dlls.

      2. Check KB articles for the correct File Versions and File Sizes.
      First you need to check which dll versions are upgraded after the hotfix installations. The easiest way to do this is by going to the KB article and check the files names table.
      Example:

      According to hotfix (http://support.microsoft.com/kb/957123)

      The next file versions should be updated for x-64 bit:

      File name

      File version

      File size

      Date

      Time

      Platform

      Momiismodules.dll

      6.0.6278.43

      665,464

      08-Dec-2008

      21:17

      x64

      Mommodulemsgs.dll

      6.0.6278.43

      313,720

      08-Dec-2008

      21:17

      x64

      Mommodules.dll

      6.0.6278.43

      3,281,272

      08-Dec-2008

      21:17

      x64

      Mommodules2.dll

      6.0.6278.43

      351,608

      08-Dec-2008

      21:17

      x64

      Momagentinstaller.exe

      6.0.6278.56

      259,456

      26-Mar-2009

      15:45

      x64

       

      According to hotfix http://support.microsoft.com/kb/971541 (SP1 Update) the next file versions should be updated:

      x-64:

      File name

      File version

      File size

      Date

      Time

      Platform

      Momiismodules.dll

      6.0.6278.100

      685,952

      2-Nov-09

      23:08

      x64

      Mommodulemsgs.dll

      6.0.6278.100

      312,688

      29-Sep-09

      15:09

      x64

      Mommodules.dll

      6.0.6278.100

      3,352,448

      2-Nov-09

      23:08

      x64

      Mommodules2.dll

      6.0.6278.100

      363,392

      2-Nov-09

      23:08

      x64

      x-86:

      File name

      File version

      File size

      Date

      Time

      Platform

      Momiismodules.dll

      6.0.6278.100

      363,888

      2-Nov-09

      23:16

      x86

      Mommodulemsgs.dll

      6.0.6278.100

      313,200

      29-Sep-09

      15:08

      x86

      Mommodules.dll

      6.0.6278.100

      1,860,464

      2-Nov-09

      23:16

      x86

      Mommodules2.dll

      6.0.6278.100

      253,296

      2-Nov-09

      23:16

      x86

      So we should expect to see a Momiismodules.dll file with a version of 6.0.6278.100 and size of 685,952 on our Windows 2008 64-bit IIS 7.0 Server.

      3. The next steps is comparing above File Versions and File Sizes with the file information on the agents (having issues).

      For this I created a vbscript and PowerShell script that queries WMI and uses a servers.txt file as input.

      'Vbscript to find OpsMgr dll info for troubleshooting hotfix update issue
      'Author: Stefan Stranger
      'Date:   10-4-2010

      On error resume next

      Const strInputFile = "d:\temp\servers.txt" 
      Const ForReading = 1
      Set objFSO = CreateObject("Scripting.FileSystemObject")
      Set objTextFile = objFSO.OpenTextFile _
          (strInputFile, ForReading)
      Do Until objTextFile.AtEndOfStream
          strComputer = objTextFile.Readline
          Wscript.Echo "Server to be queried: " & strComputer


      Set objWMIService = GetObject("winmgmts:" _
          & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

      Set colFiles = objWMIService.ExecQuery _
           ("Select * from CIM_DataFile where Drive = 'C:' AND Path = '\\Program Files\\System Center Operations Manager 2007\\' and Extension='dll'")

      For Each objFile in colFiles
          Wscript.Echo "****************************************"
          Wscript.Echo "Creation date: " & mid(objfile.CreationDate,5,2) & "/" &_
                      mid(objfile.CreationDate,7,2) & "/" & mid(objfile.CreationDate,1,4)
          Wscript.Echo "Computer system name: " & objFile.CSName
          Wscript.Echo "Extension: " & objFile.Extension
          Wscript.Echo "File name: " & objFile.FileName
          Wscript.Echo "File size: " & objFile.FileSize
          Wscript.Echo "File type: " & objFile.FileType
          Wscript.Echo "Last accessed: " & mid(objfile.LastAccessed,5,2) & "/" &_
                      mid(objfile.LastAccessed,7,2) & "/" & mid(objfile.LastAccessed,1,4)
          Wscript.Echo "Last modified: " & mid(objfile.LastModified,5,2) & "/" &_
                      mid(objfile.LastModified,7,2) & "/" & mid(objfile.LastModified,1,4)
          Wscript.Echo "Manufacturer: " & objFile.Manufacturer
          Wscript.Echo "Name: " & objFile.Name
          Wscript.Echo "Path: " & objFile.Path
          Wscript.Echo "Version: " & objFile.Version
          Wscript.Echo "****************************************"
          Wscript.Echo
      Next

      loop

       

      Save above vbscript to OpsMgrFileInfo.vbs and create a servers.txt file with on each line a server name.

      Example (servers.txt):

      server1.contoso.com
      server2.contoso.com

       

      Or you can use the PowerShell version:

      ################################################################################ Get MOM dll's using PowerShell# This script retrieves the version of the mom dll's using WMI# Authors: Stefan Stranger (Microsoft)# Date 04-10-2010# Name: Get-OpsMgrFileVersion.ps1# v1.000 - 04/20/2010 - stefstr - initial sstranger's release################################################################################Get the servers from the servers.txt file$servers=get-content-pathC:\Scripts\OpsMgr\servers.txtforeach($serverin$servers){get-wmiobject-query"Select * from CIM_DataFile where Drive = 'C:' AND Path = '\\Program Files\\System Center Operations Manager 2007\\' and Extension='dll'"-computer$server|select-property@{n='ComputerName';e={$_.__SERVER}},FileName,Version, FileSize}

       

      You can use out-gridview for even better viewing and filtering. You can even use the export-csv cmdlet to export the results to a csv file.

      image

      image

      For our Windows 2008 64-bit IIS 7.0 server we found the next File Version info for the Momiismoduls.dll.

      C:\Temp>cscript getfileversioninfo.vbs
      Microsoft (R) Windows Script Host Version 5.7
      Copyright (C) Microsoft Corporation. All rights reserved.

      Creation date: 2009-9-29
      Computer system name: server1
      Extension: dll
      File name: MomIISModules
      File size: 357888
      File type: Application Extension
      Last accessed: 2010-03-14
      Last modified: 2009-09-29
      Manufacturer: Microsoft Corporation
      Name: c:\program files\system center operations manager 2007\momiismodules.dll
      Path: \program files\system center operations manager 2007\
      Version: 6.0.6278.100

       

      As stated before we should expect to see a Momiismodules.dll file with a version of 6.0.6278.100 and size of 685,952 on our Windows 2008 64-bit IIS 7.0 Server.

      So it seems that the File Size is incorrect and this indicates that instead of the 64-bit version of the Momiismodules.dll the 32-bit version is being used.

      To confirm if I was correct I used the EXE Explorer from Mitec. It reads and displays executable file properties and structure.

      clip_image002

      As you see the MomIISModules.dll is 32-bit instead of 64-bit.

      After copying a 64-bit momiismodules.dll to the server discoveries started to work again.

       

      No idea though how it was possible to have a 32-bit momiismodules.dll on a 64-bit OpsMgr Agent and OS. If you have any ideas please let me know.

       

      Have fun troubleshooting!

      Compare two different csv files using PowerShell

      $
      0
      0

      Today I needed to compare two csv files with results from SQL queries from the OperationsManager database and the OperationsManagerDW database. I run the SQL queries on both OperationsManager databases and saved the result to a csv file. Now I needed to quickly compare the results from both csv files, and what better way than to use PowerShell.

      Here is an example how you can use PowerShell to quickly compare two csv files:

      First some example CSV files:

      Example CSVFile1.csv

      ManagementPackId,MPFriendlyName,MPName,mp.MPVersionDependentId,MPLastModified,MPKeyToken,ContentReadable
      3A7609F3-A5AB-F205-5001-010EE387DD28,Customer - Exchange 2007 MP overrides,Customer.Exchange.MP.overrides,5D49AADA-DFEE-40DC-9A32-2758FC71B426,2011-01-06 16:39:57.517,NULL,1
      49C911AC-337C-CD94-DD13-021E2CFDDAB0,Customer - SCOM MS,Customer.SCOM.MS,9FA54A57-B123-44AE-A9AB-ED1A1C4CDB35,2011-01-27 09:16:28.100,NULL,1
      C0A4183F-4318-CB0C-EF5A-054B32AE33B4,Windows Server 2000 Operating System Overrides,Windows.Server.2000.Operating.System.Overrides,6293AED6-DE8F-462E-AD54-1F83F2E33F82,2011-02-04 14:38:19.330,NULL,1
      3DFAC27F-8551-B71B-7DD2-30156A31CD92,Customer - Citrix Beheer - WIS Servers Events,Customer.Citrix.Beheer.WIS.Servers.Events,4496E575-C63C-4B45-BEF7-6216668264F7,2010-12-06 01:54:15.963,NULL,1
      3AFE86A8-827C-CDB6-9A84-32C67483C3D1,Windows cluster management monitoring - overrides,Windows.cluster.management.monitoring.overrides,243D4B09-9455-4737-9880-399CF2700CF4,2011-02-04 16:07:11.377,NULL,1
      6569E210-F188-EEF7-05CA-331859F4D8C6,Customer - Citrix Beheer,Customer.Citrix.Beheer,8109BB67-C923-4814-A1DB-F2A386B2389B,2011-01-17 13:58:08.690,NULL,1
      8BDC857A-7F32-40A7-E5C2-4583E263B290,Customer - ISA server 2006,Customer.ISA.server,68F24CBA-B6C7-474B-A09B-03B0D730609B,2011-01-07 10:56:51.290,NULL,1
      C39E8EF5-5E04-9CAE-F467-61D87ACD5E9E,Customer - Windows Server - SCCM,Customer.Windows.Server.SCCM,7BB1925D-007A-4621-BAD3-56F87B49C4C8,2011-01-17 13:02:28.880,NULL,1
      A2B5CA86-96F7-F4CA-2152-63274CEF3336,Customer - Sharepoint Server,Customer.Sharepoint.Server,26E07753-0740-450F-972C-6A16C2099C12,2011-01-06 07:26:36.533,NULL,1
      5BC992B2-96F6-E192-6E92-65FB5EC0CE5E,Customer - SQL Server (Monitoring),Customer.SQL.Server.Monitoring,2618C5C0-D89F-4E86-8259-FD7809D75E7C,2011-02-07 14:12:14.613,NULL,1
      E4056BA9-CFC7-2D04-FF9B-67084CC15E83,Customer - Print Servers,Customer.Print.Servers,C336C3FD-CF15-4319-A33E-00F4BF2A390D,2010-11-24 10:14:22.660,NULL,1
      3EECB872-CC4A-62BC-EA39-855EF594852D,Customer - Print Beheer Menu MP,Customer.Print.Beheer.Menu.MP,6F12D09D-0A55-40BA-A320-B571E9554ADE,2010-12-21 12:49:53.603,NULL,1
      A2D688EC-8AE1-C4AF-A485-8564C214D292,Customer - Arcserve MP,Customer.Arcserve.MP,7AECFE66-51F6-4174-B84C-E918140F37F2,2010-12-03 11:51:39.080,NULL,1
      A3542697-E0E7-E382-D40B-86ADEC512D79,Windows Server 2008 Operating System (Monitoring) Overrides,Windows.Server.2008.Operating.System.Monitoring.Overrides,20BCC6DC-F928-4108-B70F-873639A0448A,2010-12-16 12:16:40.800,NULL,1
      070A0205-56D6-FF84-688A-8A216A47A949,Customer - Fileservers Dienst,Customer.Fileservers.Dienst,7DDF2381-3B13-4971-9E91-6656075C2E60,2010-12-22 09:26:50.683,NULL,1
      98701ABB-AF93-7E5A-D121-9A18E0037CE8,Customer - DSA & PKI Gateways,Customer.DSA.PKI.Gateways,95B49F67-9514-4E80-991D-B3CF4EA2632F,2010-12-20 11:38:44.697,NULL,1
      FA4FDEAF-E107-8AA3-BD2C-9E29C58C0C53,Customer - PKI Management,Customer.PKI.Management,6B677888-07F1-4725-BA3F-E742B20FA9C4,2011-01-27 08:45:23.153,NULL,1
      51DA566A-1AC1-5DC9-3F66-A11FC439357C,nworks VMware Virtual Enterprise Monitoring MP,nworks.VMware.VEM,599A587E-3357-A127-50EF-198F04365ADA,2010-11-23 11:10:29.243,65c40f14a98ce59b,1
      512DB9E6-D21A-2E4F-E987-A28BDE8F940B,Customer - Exchange availability,Customer.Exchange.availability,1D0DDA6B-9ED2-48C0-BFEE-1538DA9AE16F,2010-12-27 10:10:30.707,NULL,1
      DD81FA7E-73BF-332B-C4B6-A767BB514BE8,Customer - Connect Direct,Customer.Connect.Direct,9C6BB3FD-6582-4F18-B18C-7BBE4DB9FCA6,2011-01-31 13:47:15.613,NULL,1
      155A8BBB-C6D2-C706-DD1C-B7EFCCCC0E81,Customer - AD Beheer,Customer.AD.Beheer,CF036BAA-47C0-4D09-A2F4-25B3DC1F78B9,2011-01-05 13:17:15.520,NULL,1
      E2296ED5-DDBC-EBC7-3881-C5288ADAA7CF,Microsoft Exchange Server 2010 Management Pack,Microsoft.Exchange.2010,AB06EB14-EAF1-0F0B-04B8-F1CDD33F4ACC,2011-02-04 09:02:29.607,31bf3856ad364e35,1
      9E138797-AE1C-AF6E-E61B-D110253B417C,Engyro Connector TEC,Engyro.Connector.TEC.MP,76306617-5F13-42EB-9F3B-B948F18DC4D8,2010-11-23 11:29:55.980,NULL,1
      A3C3E706-795F-BF80-DFC2-DBB4BDDFA919,Customer - ACS Management Pack,Customer.ACS.Management.Pack,D7C4F7A2-B18D-454F-8615-22CEC4EFDFCA,2011-01-04 12:30:01.593,NULL,1
      7C2A6181-B7B9-89C2-6FC3-EDB760FCEFC1,Microsoft Exchange Server 2007 CAS Monitoring - Override,Microsoft.Exchange.Server.CAS.Monitoring.Override,BA79A086-E992-4AB7-B4B6-933FB8AD1211,2011-01-07 12:39:36.870,NULL,1

       

      Example CSVFile2.csv

      ManagementPackId,MPFriendlyName,MPName,mp.MPVersionDependentId,MPLastModified,MPKeyToken,ContentReadable
      3A7609F3-A5AB-F205-5001-010EE387DD28,Customer - Exchange 2007 MP overrides,Customer.Exchange.MP.overrides,5D49AADA-DFEE-40DC-9A32-2758FC71B426,2011-01-06 16:39:57.517,NULL,1
      49C911AC-337C-CD94-DD13-021E2CFDDAB0,Customer - SCOM ,Customer.SCOM,9FA54A57-B123-44AE-A9AB-ED1A1C4CDB35,2011-01-27 09:16:28.100,NULL,1
      C0A4183F-4318-CB0C-EF5A-054B32AE33B4,Windows Server 2000 Operating System Overrides,Windows.Server.2000.Operating.System.Overrides,6293AED6-DE8F-462E-AD54-1F83F2E33F82,2011-02-04 14:38:19.330,NULL,1
      F37D0C95-F313-4EC9-5385-0F41BFCFE55D,Customer Custom Monitoring,Customer.Custom.Monitoring,44597F97-6FD4-4D2E-B01E-5CDB9B218E50,2011-01-27 08:52:20.377,NULL,1
      75E3375E-B1CD-4641-E86B-2664A7E7E7C2,Customer - Microsoft Exchange 2010 Override MP,Customer.Microsoft.Exchange.Override.MP,6DC9439A-BD4C-46C0-8D2F-080029042A6D,2011-02-04 11:12:40.857,NULL,1
      3DFAC27F-8551-B71B-7DD2-30156A31CD92,Customer - Citrix Beheer - WIS Servers Events,Customer.Citrix.Beheer.WIS.Servers.Events,4496E575-C63C-4B45-BEF7-6216668264F7,2010-12-06 01:54:15.963,NULL,1
      3AFE86A8-827C-CDB6-9A84-32C67483C3D1,Windows cluster management monitoring - overrides,Windows.cluster.management.monitoring.overrides,243D4B09-9455-4737-9880-399CF2700CF4,2011-02-04 16:07:11.377,NULL,1
      6569E210-F188-EEF7-05CA-331859F4D8C6,Customer - Citrix Beheer,Customer.Citrix.Beheer,8109BB67-C923-4814-A1DB-F2A386B2389B,2011-01-17 13:58:08.690,NULL,1
      B5FE879F-CD35-DD9A-7464-36401ABB9205,Microsoft Exchange 2010 Report Library,Microsoft.Exchange.2010.Reports,112EA102-A45A-9AA9-C84D-1ED9A56E8C61,2011-02-04 10:31:14.137,31bf3856ad364e35,1
      DA187E72-B9D7-9E16-D098-3B0A624DC38C,My Default Management Pack,Microsoft.SystemCenter.OperationsManager.DefaultUser,497CE20F-02AF-417E-97B1-363F311CF739,2011-02-03 16:37:16.093,NULL,1
      8BDC857A-7F32-40A7-E5C2-4583E263B290,Customer - ISA server 2006,Customer.ISA.server,68F24CBA-B6C7-474B-A09B-03B0D730609B,2011-01-07 10:56:51.290,NULL,1
      C39E8EF5-5E04-9CAE-F467-61D87ACD5E9E,Customer - Windows Server - SCCM,Customer.Windows.Server.SCCM,7BB1925D-007A-4621-BAD3-56F87B49C4C8,2011-01-17 13:02:28.880,NULL,1
      A2B5CA86-96F7-F4CA-2152-63274CEF3336,Customer - Sharepoint Server,Customer.Sharepoint.Server,26E07753-0740-450F-972C-6A16C2099C12,2011-01-06 07:26:36.533,NULL,1
      5BC992B2-96F6-E192-6E92-65FB5EC0CE5E,Customer - SQL Server (Monitoring),Customer.SQL.Server.Monitoring,2618C5C0-D89F-4E86-8259-FD7809D75E7C,2011-02-07 14:12:14.613,NULL,1
      E4056BA9-CFC7-2D04-FF9B-67084CC15E83,Customer - Print Servers,Customer.Print.Servers,C336C3FD-CF15-4319-A33E-00F4BF2A390D,2010-11-24 10:14:22.660,NULL,1
      336987CD-60EF-5014-F384-7D37DE784858,Nworks Overrides,Nworks.Overrides,5EF45858-0DC1-4E67-9AFD-F70A2446CCA9,2011-01-25 10:20:27.143,NULL,1
      3EECB872-CC4A-62BC-EA39-855EF594852D,Customer - Print Beheer Menu MP,Customer.Print.Beheer.Menu.MP,6F12D09D-0A55-40BA-A320-B571E9554ADE,2010-12-21 12:49:53.603,NULL,1
      A2D688EC-8AE1-C4AF-A485-8564C214D292,Customer - Arcserve MP,Customer.Arcserve.MP,7AECFE66-51F6-4174-B84C-E918140F37F2,2010-12-03 11:51:39.080,NULL,1
      A3542697-E0E7-E382-D40B-86ADEC512D79,Windows Server 2008 Operating System (Monitoring) Overrides,Windows.Server.2008.Operating.System.Monitoring.Overrides,20BCC6DC-F928-4108-B70F-873639A0448A,2010-12-16 12:16:40.800,NULL,1
      070A0205-56D6-FF84-688A-8A216A47A949,Customer - Fileservers Dienst,Customer.Fileservers.Dienst,7DDF2381-3B13-4971-9E91-6656075C2E60,2010-12-22 09:26:50.683,NULL,1
      98701ABB-AF93-7E5A-D121-9A18E0037CE8,Customer - DSA & PKI Gateways,Customer.DSA.PKI.Gateways,95B49F67-9514-4E80-991D-B3CF4EA2632F,2010-12-20 11:38:44.697,NULL,1
      FA4FDEAF-E107-8AA3-BD2C-9E29C58C0C53,Customer - PKI Management,Customer.PKI.Management,6B677888-07F1-4725-BA3F-E742B20FA9C4,2011-01-27 08:45:23.153,NULL,1
      51DA566A-1AC1-5DC9-3F66-A11FC439357C,nworks VMware Virtual Enterprise Monitoring MP,nworks.VMware.VEM,599A587E-3357-A127-50EF-198F04365ADA,2010-11-23 11:10:29.243,65c40f14a98ce59b,1
      512DB9E6-D21A-2E4F-E987-A28BDE8F940B,Customer - Exchange availability,Customer.Exchange.availability,1D0DDA6B-9ED2-48C0-BFEE-1538DA9AE16F,2010-12-27 10:10:30.707,NULL,1
      DD81FA7E-73BF-332B-C4B6-A767BB514BE8,Customer - Connect Direct,Customer.Connect.Direct,9C6BB3FD-6582-4F18-B18C-7BBE4DB9FCA6,2011-01-31 13:47:15.613,NULL,1
      155A8BBB-C6D2-C706-DD1C-B7EFCCCC0E81,Customer - AD Beheer,Customer.AD.Beheer,CF036BAA-47C0-4D09-A2F4-25B3DC1F78B9,2011-01-05 13:17:15.520,NULL,1
      E2296ED5-DDBC-EBC7-3881-C5288ADAA7CF,Microsoft Exchange Server 2010 Management Pack,Microsoft.Exchange.2010,AB06EB14-EAF1-0F0B-04B8-F1CDD33F4ACC,2011-02-04 09:02:29.607,31bf3856ad364e35,1
      9E138797-AE1C-AF6E-E61B-D110253B417C,Engyro Connector TEC,Engyro.Connector.TEC.MP,76306617-5F13-42EB-9F3B-B948F18DC4D8,2010-11-23 11:29:55.980,NULL,1
      A3C3E706-795F-BF80-DFC2-DBB4BDDFA919,Customer - ACS Management Pack,Customer.ACS.Management.Pack,D7C4F7A2-B18D-454F-8615-22CEC4EFDFCA,2011-01-04 12:30:01.593,NULL,1
      7C2A6181-B7B9-89C2-6FC3-EDB760FCEFC1,Microsoft Exchange Server 2007 CAS Monitoring - Override,Microsoft.Exchange.Server.CAS.Monitoring.Override,BA79A086-E992-4AB7-B4B6-933FB8AD1211,2011-01-07 12:39:36.870,NULL,1
      94DDD8EA-2A12-9E54-9545-F4A926DBACF0,System Center Core Monitoring Overrides,System.Center.Core.Monitoring.Overrides,BA527C6E-0E2C-440C-9358-6D073BBD4722,2010-12-07 07:25:25.517,NULL,1

       

      Now we can compare both files with the use of the compare-object cmdlet in PowerShell.

      $file1 = import-csv -Path "C:\temp\Test1.csv"
      $file2 = import-csv -Path "C:\temp\Test2.csv"
      Compare-Object $file1 $file2 -property MPFriendlyName -IncludeEqual

       

      image

      Have fun with PowerShell and the compare-object cmdlet.

       

      (stefan.stranger).gettype()

      IsPublic IsSerial Name BaseType

      -------- -------- ---- --------

      True False Object[] Crappy.Planner

      Failing OM2012 Gateway Server installation

      $
      0
      0

      This week I needed to install a OM2012 Gateway Server in my demo environment (Windows Server 2012 standard) and the installation was failing with the following error.

      clip_image002

       

      After adding the .NET Framework 3.5 using PowerShell the installation was successful.

       

      clip_image002[4]

      image

      OpsMgr 2007 Event 21402

      $
      0
      0
      A colleague of mine Dirk van Coeverden has written an excellent article about troubleshooting OpsMgr 2007 Event 21402. With this article you can see how you can use the Workflow name from the Event details to trace which rule/discovery/monitor is causing the error.

      Introduction

      This article describes how to troubleshoot OpsMgr 2007 Event 21402, which indicates a script error or warning. However the article is intended to be an example for other events, since a lot of details are also in other events (like Workflow name).

              Event Type: Warning
              Event Source: Health Service Modules
              Event ID: 21402
              Description:
                      Forced to terminate the following process started 
                      at 12:08:50 PM because it ran past the configured 
                      timeout 120 seconds.
       

      With this article you will find

      • The discovery, monitor or rule which causes the event
      • Retrieve the script content in a SQL table (limited by SQL2005 Studio)
      • How it looks in XML and understand the workflow

      The query to find the discovery, monitor or rule should work for every event where the workflow name is listed. The script content is more specific to 21402 but might give an impression on how to retrieve content from an XML columns (of NVARCHAR type).

      The queries aren't tested for performance, so the best course is to import the MP of the customer in your test environment and run them on your own machine.

       

      21402 details

      An example of 21402 is

              Event Type: Warning
              Event Source: Health Service Modules
              Event Category: None
              Event ID: 21402
              Date: 7-4-2008
              Time: 4:05:34
              User: N/A
              Computer: server01
              Description:
              Forced to terminate the following process started at 
              04:05:04 because it ran past the configured timeout 30 
              seconds.
      
      
              Command executed: "C:\WINDOWS\system32
              \cscript.exe" /nologo "C:\Program Files\System Center 
              Operations Manager 2007\Health Service State\Monitoring Host 
              Temporary Files 297\177
              \CheckVirtualMachineNameMatchComputerName.vbs"
      
      
              Working Directory: C:\Program Files\System Center Operations 
              Manager 2007\Health Service State\Monitoring Host Temporary 
              Files 297\177\ 
      
      
              One or more workflows were affected by this.  
      
      
              Workflow name: Microsoft.Virtualization.VirtualServer.2005R2.VirtualMachineName_does_not_match_computer_name.rule
              Instance name: servern01.contoso.com 
              Instance ID: {3B3FA6E2-BB6B-CD49-274A-8722250C3D0C} 
              Management group: OpsMgrdemo
      
      
              For more information, see Help and Support Center at 
              http://go.microsoft.com/fwlink/events.asp.

      Important Event Elements

      Command Executed:

      "C:\WINDOWS\system32cscript.exe" /nologo "C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 297\177\CheckVirtualMachineNameMatchComputerName.vbs"

      Working Directory:

      C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 297\177\

      Script:

      CheckVirtualMachineNameMatchComputerName.vbs

      Workflow:

      Microsoft.Virtualization.VirtualServer.2005R2.VirtualMachineName_does_not_match_computer_name.rule

      Which discovery monitor or rule?

      To find out which discovery monitor or rule the script belongs to run the following SQL script (based on the example event above) on the OperationsManager database.

       DECLARE @ObjectName NVARCHAR(256)
      
      
       SET @ObjectName = 'Microsoft.Virtualization.VirtualServer.2005R2.VirtualMachineName_does_not_match_computer_name.rule'
      
      
       IF EXISTS (SELECT 1 FROM DiscoveryView WITH (NOLOCK) WHERE Name = @ObjectName) 
              SELECT 
                      'Discovery' As 'Object Type',
                      d.DisplayName AS 'Displayname in Console',
                      d.Name AS 'Internal Monitor Name',
                      d.Id AS 'MonitorId',
                      p.Displayname AS 'ManagementPack',
                      p.Version AS 'ManagementPack Version',
                      p.Name AS 'Management Pack Library Name'
              FROM DiscoveryView d WITH (NOLOCK)
              INNER JOIN ManagementPackView p WITH (NOLOCK) ON d.ManagementPackId = p.Id
              WHERE d.Name = @ObjectName
       ELSE IF EXISTS (SELECT 1 FROM MonitorView WITH (NOLOCK) WHERE Name = @ObjectName) 
              SELECT 
                      'Monitor' AS 'Object Type',
                      m.DisplayName AS 'Displayname in Console',
                      m.Name AS 'Internal Monitor Name',
                      m.Id AS 'MonitorId',
                      p.Displayname AS 'ManagementPack',
                      p.Version AS 'ManagementPack Version',
                      p.Name AS 'Management Pack Library Name'
              FROM MonitorView m WITH (NOLOCK) 
              INNER JOIN ManagementPackView p WITH (NOLOCK) ON m.ManagementPackId = p.Id
              WHERE m.Name = @ObjectName
       ELSE IF EXISTS (SELECT 1 FROM RuleView WITH (NOLOCK) WHERE Name = @ObjectName) 
              SELECT 
                      'Rule' AS 'Object Type',
                      r.DisplayName AS 'Displayname in Console',
                      r.Name AS 'Internal Rule Name',
                      r.Id AS 'RuleId',
                      p.Displayname AS 'ManagementPack',
                      p.Version AS 'ManagementPack Version',
                      p.Name AS 'Management Pack Library Name'
              FROM RuleView r WITH (NOLOCK) 
              INNER JOIN ManagementPackView p WITH (NOLOCK) ON r.ManagementPackId = p.Id
              WHERE r.Name = @ObjectName

      This will give the following results

      Object Type Displayname_in_Console Internal Rule Name RuleId ManagementPack ManagementPack Version Management Pack Library Name
      RuleVirtual Machine: Virtual machine name does not match computer name Microsoft.Virtualization.VirtualServer.2005R2. VirtualMachineName.rule E465679D-BC55-C4D3-FEF0-C108DF37DFD9 Microsoft Virtual Server 2005 R2 1.0.2627.0 Microsoft.Virtualization.VirtualServer.2005R2

      In the OpsMgr Console / Authoring you can find the Discovery, Monitor or Rule (depending on Object Type) in Management Pack Objects.

      Retrieve the script content

      To retrieve the script you can run the following SQL query on the OperationsManager database.

       SELECT 
               ManagementPackId,
               ScriptName,
               ScriptFile
       FROM (        
               SELECT 
                       ManagementPackId,
                       Script.Col.value('(Name/text())[1]', 'NVARCHAR(128)') AS ScriptName,
                       Script.Col.value('(Contents/text())[1]', 'NVARCHAR(MAX)') AS ScriptFile
               FROM (SELECT ManagementPackId, CONVERT(XML, MPXML) AS MPXMLFormat, MPName FROM ManagementPack) p 
               CROSS APPLY p.MPXMLFormat.nodes('//File') Script(Col)
               WHERE p.MPName LIKE '%2005R2%') s
       WHERE s.ScriptName = 'CheckVirtualMachineNameMatchComputerName.vbs'

      Take note that SQL 2005 Studio has a limit of (about) 8000 char for its return results. Also since the MPXML field of the ManagementPack table is not of type XML but NVARCHAR, the formatting isn't really fancy. However it might give you a quick impression of what the script is about.

      If people find this a useful query, I can work out one which gives a nice formatted output of the script content.

      In XML

      If you want to see how it is build up and configured in XML than

      • Export MP (Powershell Export-ManagementPack)
      • In .xml search for <Rule ID="Microsoft.Virtualization.VirtualServer.2005R2.VirtualMachineName_does_not_match_computer_name.rule"

      This looks like

      <Rule ID="Microsoft.Virtualization.VirtualServer.2005R2.VirtualMachineName_does_not_match_computer_name.rule" Enabled="true" Target="Windows! Microsoft.Windows.Computer" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100"><Category>AvailabilityHealth</Category><DataSources><DataSource ID="DS" TypeID="Microsoft.Virtualization.VirtualServer.2005R2.CheckVirtualMachineName"><IntervalInSeconds>60</IntervalInSeconds><Expression><And><Expression><SimpleExpression><ValueExpression><XPathQuery Type="String">Property[@Name='IsVirtualMachine']</XPathQuery></ValueExpression><Operator>Equal</Operator><ValueExpression><Value Type="String">True</Value></ValueExpression></SimpleExpression></Expression>
               ...

      Here you find all the properties of the (in this case) the rule. Actually you can read the workflow of this object here. One part of the workflow is the Databasource ModuleType

      <DataSource ID="DS" TypeID="Microsoft.Virtualization.VirtualServer.2005R2.CheckVirtualMachineName">

      This points to the ModulesType part of the XML file

      <ModuleTypes><DataSourceModuleType ID="Microsoft.Virtualization.VirtualServer.2005R2.VirtualServerVirtualMachineDiscovery" Accessibility="Internal" Batching="false"><DataSourceModuleType ID="Microsoft.Virtualization.VirtualServer.2005R2.RelVirtualMachineComputerDiscovery" Accessibility="Internal" Batching="false"><DataSourceModuleType ID="Microsoft.Virtualization.VirtualServer.2005R2.VirtualMachineComputerDiscovery" Accessibility="Internal" Batching="false"><DataSourceModuleType ID="Microsoft.Virtualization.VirtualServer.2005R2.VirtualMachineState" Accessibility="Internal" Batching="false"><DataSourceModuleType ID="Microsoft.Virtualization.VirtualServer.2005R2.CheckVirtualMachineName" Accessibility="Internal" Batching="false"><Configuration><IncludeSchemaTypes><SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType></IncludeSchemaTypes><xsd:element name="IntervalInSeconds" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /><xsd:element name="Expression" type="ExpressionType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /></Configuration><OverrideableParameters><OverrideableParameter ID="IntervalInSeconds" Selector="$Config/IntervalInSeconds$" ParameterType="int" /></OverrideableParameters>
             ....

      Here you will find the Module itself which is executed

      <MemberModules><DataSource ID="DS" TypeID="System!System.CommandExecuterPropertyBagSource"><IntervalSeconds>$Config/IntervalInSeconds$</IntervalSeconds><ApplicationName>%windir%\system32\cscript.exe</ApplicationName><WorkingDirectory /><CommandLine>/nologo $file/CheckVirtualMachineNameMatchComputerName.vbs$</CommandLine><TimeoutSeconds>30</TimeoutSeconds><RequireOutput>true</RequireOutput><Files><File><Name>CheckVirtualMachineNameMatchComputerName.vbs</Name><Contents>        
       ' Copyright (c) Microsoft Corporation. All rights reserved.
       ' VBScript source code
       ' CheckVirtualMachineNameMatchComputerName.vbs
       ' Arg 0 : SourceID
       Option Explicit 
      
      
       Const StrVMMManagementGroupInstallationRegKey = "HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager 2007 Server\Setup\InstallPath"
       Const StrVirtualServerRegKey = "HKLM\System\CurrentControlSet\Services\Virtual Server\Start"
       Const StrVMMServerInstallationRegKey = "HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager 2007 Server\Setup\InstallPath"
       Const StrVMMServerVersionRegKey = "HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager 2007 Server\Setup\ProductVersion"
       Const StrVMMSelfServiceServerInstallationRegKey = "HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager 2007 Self-Service  Portal\Setup\InstallPath"
       Const StrVMMSSsiteEngineMachineRegKey = "HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager 2007 Self-Service  Portal\Settings\VmmServerName"
       Const StrVMMDatabaseServerRegKey = "HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager 2007 Server\Settings\Sql\OnRemoteServer"
       Const StrVMMDatabaseNameRegKey = "HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager 2007 Server\Settings\Sql\DatabaseName"
       Const StrVMMDatabaseInstanceRegKey = "HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager 2007 Server\Settings\Sql\InstanceName"
       Const StrVMMRemoteDatabaseMachineFQDNRegKey = "HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager 2007  Server\Settings\Sql\MachineFQDN"
       Const StrVMMConsoleInstallationRegKey = "HKLM\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager 2007 Administrator Console\Setup\InstallPath"
       Const StrVMNameRegKey = "HKLM\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters\VirtualMachineName"
      
      
       Const StrWebsitDisplayName = "Microsoft System Center Virtual Machine Manager 2007 Self-Service Portal"
       Const StrSQLServerDefaultInstance = "MSSQLSERVER"
       Const StrEmpty = ""
       Const StrFolderSeparator = "\"
       Const StrLocationHost = "Host"
       Const StrLocationLibrary = "Library"
      
      
       '=============
       ' Method:       ReadRegistry
       ' Description:  This function read the regiestry, return true if the registry exit; otherwise return false
       '=============
       Function ReadRegistry(ByVal regString, ByRef regValue)
           Dim bHasRegistry
           Dim oReg
           Set oReg = CreateObject("WScript.Shell")   
      
      
           On Error Resume Next    
           regValue = oReg.RegRead(regString)
           If Err.number &lt;> 0 Then
               bHasRegistry = False
           Else
               bHasRegistry = True
           End If
           On Error Goto 0 
      
      
           ReadRegistry = bHasRegistry
       End Function 
      
      
       Call Main()
      
      
       ... 

      The Health of the Root Management Server is in a Gray “Not Monitored” State

      $
      0
      0

      Source: SMS&MOM

      J.C. Hornbeck published an article from Lenny Wile on the Health of the Root Management Server is in a Grey “Not Monitored” State a couple of days ago. And you know what? I was facing the same issue after migrating my VM’s to Hyper-V yesterday.

      image

       

      imageimage

       

      But I also saw the next eventlogs:

      imageimage image

       imageimageimage

      Resetted the passwords for above users and restarted the  Health Service.

      image

       

      And the RMS was Healthy again.

      image

      image

      Ok not completely Healthy, but not grey anymore ;-)


      Reporting issue: Loading reporting hierarchy failed

      $
      0
      0

      Update: This is caused by by how the particular domain environment was constructed. Read more on http://blogs.technet.com/operationsmgr/archive/2009/01/27/opsmgr-2007-error-running-report-message-loading-reporting-hierarchy-failed-access-is-denied.aspx

      After trying to open Reporting from the Ops Console I got the next error:

      image

      I checked if Reporting was configured correctly with the Configure Report Server tool.

      image

      Checked if SharePoint Integration was enabled. And that wasn’t the case.

      Tried to open ReportServer in a Browser.

      image

      Restarted the SQL Server Reporting Services (MSSQLSERVER) service. But still no luck.

      Opened Configure Report Server tool again and applied the Default Settings for the Report Server Virtual Directory and Report Manager Virtual Directory.

      image

      Re-entered the correct password for the Windows Service Identity and clicked Apply.

      image

      Now the Web Service Identity failed.

      image

      Changed the Web Service Identity for the Report Server and Report Manager from the DefaultAppPool to ReportServer. After the refresh the ASP.NET Service Account changed automatically from NT Authority\NetworkService to CONTOSO\OM_DRA.

      image

      Clicked Apply and did a Refresh and that solved it.

      image

      Answer: Operations Manager Authoring questions from SQLBatman

      $
      0
      0

      I saw a question of SQLBatman about Operations Manager Authoring.

      Here my attempt to answer those questions.

      Q: Referenced MP could not be found

      A: Search on your (Root) Management Server for *.mp files and copy all these files to one directory, like c:\Mps.  If your Authoring Console is on another machine then your (Root) Management Server copy these files to this machine.

      Add this directory to the References in Options
      image

      Q: Create a custom attribute to the SQL DB Engine

      A: I only found that there are only two WMI Providers for Microsoft SQL Server 2005: WMI Provider for Configuration Management and WMI Provider for Server Events.
          Source: Microsoft Windows PowerShell and SQL Server 2005 WMI Providers – Part 1 and Microsoft Windows PowerShell and SQL Server 2005 WMI Providers - Part 2

          I’ve to look for more info about this question, but I at the moment I don’t have much time. But I’ll try to look into this soon.

      Debugging OpsMgr Scripts

      $
      0
      0

      One of the great advantages of OpsMgr 2007 against MOM 2005 is that you can easily test OpsMgr 2007 scripts from the command prompt.

      Just go to the C:\Program Files\System Center Operations Manager 2007\Health Service State and open a command prompt.

      Type DIR /B /S *.vbs and you find all the scripts that are used on that specific agent. And if you have found your script to debug you can easily run it with cscript and see what happens.

      But what if a scripts needs some parameters? Most of the time these are GUIDS and how do you find the right parameters?

      A colleague of mine Dirk van Coeverden found an easy way to find these parameters.

      Let’s Look at the Operational Database Space Free (%) Monitor.

      image

      This Monitor uses a vbscript GetOpsMgrDBPercentageFreeSpace.vbs which needs two parameters to work

      image

      So if we want to debug this script we need two parameters; DatabaseServerName and DatabaseName.

      How do we find those parameters?

      First we need to go to the Authoring Pane in the Opsmgr Console and find the monitor which runs this script.

      image

      Then we change the default timeout of the script to something smaller then the default with an override. Say 1 second.

      image

      Now we have to wait for this monitor to run again and hopefully see that the script timeouts because of the lower timeout settings. And if the script runs longer than the timeout period an event 21402 – Script ran longer than the timeout period will be created.

      image

      Now you can debug the script from the commandprompt with the correct parameters. Don’t forget to remove the overrides.

      image

      Using SQL Nexus to troubleshoot OpsMgr SQL Server performance issues

      $
      0
      0

      SQL Nexus is a tool that helps you identify the root cause of SQL Server performance issues. It loads and analyzes performance data collected by SQLDiag and PSSDiag. It can dramatically reduce the amount of time you spend manually analyzing data.

      With the RML Utilities you can answer questions such as the following:

      • Which application, database or login is consuming the most resources, and which queries are responsible for that.
      • Whether there were any plan changes for a batch during the time when the trace was captured and how each of those plans performed.
      • What queries are running slower in today's data as compared to a previous set of data.

      If you think you have OpsMgr SQL Server performance issues maybe SQL Nexus together with SQLDiag and RML Utilities can help with performance tuning and analysis.

      Steps:

      1. Download SQLNexus , RML Utilities for SQL Server, Microsoft Report Viewer 2008 Redistributable and PerfStatsScript from websites.
      2. Install Microsoft Report Viewer 2008 Redistributable
        image
      3. Install RML Utilities for SQL Server.
        image
      4. Install\Run SQLNexus by running sqlnexus.exe in folder where you extracted the zipfile.
      5. Connect to SQL server
        image
      6. After starting SQLNexus a new database sqlnexus is created.
        image
      7. Create a folder SQLDiag and Unzip PerfStatsScript files to folder.
      8. Open StartSQLDiagTrace.cmd and change configuration as needed.
        image
      9. Give SQL server service account full control on D:\SQLDIAG folder if you aren’t using the local system account.
      10. Start D:\SQLDiag\StartSQLDiagTrace.cmd. This script registers sqldiag as a service and starts the service with a template (both profiler and perfmon trace)
        Output is being dumped in D:\SQLDiag\SQLDiagOutput folder
        image
        image

        Remark:
        On a busy system quite some data can be collected!!!!. Watch your freespace carefully! Customer experience on opsmgr environment with 2500 agents 20GB of data is collected in 10 minutes.
        Have it running for 10 mins and then stop the SQLDiag service.
      11. Stop SQLDiag with StopSQLDiagTrace.cmd script.

        image
      12. Importing trace data by selecting File\Import in SQLNexus tool.
        image

        Select Options and select BLG Blaster on Enabled and Drop Current DB before Importing.

         image

        image

        Remark: If you are getting the Message PerfStatsAnalysis.sql doesn’t exist message. Just copy the PerfStatsAnalyis.sql file to the requested folder.

        image

        image
      13. The Next Reports are available:
        • Via SQLNexus
          1. Bottleneck Analysis
          2. Blocking and Resource Wait Statistics
          3. Performance Overview with subreports
            • Resource Consumption
            • Unique Batch TopN
            • Interesting Events

      image


       image

          I want to thank David Scheltens for showing me how to use SQL Nexus and creating the PerfStatsScripts.

          References:

          SQLNexus

          http://www.codeplex.com/sqlnexus

          SQLDiag (installed default with SQL2005 and SQL2008)

          http://msdn.microsoft.com/en-us/library/ms162833(SQL.90).aspx

          PSSDiag (to use with SQL2000)

          http://msdn.microsoft.com/en-us/library/aa175399(SQL.80).aspx

          RML Utilities

          http://blogs.msdn.com/psssql/archive/2007/12/18/rml-utilities-for-microsoft-sql-server-released.aspx

          Audio / Video from the January 2009 SCVUG Meeting

          $
          0
          0

          Source: System Center Forum

          Today I was watching the latest recording of the January 2009 SCUG Meeting and to my surprise I was seeing some info about Debugging Scripts which I blogged about some time ago. 

           

          image

          So if you didn’t had time to join the livemeeting go download the recording.

          Below are the starting times in the video for each speaker so you can fast forward to whatever you like.

          • 1:05 - Savision Live Maps v3 Demo (Dennis Rietvink)
          • 51:46 - Custom Scripting and Script Debugging in OpsMgr 2007 (Pete Zerger)
          • 1:19:45 - Top MS Support Issues for Operations Manager 2007 (Steve Rachui) 
          Viewing all 69 articles
          Browse latest View live


          <script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>