顯示具有 SCOM ACS 標籤的文章。 顯示所有文章
顯示具有 SCOM ACS 標籤的文章。 顯示所有文章

2014年9月17日 星期三

SCOM 2007 R2,ACS grooming not working in production

-- Check your partitions:
Use OperationsManagerAC
SELECT * FROM dtPartition Order By PartitionCloseTime

Solution
===========
1. There is a a DBDeletePartition.sql in the C:\windows\system32\security\Adtserver folder on the Collection server.
Replace the !g! with the GUID of the partition you want to delete, and run this on the sql server.
NOTE: Do not modify the copy in the adtserver folder directly. It is used by ACS only.

 
+ renamed !g! with partition name which needs to groomed manually.

===============================================
/************************************************************
*
* Partition !g!
*
************************************************************/


/************************************************************
*
* Call user defined stored procedure.
*
************************************************************/

if exists (select * from dbo.sysobjects
            where id = object_id(N'Delete') and
            objectproperty(id, N'IsProcedure') = 1)
    execute spOnDeletePartition N'!g!'
go


/************************************************************
*
* Drop partitioned tables.
*
************************************************************/

if exists (select * from dbo.sysobjects
            where id = object_id(N'dvAll_!g!') and
            objectproperty(id, N'IsView') = 1)
    drop view dvAll_!g!
go

if exists (select * from dbo.sysobjects
            where id = object_id(N'dvAll5_!g!') and
            objectproperty(id, N'IsView') = 1)
    drop view dvAll5_!g!
go

if exists (select * from dbo.sysobjects
            where id = object_id(N'dvHeader_!g!') and
            objectproperty(id, N'IsView') = 1)
    drop view dvHeader_!g!
go

if exists (select * from dbo.sysobjects
            where id = object_id(N'dtEventData_!g!') and
            objectproperty(id, N'IsUserTable') = 1)
    drop table dtEventData_!g!
go

if exists (select * from dbo.sysobjects
            where id = object_id(N'dtEvent_!g!') and
            objectproperty(id, N'IsUserTable') = 1)
    drop table dtEvent_!g!
go

if exists (select * from dbo.sysobjects
            where id = object_id(N'dtPrincipal_!g!') and
            objectproperty(id, N'IsUserTable') = 1)
    drop table dtPrincipal_!g!
go

if exists (select * from dbo.sysobjects
            where id = object_id(N'dtString_!g!') and
            objectproperty(id, N'IsUserTable') = 1)
    drop table dtString_!g!
go


/************************************************************
*
* Delete entry from dtPartition for partition !g!
*
************************************************************/

delete from dtPartition where PartitionId = N'!g!'
go


/************************************************************
*
* Create or update dvAll, the view across all partition views
*
************************************************************/

declare @iIsFirst int
declare @vchStmt nvarchar(max)
declare @vchPartitionId nchar(36)
declare cPartition cursor for
select top 42 PartitionId from dtPartition order by PartitionCloseTime desc

set @iIsFirst = 1
set @vchStmt = N'create view [AdtServer].dvAll as'

open cPartition
fetch next from cPartition into @vchPartitionId
while @@fetch_status = 0
begin
    if @iIsFirst = 0
        set @vchStmt =  @vchStmt + N' union all'
    set @vchStmt =  @vchStmt + N' select * from dvAll_' + @vchPartitionId
    set @iIsFirst = 0
    fetch next from cPartition into @vchPartitionId
end
close cPartition
deallocate cPartition

if exists (
    select * from dbo.sysobjects where
        id = object_id(N'[AdtServer].dvAll') and
        objectproperty(id, N'IsView') = 1)
    drop view [AdtServer].dvAll

exec (@vchStmt)
go

/************************************************************
*
* Create or update dvAll5, the view across all partition views limited to the first 5 strings
*
************************************************************/

