Reporting Subscriptions stucks in status “Pending” after domain user migration

Problem Description:

after a user’s account has been migrated from sourdeomain to targetdomain, the subscriptions created with that user account stopped working.​

Resolution:

stsadm migration on SharePoint doesn’t fix this problem; you have to manually change the subscription users in the database of the SharePoint Reporting service application.

To identify:

​SELECT
jobs.name AS JobName,
C.path AS ReportPath,
C.name AS ReportName,
u.username AS SubscriptionOwner
FROM dbo.ReportSchedule RS
JOIN msdb.dbo.sysjobs jobs
ON CONVERT(varchar(36), RS.ScheduleID) = jobs.name
INNER JOIN dbo.Subscriptions S
ON RS.SubscriptionID = S.SubscriptionID
INNER JOIN dbo.Catalog C
ON s.report_oid = C.itemid
INNER JOIN dbo.users u
ON s.ownerid = u.userid

To fix:

DECLARE @OldUserID uniqueidentifier
DECLARE @NewUserID uniqueidentifier
SELECT @OldUserID = UserID FROM dbo.Users WHERE UserName = ‘sourcdomain\firstname.lastname’
SELECT @NewUserID = UserID FROM dbo.Users WHERE UserName = ‘targetdomain\firstname.lastname’
UPDATE dbo.Subscriptions SET OwnerID = @NewUserID WHERE OwnerID = @OldUserID

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Cannot rename SPSite on restore (Restore-SPSite)

Problem Description:

when restoring a SPSite from a backup to a new URL (longer), it didn’t work.

Cause: for the new URL there would have been documents exceeding the 256 character URL limit​

Resolution:

detach SQL database
find documents
re-attach and manually correct them

USE SPC_Content_MyShared_01
declare @siteid as UniqueIdentifier
set @siteid = ‘1cc13ce’
select *
FROM
TVF_AllDocs_Site(@siteID)
WHERE
LEN(CASE WHEN (DATALENGTH(DirName) = 0) THEN LeafName WHEN (DATALENGTH(LeafName) = 0) THEN DirName ELSE DirName + N’/’ + LeafName END) > 256

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Nintex Inventory Page breaks after domain user migration

Problem Description:

After we migrated the user account from sourcedomain\first.last to targetdomain\first.last​ the Nintex workflow inventory page stopped working for ALL users.
Cause: in the Nintex config DB the old user was still the “author” of the workflows what caused the page load to break, because the user couldn’t be resolved.

Directly in Nintex config DB update the value for the author of the affected user (support from Nintex gave OK).

Update NW2013DB.dbo.Workflows set Author = ‘i:0#.w|targetdomain\first.last’ where Author = ‘i:0#.w|sourcedomain\first.last’​

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Terminate SharePoint Workflows via PowerShell

Problem Description:

​Workflow cannot be terminated in the GUI

Resolution:

Stop the workflow on PowerShell

$web = Get-SPWeb “WebUrl”
$web.AllowUnsafeUpdates = $true;

$list = $web.Lists[“Listname”];

$wfm=New-object Microsoft.SharePoint.WorkflowServices.WorkflowServicesManager($web)
$workflowInstanceService=$wfm.GetWorkflowInstanceService()
$workflowInstance=$workflowInstanceService.EnumerateInstancesForListItem($list.ID,ItemID)
$workflowInstance

$mywfi = $workflowInstanceService.EnumerateInstancesForListItem($list.ID,ItemID) | where ID -eq WFIID

$workflowInstanceService.TerminateWorkflow($mywfi)
$web.Dispose()

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...