2014年4月29日 星期二

SQL Server 2012 is now supported by WSUS in Server 2012


SQL Server 2012 is now supported by WSUS in Server 2012
  • Windows Internal Database (WID)
  • Microsoft SQL Server 2008 R2 SP1 Standard Edition
  • Microsoft SQL Server 2008 R2 SP1 Enterprise Edition
  • Microsoft SQL Server 2008 R2 SP1 Express Edition
  • Microsoft SQL Server 20012 Standard Edition
  • Microsoft SQL Server 20012 Enterprise Edition
  • Microsoft SQL Server 20012 Express Edition
More information can be found here: http://technet.microsoft.com/en-us/library/hh852344.aspx

MOMCertImport.exe fails on Server 2012 - Error Code:8000FFFF

The certificate is valid, but importing is to certificate store failed.
Error description: Catastrophic failure

Error Code:8000FFFF









When exporting the SCOM/Server certificate, make sure the “Include all certificates in the certification path if possible” box is not marked. This one is marked as default in Server 2012.


SCOM 2007 SP1 - Receiving Notification from incorrect email

無法查看此摘要。請 按這裡查看文章。

2014年4月28日 星期一

SCOM 2007 SP1,E-mail Notification Return Address Can Not Be Changed

The problem is when you have a Run As Account specified in the Notification Account Run As Profile, any changes made to the e-mail notification Return Address do not go in to affect even though it shows the new address when you go back into those Notification settings.
Solution
============
To remove the Run As Account.
1) Open the Administrator space in the Operations Console.
2) Administration --> Security --> Run As Profiles
3) In the Run As Accounts tab of the properties of the Notification Account Run As Profile, select the listed account(s) and select delete.
     (these are only necessary if we are authenticating to the mail server instead of using anonymous)

After the above steps you can set the Return Address as follows:
1) Open the Administrator space in the Operations Console.
2) Administration --> Settings --> Notification
3) In the E-mail tab of the Global Management Group Settings - Notification dialog box change the Return address box to whatever you want the e-mail to show as the sender of the notification.

2014年4月24日 星期四

APM monitoring is not working after upgrade to SCOM 2012 R2

Resolution
============
This is fixed in the Update 1 for MMA.
Please apply Update 1 for MMA on SCOM Agent. 

You can download the Update 1 from here http://www.microsoft.com/en-us/download/details.aspx?id=41959

More Information
===============
Microsoft Monitoring Agent Requirements and Compatibility http://technet.microsoft.com/en-us/library/dn465154.aspx

SCOM 2012: After upgrading to SP1, the ACS database is not updated

After we upgrade to System Center Operations Manager 2012 Service Pack 1
We see that the ACS Collector Service is crashing while attempting to create a new partition.
When manually running the upgrade script [%Windows%\System32\Security\AdtServer\DbUpgV7toV8.sql] for the ACS database we get the below error complaining about some missing views: 

Msg 2714, Level 16, State 6, Line 1 
There is already an object named 'dtClaimString_15eb844f_905f_4b7b_bf57_61e549511f95' in the database.

Solution
=============
Run this SQL Query - Updates ACS DB schema from V7 to V8
##########################################
/******************************************************************************
 *
 * DbUpgV7toV8.sql
 *
 * Updates ACS DB schema from V7 to V8
 *
 ******************************************************************************/
declare @iVersion    int -- current schema version
set @iVersion = (select Value from dtConfig where Id = 2)
if (@iVersion = 7)
begin
    begin tran
    -- update description for existing category
    if exists (select * from dtCategory where Id = 0)
        update dtCategory set Description = N'ACS' where Id = 0
    else
        insert into dtCategory  (Id, Description)                   values (0, N'ACS')
    -- insert new category entries
    if not exists (select * from dtCategory where Id = 101)
        insert into dtCategory  (Id, Description)                   values (   101, N'Event processing')
    if not exists (select * from dtCategory where Id = 103)
        insert into dtCategory  (Id, Description)                   values (   103, N'Service shutdown')
    if not exists (select * from dtCategory where Id = 0x3109)
        insert into dtCategory  (Id, Description)                   values (0x3109, N'User / Device Claims')
    if not exists (select * from dtCategory where Id = 0x320D)
        insert into dtCategory  (Id, Description)                   values (0x320D, N'Central Access Policy Staging')
    -- create empty dtClaimString_!g! dtOldResourceAttribute_!g! dtNewResourceAttribute_!g! dtUserClaim_!g! dtDeviceClaim_!g! tables
    declare @vchStmt nvarchar(max)
    declare @vchPartitionId nchar(36)
    declare cPartition cursor for
        select PartitionId from dtPartition order by PartitionCloseTime desc
    open cPartition
    fetch next from cPartition into @vchPartitionId
    while @@fetch_status = 0
    begin
        set @vchStmt =  N'create table dtClaimString_' + @vchPartitionId + N' '
        set @vchStmt =  @vchStmt + N'('
        set @vchStmt =  @vchStmt + N'Id int not null constraint pkClaimString_' + @vchPartitionId + ' primary key identity     (0,1),'
        set @vchStmt =  @vchStmt + N'Hash                     binary(20)      not null,'
        set @vchStmt =  @vchStmt + N'strClaimId               nvarchar(max)   not null,'
        set @vchStmt =  @vchStmt + N'strClaimDisplayName      nvarchar(max)   not null,'
        set @vchStmt =  @vchStmt + N'strClaimValue            nvarchar(max)   not null,'
        set @vchStmt =  @vchStmt + N'strClaimValueDisplayName nvarchar(max)   not null'
        set @vchStmt =  @vchStmt + N')'
        if not exists (select * from sys.sysobjects where name = 'dtClaimString_' + @vchPartitionId + N' ')
     exec (@vchStmt)
  
        set @vchStmt =  N'create table dtOldResourceAttribute_' + @vchPartitionId + N' '
        set @vchStmt =  @vchStmt + N'('
        set @vchStmt =  @vchStmt + N'EventId         bigint      not null,'
        set @vchStmt =  @vchStmt + N'CreationTime    datetime    not null,'
        set @vchStmt =  @vchStmt + N'ClaimId         int         not null    constraint fkOldResourceAttributeClaimId_' + @vchPartitionId + N' references dtClaimString_' + @vchPartitionId + N' (Id),'
        set @vchStmt =  @vchStmt + N')'
        if not exists (select * from sys.sysobjects where name = 'dtOldResourceAttribute_' + @vchPartitionId + N' ')
     exec (@vchStmt)
        set @vchStmt =  N'create table dtNewResourceAttribute_' + @vchPartitionId + N' '
        set @vchStmt =  @vchStmt + N'('
        set @vchStmt =  @vchStmt + N'EventId         bigint      not null,'
        set @vchStmt =  @vchStmt + N'CreationTime    datetime    not null,'
        set @vchStmt =  @vchStmt + N'ClaimId         int         not null    constraint fkNewResourceAttributeClaimId_' + @vchPartitionId + N' references dtClaimString_' + @vchPartitionId + N' (Id),'
        set @vchStmt =  @vchStmt + N')'
        if not exists (select * from sys.sysobjects where name = 'dtNewResourceAttribute_' + @vchPartitionId + N' ')
     exec (@vchStmt)
    
        set @vchStmt =  N'create table dtUserClaim_' + @vchPartitionId + N' '
        set @vchStmt =  @vchStmt + N'('
        set @vchStmt =  @vchStmt + N'EventId         bigint      not null,'
        set @vchStmt =  @vchStmt + N'CreationTime    datetime    not null,'
        set @vchStmt =  @vchStmt + N'ClaimId         int         not null    constraint fkUserClaimClaimId_' + @vchPartitionId + N' references dtClaimString_' + @vchPartitionId + N' (Id),'
        set @vchStmt =  @vchStmt + N')'
        if not exists (select * from sys.sysobjects where name = 'dtUserClaim_' + @vchPartitionId + N' ')
     exec (@vchStmt)
        set @vchStmt =  N'create table dtDeviceClaim_' + @vchPartitionId + N' '
        set @vchStmt =  @vchStmt + N'('
        set @vchStmt =  @vchStmt + N'EventId         bigint      not null,'
        set @vchStmt =  @vchStmt + N'CreationTime    datetime    not null,'
        set @vchStmt =  @vchStmt + N'ClaimId         int         not null    constraint fkDeviceClaimClaimId_' + @vchPartitionId + N' references dtClaimString_' + @vchPartitionId + N' (Id),'
        set @vchStmt =  @vchStmt + N')'
        if not exists (select * from sys.sysobjects where name = 'dtDeviceClaim_' + @vchPartitionId + N' ')
    exec (@vchStmt)
        fetch next from cPartition into @vchPartitionId
    end
    close cPartition
    deallocate cPartition
    -- create empty dvUserClaims_!g! dvDeviceClaims_!g! dvNewResourceAttribute_!g! dvOldResourceAttribute_!g! views
    declare cPartition cursor for
        select PartitionId from dtPartition order by PartitionCloseTime desc
    open cPartition
    fetch next from cPartition into @vchPartitionId
    while @@fetch_status = 0
    begin
        set @vchStmt =  N'create view dvUserClaims_' + @vchPartitionId + N' '
        set @vchStmt =  @vchStmt + N'as '
        set @vchStmt =  @vchStmt + N'select '
        set @vchStmt =  @vchStmt + N'    uc.EventId as EventId, '
        set @vchStmt =  @vchStmt + N'    uc.CreationTime as CreationTime, '
        set @vchStmt =  @vchStmt + N'    ucs.strClaimId as UserClaimId, '
        set @vchStmt =  @vchStmt + N'    ucs.strClaimDisplayName as UserClaimDisplayName, '
        set @vchStmt =  @vchStmt + N'    ucs.strClaimValue as UserClaimValue, '
        set @vchStmt =  @vchStmt + N'    ucs.strClaimValueDisplayName as UserClaimValueDisplayName '
        set @vchStmt =  @vchStmt + N'FROM '
        set @vchStmt =  @vchStmt + N'    dtUserClaim_' + @vchPartitionId + ' as uc '
        set @vchStmt =  @vchStmt + N'    inner join dtClaimString_' + @vchPartitionId + ' ucs on ucs.Id = uc.ClaimId '
 
        if not exists (select * from sys.sysobjects where name = 'dvUserClaims_' + @vchPartitionId + N' ')
    exec (@vchStmt)
        set @vchStmt =  N'create view dvDeviceClaims_' + @vchPartitionId + N' '
        set @vchStmt =  @vchStmt + N'as '
        set @vchStmt =  @vchStmt + N'select '
        set @vchStmt =  @vchStmt + N'    dc.EventId as EventId, '
        set @vchStmt =  @vchStmt + N'    dc.CreationTime as CreationTime, '
        set @vchStmt =  @vchStmt + N'    dcs.strClaimId as DeviceClaimId, '
        set @vchStmt =  @vchStmt + N'    dcs.strClaimDisplayName as DeviceClaimDisplayName, '
        set @vchStmt =  @vchStmt + N'    dcs.strClaimValue as DeviceClaimValue, '
        set @vchStmt =  @vchStmt + N'    dcs.strClaimValueDisplayName as DeviceClaimValueDisplayName '
        set @vchStmt =  @vchStmt + N'FROM '
        set @vchStmt =  @vchStmt + N'    dtDeviceClaim_' + @vchPartitionId + ' as dc '
        set @vchStmt =  @vchStmt + N'    inner join dtClaimString_' + @vchPartitionId + ' dcs on dcs.Id = dc.ClaimId '
       if not exists (select * from sys.sysobjects where name = 'dvDeviceClaims_' + @vchPartitionId + N' ')
    exec (@vchStmt)
        set @vchStmt =  N'create view dvNewResourceAttributes_' + @vchPartitionId + N' '
        set @vchStmt =  @vchStmt + N'as '
        set @vchStmt =  @vchStmt + N'select '
        set @vchStmt =  @vchStmt + N'    nra.EventId as EventId, '
        set @vchStmt =  @vchStmt + N'    nra.CreationTime as CreationTime, '
        set @vchStmt =  @vchStmt + N'    ncs.strClaimId as NewClaimId, '
        set @vchStmt =  @vchStmt + N'    ncs.strClaimDisplayName as NewClaimDisplayName, '
        set @vchStmt =  @vchStmt + N'    ncs.strClaimValue as NewClaimValue, '
        set @vchStmt =  @vchStmt + N'    ncs.strClaimValueDisplayName as NewClaimValueDisplayName '
        set @vchStmt =  @vchStmt + N'FROM '
        set @vchStmt =  @vchStmt + N'    dtNewResourceAttribute_' + @vchPartitionId + ' as nra '
        set @vchStmt =  @vchStmt + N'    inner join dtClaimString_' + @vchPartitionId + ' ncs on ncs.Id = nra.ClaimId '

       if not exists (select * from sys.sysobjects where name = 'dvNewResourceAttributes_' + @vchPartitionId + N' ')
    exec (@vchStmt)
   
        set @vchStmt =  N'create view dvOldResourceAttributes_' + @vchPartitionId + N' '
        set @vchStmt =  @vchStmt + N'as '
        set @vchStmt =  @vchStmt + N'select '
        set @vchStmt =  @vchStmt + N'    nra.EventId as EventId, '
        set @vchStmt =  @vchStmt + N'    nra.CreationTime as CreationTime, '
        set @vchStmt =  @vchStmt + N'    ncs.strClaimId as OldClaimId, '
        set @vchStmt =  @vchStmt + N'    ncs.strClaimDisplayName as OldClaimDisplayName, '
        set @vchStmt =  @vchStmt + N'    ncs.strClaimValue as OldClaimValue, '
        set @vchStmt =  @vchStmt + N'    ncs.strClaimValueDisplayName as OldClaimValueDisplayName '
        set @vchStmt =  @vchStmt + N'FROM '
        set @vchStmt =  @vchStmt + N'    dtOldResourceAttribute_' + @vchPartitionId + ' as nra '
        set @vchStmt =  @vchStmt + N'    inner join dtClaimString_' + @vchPartitionId + ' ncs on ncs.Id = nra.ClaimId '
       if not exists (select * from sys.sysobjects where name = 'dvOldResourceAttributes_' + @vchPartitionId + N' ')
    exec (@vchStmt)
        fetch next from cPartition into @vchPartitionId
    end
    close cPartition
    deallocate cPartition
    -- mark all active partitions for closing
    if (select count(*) from dtPartition where Status = 0) > 0
        update dtPartition set Status = 1 where Status = 0
    -- update schema version
    update dtConfig set Value = 8 where Id = 2
    commit tran
