Data collector stop issue

Welcome Forums General PowerShell Q&A Data collector stop issue

This topic contains 1 reply, has 2 voices, and was last updated by

2 years, 10 months ago.

  • Author
  • #39224

    Points: 0
    Rank: Member

    The below code snippet is throwing error as
    Exception calling "Stop" with "1" argument(s): "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"
    Performance Log users group has access Log on as batch job in the sec policy.
    please help
    $dcset= new-object -COM Pla.DataCollectorSet;
    $name="User Defined\sql_2016";
    Write-host "Couldn't stop the Data collector"
    Write-host "Error: " $ErrorMessage

  • #39470

    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    It's definitely an "access denied" problem. Either the user you've specified doesn't have the necessary permission (and I'm not that knowledgeable on SQL Server data collectors, so I'm not going to be of any help there), or the COM object isn't marshalling correctly through .NET Interop.

    Sorry – I know that's not helpful to you, but this isn't really a PowerShell thing. You're using a COM object that messes with SQL Server – while you're using PowerShell to do it, none of my PowerShell experience helps me understand SQL or COM :).

The topic ‘Data collector stop issue’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort