• MOM - SystemCenterReporting database inconsistency errors

    假設您發現以下資料庫 "鏈結連接不相符" 錯誤:

    Event Type:          Error
    Event Source:      MOM.Datawarehousing.DTSPackageGenerator.exe
    Event Category:  None
    Event ID:               1001
    Date:                      8/5/2008
    Time:                      01:00:02
    User:                      N/A
    Computer:           SRV-MOM
    Description:  The following information is part of the event: 資料表錯誤 : 資料庫識別碼 10,物件識別碼 1739153241,索引識別碼 0。鏈結連接不相符。(1:11109192)->下一個 = (1:11101007),但是 (1:11101007)->前一個 = (1:11101006)。
    Table error: Database ID 10, object ID 1739153241, index ID 0. Chain linkage mismatch. (1:11109192)->next = (1:11101007), but (1:11101007)->prev = (1:11101006)..

    Event Type:          Error
    Event Source:      MOM.Datawarehousing.DTSPackageGenerator.exe
    Event Category:  None
    Event ID:               1001
    Date:                      8/4/2008
    Time:                      01:00:05
    User:                      N/A
    Computer:           SRV-MOM
    Description:  The following information is part of the event: 資料表錯誤 : 資料庫識別碼 10,物件識別碼 1739153241,索引識別碼 0。鏈結連接不相符。(1:11109192)->下一個 = (1:11101007),但是 (1:11101007)->前一個 = (1:11101006)。
    Table error: Database ID 10, object ID 1739153241, index ID 0. Chain linkage mismatch. (1:11109192)->next = (1:11101007), but (1:11101007)->prev = (1:11101006)..

    Event Type:          Error
    Event Source:      MOM.Datawarehousing.DTSPackageGenerator.exe
    Event Category:  None
    Event ID:               1001
    Date:                      8/2/2008
    Time:                      01:00:04
    User:                      N/A
    Computer:           SRV-MOM
    Description:  The following information is part of the event: 資料表錯誤 : 資料庫識別碼 10,物件識別碼 1739153241,索引識別碼 0。鏈結連接不相符。(1:11109192)->下一個 = (1:11101007),但是 (1:11101007)->前一個 = (1:11101006)。
    Table error: Database ID 10, object ID 1739153241, index ID 0. Chain linkage mismatch. (1:11109192)->next = (1:11101007), but (1:11101007)->prev = (1:11101006)..

    解決辦法
    ==================
    請嘗試以下步驟進行資料庫修復,修復過程您必須承擔因部分資料不一致導致資料遺失可能。
    1. 從上面的錯誤訊息找出資料庫的 ID 代號 (舉例上面的例子是 ID 10) 透過下面指令確認 ID 10 = SystemCenterReporting

        SELECT * FROM sysdatabases

    2. 請停止 MOM service
    3. 請完整備份 SystemCenterReporting 資料庫
    4. 請執行以下指令以修復資料庫一致性

        ALTER DATABASE OnePoint SET EMERGENCY
        GO
        ALTER DATABASE OnePoint SET SINGLE_USER
        GO
        DBCC CHECKDB (<db_name>, REPAIR_ALLOW_DATA_LOSS) WITH NO_INFOMSGS
        GO

        Note: 取代 <db_name> 成第一步的資料庫名字

    5. 重複 DBCC CHECKDB command 直到你看見 "found 0 errors and repaired 0 errors. Elapsed time: 0 hours 0 minutes 1 seconds" 訊息,這訊息代表資料庫修復已經完成,沒有再發現任何錯誤。現在你可以進行資料庫上線動作。

        ALTER DATABASE OnePoint SET MULTI_USER
        GO
        ALTER DATABASE OnePoint SET ONLINE
        GO

    6. 請檢視 "OnePoint" 資料庫的 "ReportingSettings" 資料表,檢查 "TimeDTSLastRan" 的值,這個值告訴你 "OnePoint" 的 DTS 最後執行日期。
    7. 如果 "TimeDTSLastRan" 的值大於十天之前,建議您用 "/latency" 參數去限制 DTS 的處理天數。(we have removed the "/slient" switch so that the DOS window does not disappear)

    MOM.Datawarehousing.DTSPackageGenerator.exe /srcserver:<server_name> /srcdb:OnePoint /dwserver:<server_name> /dwdb:SystemCenterReporting /product:"Microsoft Operations Manager" /latency:<an_integer_number>

    Note: 假設 "TimeDTSLastRan" 返回值(某一日期)減掉今天的日期等於 38 天,而我們想手動執行 DTS 而且每一次只處理 7 天。那麼您就要在參數後面加上 "31" ==> "/latency:31"。(38 - 7 = 31)

    8. 利用下面的指令確認 DTS 是否還在執行

        SELECT * FROM dbo.sysprocesses WHERE program_name LIKE '%DTS%' (against the masterdb)

    9. 如果返回的值有一筆顯示 "INSERTing" 資料,而且該 PID 可以對應上工作管理員的 PID 那就意味 DTS 工作還在執行
    10. 等到 DTS 工作完成,重新檢視 "TimeDTSLastRan" 該值應該要被更新。
    11. 重複步驟 7 到 10 直到 "latency" 的值不再需要被遞減 。
    12. 啟動 MOM 服務並觀察 MOM 伺服器狀態。

  • MOM - Unable to startup MOM service

    Event Type: Error
    Event Source: Microsoft Operations Manager
    Event Category: MOM Server
    Event ID: 9029

    Description: The Microsoft Operations Manager service (MOMService.exe) was unable to run under the supplied credentials, or the password has expired. If this machine is a Domain Controller, verify that the action account is granted the ability to Log On Locally. Please use the SetActionAccount utility to set an action account which meets the guidelines documented in the Microsoft Operations Manager documentation.

    說明與方法︰

    "Microsoft Operations Manager" Error 9029 錯誤訊息裡提到 "MOMService.exe was unable to run under the supplied credentials" 也就是說系統無法使用您設定的帳號啟動 MOM 服務。錯誤的可能包括帳號設定錯誤或是密碼過期。

    針對此錯誤訊息針對此問題請您參考 KB 883347 The MOM agent or the MOM server does not start, and event 9029 is logged in Microsoft Operations Manager 2005 http://support.microsoft.com/kb/883347

    我們重新在 MOM 伺服器上執行了以下指令 (重新設定 MOM 服務的帳號跟密碼) 問題就應該可以得到解決:
    setactionaccount <mom_group_name> -set <account_name> <domain_netbios_name>

  • Q:How to use Software Restriction policy to prevent end users from running the Power Management control panel applet.

    A:Software Restriction is also called Safer and it is a function with Windows Shell (Shell32.DLL). When Windows Explorer tries to launch a program, before really calling CreateProcess(), Shell would first check the program is restricted by the Safer policy. Here, the program is the image name of the process. When we run powercfg.cpl, actually the real program name is Control.exe and powercfg.cpl is just a parameter of the program. Therefore, disabling only powercfg.cpl with Safer won't work.

    Since disabling control.exe will cause the end users fail to run all other control panel applets, you may consider using a domain policy (linked to the OU where those target computer objects reside) and then setup a File System security policy and configure the permissions to Deny Access for those end users.

    1) Create or edit an existing GPO linked to the OU where those computers accounts reside

    2) Find the following policy:

    Computer Configuration\Windows Settings\Security Settings\File System

    3) Right click and select Add File.

    4) Leave the current permissions unchanged. Add a new permission assignment. Enter the user group which contains all those target end users. Select Deny for all Access.

    5) Apply the changes.

    6) Wait for the policy to take effect on client computers.

    7) Now those end users should not be able to launch the Power Options applet.

  • Replication issue

    DCDIAG.TXT

       Testing server: Default-First-Site-Name\ADMAIL
          Starting test: Replications
             * Replications Check
             [Replications Check,ADMAIL] A recent replication attempt failed:
                From CAD to ADMAIL
                Naming Context: DC=mst,DC=com,DC=tw
                The replication generated an error (5):
                存取被拒。
                The failure occurred at 2008-01-23 12:20.50.
                The last success occurred at 2007-12-02 01:48.16.
                9009 failures have occurred since the last success.
             [CAD] DsBind() failed with error -2146893022,
             目標的主名稱不正確。.
             [Replications Check,ADMAIL] A recent replication attempt failed:
                From CAD to ADMAIL
                Naming Context: CN=Schema,CN=Configuration,DC=mpi,DC=com,DC=tw
                The replication generated an error (5):
                存取被拒。
                The failure occurred at 2008-01-23 11:50.25.
                The last success occurred at 2007-12-02 01:48.16.
                1263 failures have occurred since the last success.
             [Replications Check,ADMAIL] A recent replication attempt failed:
                From CAD to ADMAIL
                Naming Context: CN=Configuration,DC=mpi,DC=com,DC=tw
                The replication generated an error (5):
                存取被拒。
                The failure occurred at 2008-01-23 12:23.25.
                The last success occurred at 2007-12-02 01:48.16.
                7839 failures have occurred since the last success.
    解決方法

    -    確認時區時間一致
    -    一般應該為security channel broken

    如何使用 Netdom . exe 來重設機器帳戶密碼的 Windows 2000 網域控制站
    http://support.microsoft.com/kb/260575

    若是無法重設請先停用有問題DC的Kerberos Key Distribution Center服務然後重新開機,重新reset security channel
    -    若是仍然不行請停用所有DC Kerberos Key Distribution Center服務重新開機在嘗試reset security channel ,然後使用repadmin /syncall 或是 ad site and services強制覆寫

    完成後再將Kerberos Key Distribution Center設置為自動,重新啟動
    ************************************************************
    repadmin.txt
    ==========
    TP\DCS01
    DSA Options : IS_GC
    objectGuid  : 7809b003-4650-4646-949e-f25e22339a30
    invocationID: 7809b003-4650-4646-949e-f25e22339a30

    DsBindWithCred to localhost failed with status 1727 (0x6bf):
        遠端程序呼叫失敗且不執行。(The remote procedure call failed and did not execute)

    NTDS event log
    ========
    事件類型:    警告
    事件來源:    NTDS KCC
    事件類別目錄:    知識一致性檢查程式
    事件識別碼:    2051
    日期:        2008/1/7
    時間:        上午 08:13:06
    使用者:        NT AUTHORITY\ANONYMOUS LOGON
    電腦:    DCS01
    描述:
    知識一致性檢查程式已偵測出可能的連線振盪。下列連線 (或與它相似的連線) 已被 重複地建立並刪除。在指出的時段內連線會持續,必須等到該時段過了之後,連線才 會再被刪除。
    連線物件:
    CN=04d9f039-96f1-4692-9386-a49426e47cf2,CN=NTDS Settings,CN=DCS01,CN=Servers,CN=TP,CN=Sites,CN=Configuration,DC=fp,DC=com
    目的地 DSA GUID:
    7809b003-4650-4646-949e-f25e22339a30
    來源 DSA:
    CN=NTDS Settings,CN=TPNPCENGS01,CN=Servers,CN=TP,CN=Sites,CN=Configuration,DC=fp,DC=com
    來源 DSA GUID:
    a53f49cc-b012-4e9f-9fde-83f1720d485a
    選項:
    1
    保留期間 (秒):
    604800
    重複的刪除容錯:
    3
    刪除點內部識別碼:
    f07023b
    使用者動作:
    經常建立及刪除錯誤後移轉連線可能是 bridghead 不穩定的表示。請檢查 bridgehead 的連線能力或複寫問題。也可以使用登錄來調整錯誤後移轉原則。

    請在 http://go.microsoft.com/fwlink/events.asp 查看說明及支援中心,以取得其他資訊。

    事件類型:    警告
    事件來源:    NTDS KCC
    事件類別目錄:    知識一致性檢查程式
    事件識別碼:    1925
    日期:        2008/1/7
    時間:        上午 05:53:08
    使用者:        NT AUTHORITY\ANONYMOUS LOGON
    電腦:    DCS01
    描述:
    嘗試為以下可寫入的目錄磁碟分割建立複寫連結時失敗。
    目錄磁碟分割:
    CN=Configuration,DC=fp,DC=com
    來源網域控制站:
    CN=NTDS Settings,CN=TPNPCENGS01,CN=Servers,CN=TP,CN=Sites,CN=Configuration,DC=fp,DC=com
    來源網域控制站位址:
    a53f49cc-b012-4e9f-9fde-83f1720d485a._msdcs.fpg.com
    站台間傳輸 (如果有的話):
    必須先修正此問題,否則這個網域控制站將無法以來源網域控制站進行複寫。
    使用者動作
    檢查來源網域控制站是否可以存取或網路連線是否可供使用。
    其他資料
    錯誤值:
    1722 無法取得 RPC 伺服器。

    請在 http://go.microsoft.com/fwlink/events.asp 查看說明及支援中心,以取得其他資訊。

    事件類型:    錯誤
    事件來源:    NTDS Replication
    事件類別目錄:    複寫
    事件識別碼:    1863
    日期:        2008/1/6
    時間:        下午 06:20:00
    使用者:        NT AUTHORITY\ANONYMOUS LOGON
    電腦:    DCS01
    描述:
    這是本機網域控制站上,下列目錄磁碟分割的複寫狀態。
    目錄磁碟分割:
    DC=npceng,DC=tw,DC=fp,DC=com
    本機網域控制站並未在設定的延遲間隔內,從一些網域控制站收到複寫資訊。
    延遲間隔 (小時):
    24
    所有站台上的網域控制站數目:
    5
    這個站台上的網域控制站數目:
    3
    可以使用下列登錄機碼來修改延遲間隔。
    登錄機碼: 
    HKLM\System\CurrentControlSet\Services\NTDS\Parameters\Replicator latency error interval (小時)
    如果要依照名稱來識別網域控制站,請安裝包含在安裝 CD 中的支援工具,然後執行 dcdiag.exe。
    您也可以使用支援工具 repadmin.exe 來顯示樹系中網域控制站的複寫延遲。 命令為 "repadmin /showvector /latency <partition-dn>"。

    RPC網路不透通

    解決方法
    - 檢察135 port 是否Listen
    Netstat –ano

    -嘗試telnet Server IP 135
    -收集網路封包

    RPC連接埠
    RPC TCP 135
    隨機高 TCP 連接埠配置  TCP 介於 1024 - 65534 隨機連接埠號碼 *

    Inbound 135要通
    Outbound 1024 - 65534

    有些客戶會有檔Inbound與Outbound 須特別注意

    與網路連接埠需求為 Windows Server 系統服務概觀
    http://support.microsoft.com/?id=832017

    若是客戶一定要限制動態RPC可以參考以下文件
    如何設定 RPC 動態連接埠配置以使用防火牆
    http://support.microsoft.com/kb/154596/
    ************************************************************

    NTDS Event Log:
    ===============================
    事件類型: 警告
    事件來源: NTDS KCC
    事件類別目錄: (1)
    事件識別碼: 1265
    日期:  2008/8/27
    時間:  下午 05:11:13
    使用者:  N/A
    電腦: AD2
    描述:
    DC=mst,DC=com,DC=cn, 8bc74036-872f-4cbf-9d2a-6f6e03606122._msdcs.audrey.com.tw, Access is denied.
    , CN=NTDS Settings,CN=THAD,CN=Servers,CN=Taichung,CN=Sites,CN=Configuration,DC=mst,DC=com,DC=tw, CN=IP,CN=Inter-Site Transports,CN=Sites,CN=Configuration,DC=mst,DC=com,DC=tw.
    資料:
    0000: 05 00 00 00               ....   

    事件類型: 警告
    事件來源: NTDS KCC
    事件類別目錄: (1)
    事件識別碼: 1265
    日期:  2008/8/27
    時間:  下午 05:11:08
    使用者:  N/A
    電腦: AD2
    描述:
    CN=Schema,CN=Configuration,DC=mst,DC=com,DC=tw, 8bc74036-872f-4cbf-9d2a-6f6e03606122._msdcs.audrey.com.tw, Access is denied.
    , CN=NTDS Settings,CN=THAD,CN=Servers,CN=Taichung,CN=Sites,CN=Configuration,DC=mst,DC=com,DC=tw, CN=IP,CN=Inter-Site Transports,CN=Sites,CN=Configuration,DC=mst,DC=com,DC=tw.
    資料:
    0000: 05 00 00 00               ....   

    DCDiag:
    ===================================
       Testing server: Thailand\AD2
          Starting test: Replications
             * Replications Check
             [Replications Check,AD2] A recent replication attempt failed:
                From AD1 to AD2
                Naming Context: DC=mst,DC=com,DC=cn
                The replication generated an error (5):
                Win32 Error 5
                The failure occurred at 2008-08-27 15:54.44.
                The last success occurred at 2008-08-27 12:18.51.
                11 failures have occurred since the last success.
             [Replications Check,AD2] A recent replication attempt failed:
                From AD1 to AD2
                Naming Context: DC=sing,DC=com,DC=cn
                The replication generated an error (5):
                Win32 Error 5
                The failure occurred at 2008-08-27 15:54.44.
                The last success occurred at 2008-08-27 12:18.52.
                11 failures have occurred since the last success.
             [Replications Check,AD2] A recent replication attempt failed:
                From AD1 to AD2
                Naming Context: DC=mst,DC=com,DC=tw
                The replication generated an error (5):
                Win32 Error 5
                The failure occurred at 2008-08-27 16:11.25.
                The last success occurred at 2008-08-27 12:18.50.
                61 failures have occurred since the last success.
             ......................... AD2 passed test Replications

    Repadmin:
    ==== INBOUND NEIGHBORS ======================================

    DC=mst,DC=com,DC=cn
        Thailand\AD1 via RPC
            objectGuid: 67d58b07-39c3-47be-9c73-0cde28b00169
            Last attempt @ 2008-08-27 15:54.44 failed, result 5:
                Can't retrieve message string 5 (0x5), error 1815.
            Last success @ 2008-08-27 12:18.51.
            11 consecutive failure(s).

    DC=sing,DC=com,DC=cn
        Thailand\AD1 via RPC
            objectGuid: 67d58b07-39c3-47be-9c73-0cde28b00169
            Last attempt @ 2008-08-27 15:54.44 failed, result 5:
                Can't retrieve message string 5 (0x5), error 1815.
            Last success @ 2008-08-27 12:18.52.
            11 consecutive failure(s).

    DC=mst,DC=com,DC=tw
        Thailand\AD1 via RPC
            objectGuid: 67d58b07-39c3-47be-9c73-0cde28b00169
            Last attempt @ 2008-08-27 16:11.25 failed, result 5:
                Can't retrieve message string 5 (0x5), error 1815.
            Last success @ 2008-08-27 12:18.50.
            61 consecutive failure(s).

    解決方式

    有關於此問題,經確認後為DC的時間差超過5分鐘所導致的

    參考資料

    Troubleshooting Active Directory Replication Problems
    http://technet.microsoft.com/en-us/library/bb727057.aspx

    在該文件中提到的Event ID 1265中的檢查項目之一就是系統時間

    在KB http://support.microsoft.com/kb/837361 中說明了

    預設如果超過5分鐘的時間差會造成KDC Failed 的issue
    確認時間差異大約8分鐘.修正時間後,DC複寫恢復正常

    ************************************************************

  • 如何在Workgroup環境安裝SCCM client (without WINS)

    使用LMHOSTS 搭配HOSTS來手動安裝Client。

    1. LMHOSTS:

    192.168.1.1 "MP_S00 \0x1A" #PRE #SCCM 2007 MP

    (請注意在 ” ”中,共有20個字元含空格)

    192.168.1.1 "SMS_SLP \0x1A" #PRE #SCCM 2007 SLP

    (1) 設定完成後,請調整網路卡設定,讓網卡使用LMHOST解析名稱。

    (2) 執行 netstat –R (Purge and preload NBT Remote Cache Name Table)

    (3) 執行 netstat –c (Lists local NetBIOS names)

    2. HOSTS:

    <Site server's IP address> Site server's machine name

    For example:

    192.168.1.1 Site_ServerName

    192.168.1.1 MP_S00

    192.168.1.1 SMS_SLP

    Manual run CCMSETUP installation command (Properties)

    Example:
    ccmsetup smssitecode=S00 SMSMP=MP_Name SMSLP= SLP_Name /source:”c:\sccmclient“