end
go
##########################################

SCOM 2012 Web Console erro

錯誤畫面
















Solution
========
Run below command:
On Server 2008 R2 – run the following in an elevated CMD:  C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis.exe -i -enable

On Server 2012 – run the following in an elevated CMD:  C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis.exe -r

2014年4月21日 星期一

ACS collector generating 4618 errors after upgrade to SCOM 2012 R2

Symptom
===========
 Message: [Microsoft][ODBC SQL Server Driver][SQL Server]Violation of UNIQUE KEY constraint 'unPrincipal_e85082db_9ba3_47c0_aaa6_ee9e68606a0e'. Cannot insert duplicate key in object 'dbo.dtPrincipal_e85082db_9ba3_47c0_aaa6_ee9e68606a0e'. 

Cause
=======
SQL files not updated when updating the ACS Component. Tables are created using the older scripts. 

Resolution
=========
Stopped the AdtServer service, Copied the new SQL files from the SCOM 2012 R2 setup and pasted them into the c:\windows\system32\security\adtserver folder replacing the old files.

On the SCOM ACS Database ran the following query:

USE OperationsManagerAC
GO
UPDATE dtpartition
SET status=2
WHERE partitionid='e85082db_9ba3_47c0_aaa6_ee9e68606a0e'
GO


Restarted the AdtServer service.