Wednesday, July 27, 2016

Hyper-V VSS Writer State : [7] Failed Last error : Timed out

Had an issue of the Hyper-V VSS when I typed to check.

vssadmin list writers

image

In the event viewer I got as the following :

SNAGHTMLd65090\

I want to get the VSS back to be stabilize but not wanting to restart the server, therefore I restart a service.

image

Service to restart : Microsoft Virtual Machine Management

Keyword :

Volume Shadow Copy Service error: Unexpected error querying for the IVssWriterCallback interface. hr = 0x80070005, Access is denied.. This is often caused by incorrect security settings in either the writer or requestor process.Operation:  Gathering Writer Data Context:  Writer Class Id: {e8132975-6f93-4464-a53e-1050253ae220}  Writer Name: System Writer  Writer Instance ID: {bc497fa6-6627-47fb-a005-ac94fa83904e}Error : 8194 vssadmin list writer Hyper-V State 7 timed out

Wednesday, July 13, 2016

SCDPM–Job Failed to Cancel or Hung or Stuck BUT Cannot be remove

Environment
SCDPM 2012 SP1

It’s been hours the job has been cancelled but couldn’t be remove from the DPM job.  Can’t execute the next job due to the job is still in progress to cancel.   However, found the issue is with the SQL Database that is holding the job from being release. 

In the SCDPM console, it displays as below :

SNAGHTML6facbe

The following steps were carried out :

  • Launch the SQL Server Management Studio (<right-click> run as Administrator)

Once it’s launched, ensure DPM DB is connected

Copy the script below :

USE DPMDB

BEGIN TRAN

-- mark replica as invalid if there was some operation happening on that replica

UPDATE tbl_PRM_LogicalREplica

SET Validity = 1 -- Invalid

WHERE OwnerTaskIdLock IS NOT NULL AND

Validity <> 5 AND -- ProtectionStopped

Validity <> 6 -- Inactive

-- Release all the locks held

UPDATE tbl_PRM_LogicalREplica

SET OwnerTaskIdLock = null,

Status=8

if (select COUNT(name) from tbl_AM_Agent where Name like 'DPM RA v2%') > 0

begin

exec sp_executesql N'UPDATE tbl_RM_ShadowCopy

SET ArchivetaskId = NULL,

RecoveryJobId = NULL'

end

UPDATE tbl_ARM_Datasource

SET Status = 0,

OwnerLockId = NULL

DELETE tbl_RM_DatasourceServerlock

DELETE tbl_RM_ShadowCopyLocks

-- Set All running tasks and jobs to failed

UPDATE tbl_TE_TaskTrail

SET ExecutionState = 3,

LastStateName = 'Failure',

StoppedDateTime = GetUtcDate()

WHERE ExecutionState NOT IN (2,3)

UPDATE tbl_JM_JobTrail

SET JobState= 'Failed',

EndDateTime = GetUtcDate()

WHERE jobstate= 'Execute' OR jobstate= 'Retire'

-- unreserve resources held

UPDATE tbl_MM_Global_Media

SET ReservationLevel = 0,

ReservationOwnerMMId = null

UPDATE tbl_MM_Global_Drive

SET ReservationLevel = 0,

ReservationOwnerMMId = null

UPDATE tbl_MM_Global_IEPortResource

SET ReservationLevel = 0,

ReservationOwnerMMId = null

COMMIT TRAN

 

  • Click on New Query
  • Paste the Script into the Query Column
  • Click Execute

SNAGHTML8c5e05

  • Check on the OUTPUT column below
  • Close the SCDPM console and open it back.  It should clear the status and be able to execute whatever job that is outstanding.

Hope this helps.   Works on SCDPM 2012 R2 too. 

Resource of the script is from here.

Thank you.

keywords : SCDPM, Data protection manager 2012 SP1, SCDPM 2012 SP1, SCDPM 2012 R2, Job cancel but hang, cancel job failed