Pages

Thursday, October 31, 2013

SharePoint 2013 Workflow can't start

I setup and configure workflow manager 1.0 (SharePoint 2013 workflow). The status in central admin show connected. I was able to use SharePoint designer to create and publish workflow. When i try to run the workflow, i got an error. I check SharePoint log without any luck ,but when i check event view under

Applications and Services Logs -> Microsoft-Workflow-> Operation and i got error

Failed SQL command after 1 tries with error '229'. Exception: System.Data.SqlClient.SqlException (0x80131904): The EXECUTE permission was denied on the object 'InsertTrackingAndStatus', database 'WFInstanceManagementDB', schema 'dbo'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader()
   at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult)
   at System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(IAsyncResult asyncResult)
   at Microsoft.Workflow.Management.ExecuteNonQueryAsyncResult.OnEndExecuteSql(IAsyncResult result)
   at Microsoft.Workflow.Management.ExecuteSqlAsyncResult.EndAsyncResult(IAsyncResult result)
   at Microsoft.Workflow.Common.BackoffRetryAsyncResult.IsolateWithRetry(IAsyncResult result)
   at Microsoft.Workflow.Common.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
ClientConnectionId:5b1469db-d187-4f8e-aa73-3482aa74a195  Command Details:   SQL Text          : InsertTrackingAndStatus
  SQL Parameters    :
    > @StatusRecords = Microsoft.Workflow.Management.SqlDataAccessProvider+InstanceStatusValuesCollection
    > @MetadataWithInstanceId = Microsoft.Workflow.Management.SqlDataAccessProvider+MetadataValuesWithInstanceIdCollection
    > @Variables = Microsoft.Workflow.Management.SqlDataAccessProvider+VariablesCollection
    > @TrackingRecords =
    > @StatusHistoryRecords =
    > @DebugTraceRecords = Microsoft.Workflow.Management.SqlDataAccessProvider+DebugTraceRecordValuesCollection
    > @RollingStatusHistoryWindowSize = 1000
    > @RollingDebugTraceWindowSize = 5000


I have the workflow service account owner permission to the WFResourceManagment and WFInstanceManagemnet database and it start working again. I don't think owner is needed ,but since this is a dev machine so i give owner to get thing moving.


Monday, October 28, 2013

User Profile Synchonization Service Starting and stop Sharepoint 2013

My User profile synchronization service for some reason stop and it can't start it. I try to manual start (Central Admin -> Services on Server), it say starting and couple minute later will stop. I think my stop because I update SharePoint to March CU.I check and both "Forefront Identity manager Service" and "Forefront Identity Manager Synchronization Service" are both disable and stop. Here what I did that seem to fix. 
  • Verify the service account that run timer service is local admin to server. In my case it was not admin so I have to add it local admin and restart server.
  • The Sync account have replicate directory change permission.
  • I start the User profile synchronization service on central admin
  • I do an SharePoint Timer Service Restart
  • I wait couple minute and it show started.
  • I do another iisreset.
  • I now check window service and both "Forefront Identity manager Service" and "Forefront Identity Manager Synchronization Service" started