declare @iIsFirst int
declare @vchStmt nvarchar(max)
declare @vchPartitionId nchar(36)
declare cPartition cursor for
select top 42 PartitionId from dtPartition order by PartitionCloseTime desc

set @iIsFirst = 1
set @vchStmt = N'create view [AdtServer].dvAll5 as'

open cPartition
fetch next from cPartition into @vchPartitionId
while @@fetch_status = 0
begin
    if @iIsFirst = 0
        set @vchStmt =  @vchStmt + N' union all'
    set @vchStmt =  @vchStmt + N' select * from dvAll5_' + @vchPartitionId
    set @iIsFirst = 0
    fetch next from cPartition into @vchPartitionId
end
close cPartition
deallocate cPartition

if exists (
    select * from dbo.sysobjects where
        id = object_id(N'[AdtServer].dvAll5') and
        objectproperty(id, N'IsView') = 1)
    drop view [AdtServer].dvAll5

exec (@vchStmt)
go


/************************************************************
*
* Create or update dvHeader, the view across all partition views with no dtstring joins
*
************************************************************/

declare @iIsFirst int
declare @vchStmt nvarchar(max)
declare @vchPartitionId nchar(36)
declare cPartition cursor for
select top 42 PartitionId from dtPartition order by PartitionCloseTime desc

set @iIsFirst = 1
set @vchStmt = N'create view [AdtServer].dvHeader as'

open cPartition
fetch next from cPartition into @vchPartitionId
while @@fetch_status = 0
begin
    if @iIsFirst = 0
        set @vchStmt =  @vchStmt + N' union all'
    set @vchStmt =  @vchStmt + N' select * from dvHeader_' + @vchPartitionId
    set @iIsFirst = 0
    fetch next from cPartition into @vchPartitionId
end
close cPartition
deallocate cPartition

if exists (
    select * from dbo.sysobjects where
        id = object_id(N'[AdtServer].dvHeader') and
        objectproperty(id, N'IsView') = 1)
    drop view [AdtServer].dvHeader

exec (@vchStmt)
go


===============================================

2. Shrink DB ,Please run the following command:
 
use operationsmanagerAC
go
dbcc shrinkfile (fiAuditData)
go


2014年8月12日 星期二

Operation Manager Audit Collection Service fail to start -->Error 0X8009030D :The credentials supplied to the package were not recognized

Error 0X8009030D :The credentials supplied to the package were not recognized

Solution
=========
a.    Open the command line.
b.    Go to C:\Windows\system32\security\adtserver folder.
c.    Run “adtserver.exe -c”,
       and choose the certificate issued to the FQDN name for the ACS collector.
d.    Start the Operation Manager Audit Collection Service.

2014年5月5日 星期一

The ACS collector service (Adtserver) would not start.



Problem:
========
The ACS collector service (Adtserver) would not start.
Root Cause:
============
The certificate used by Adtserver was replaced.

Solution
==========
We had to run %systemroot%\system32\Security\AdtServer\adtserver.exe -c and select the correct certificate to use.

Forwarder is unable to connect to collector Event id 4369 in forwarder event view




Cause
======
This can occur if the certifciate used by the forwarder does not have it's Root CA certificate in the Trusted Root Certification Authorities store for computer.
Error code # for hex 0x80090325 / decimal -2146893019 translates to SEC_E_UNTRUSTED_ROOT winerror


Analyze
=========
You may get below event in ACS Forwarder computers event log:
Event Type: Warning
Event Source: AdtAgent
Event Category: None
Event ID: 4369
Date: <date>
Time: <time>
User: NT AUTHORITY\NETWORK SERVICE
Computer: <computer>
Description:
Forwarder unsuccessfully tried to connect to the following collector(s):
<collectorname>:51909, status: 0x80090325 (TCP connect), source: registry
addresses tried:
<IP of collector>:51909



Solution
=========
Reimport Root CA certificate in the Trusted Root Certification Authorities store