locked
SCSM 2010 - How to delete Incidents directly from SQL RRS feed

  • Question

  • As we are running a test environment, I have made some changes and would like to delete all of the incidents we have created till now. It would of course be wonderful to have available in the UI the functionality to delete records without going via SQL, but let me explain what I have done and the problem I am having.

    I have deleted all of the rows in SQL under:

    ServiceManager / Tables / dbo.MT_System$WorkItem$Incident

    and

    ServiceManager / Tables / dbo.MT_System$WorkItem$Incident_Log


    When I return to SCSM Console to view if these records are now gone, all of the data has been deleted except for a couple of columns, and I would like to know where else I should look to delete the remaining data pertaining to those records I wish to delete

    The Columns which are still remaining are "Assigned To, Affected user, and Last Modified"

    If I try to click on any of those lines, it also does not open up the request which leads me to believe that the record is truly deleted.

    Any ideas?


    civitas hall
    Friday, November 26, 2010 1:49 PM

Answers

  • It's not supported.

    You must use Powershell scripts and SDK for this.


    http://opsmgr.ru
    • Proposed as answer by AndersAsp Monday, December 6, 2010 9:46 PM
    • Marked as answer by entityx Friday, December 10, 2010 10:33 AM
    Friday, November 26, 2010 8:18 PM

All replies

  • It's not supported.

    You must use Powershell scripts and SDK for this.


    http://opsmgr.ru
    • Proposed as answer by AndersAsp Monday, December 6, 2010 9:46 PM
    • Marked as answer by entityx Friday, December 10, 2010 10:33 AM
    Friday, November 26, 2010 8:18 PM
  • It's not supported.

    You must use Powershell scripts and SDK for this.


    http://opsmgr.ru


    Are there any update regarding this question?

    I have completed testing the system, and would like to delete test incidents, change requests etc.

    Tuesday, February 22, 2011 2:47 PM
  • Answer thw same: use powershell.

    As example:

    function Remove-SCSMSimpleObject
    {
        param ( 
        [Microsoft.EnterpriseManagement.Common.EnterpriseManagementObject]$Object,
        [switch]$Force
        )
      end
      {
        $pendingDelete = $managementGroup.ManagementPacks.GetManagementPack([Microsoft.EnterpriseManagement.Configuration.SystemManagementPack]::System).GetEnumeration("System.ConfigItem.ObjectStatusEnum.PendingDelete");
        $idd = new-object Microsoft.EnterpriseManagement.ConnectorFramework.IncrementalDiscoveryData
        if($Force)
        {
          $idd.Remove($Object)
        }
        else
        {
          $Object[$null, "ObjectStatus"].Value = $pendingDelete
          $idd.Add($Object)
        }
        $idd.Commit($managementGroup)
      }
    }
    

    http://opsmgr.ru
    Tuesday, February 22, 2011 3:12 PM
  • Thank you

    Tuesday, February 22, 2011 3:13 PM