I am trying to create a new company in GP for Testing. I have been through this process many times before but I have one particular instance that is giving me trouble when attempting to create the database.
During the Process I get this message during the "Load Stored Procedures" section.
The following SQL statement produced an error:
CREATE PROCEDURE dbo.wfOutOfOfficeDelegationCleanup as begin set NOCOUNT ON declare @domain char(64), @alias char(20), @DomainUserName char(255) declare @length smallint, @position smallint, @UsersListGuid char(37), @ActualUsersListGuid char(37) declare Delegation_Users cursor local fast_forward for select DomainUserName, UsersListGuid from WF40500 open Delegation_Users fetch next from Delegation_Users into @DomainUserName, @UsersListGuid while @@FETCH_STATUS=0 begin select @length=LEN(@DomainUserName) select @position=charindex('\',@DomainUserName) select @domain=SUBSTRING(@DomainUserName,1,(@position-1)) select @alias=SUBSTRING(@DomainUserName,(@position+1),(@length-@position)) select @ActualUsersListGuid = rtrim(upper(isnull((select DYNAMICS.dbo.GetObjectGuidByDomainAlias(rtrim(@domain),rtrim(@alias),1,0)),''))) if rtrim(upper(@UsersListGuid))<>rtrim(@ActualUsersListGuid) begin delete from WF40510 where UsersListGuid=@UsersListGuid delete from WF40500 where UsersListGuid=@UsersListGuid end fetch next from Delegation_Users into @DomainUserName, @UsersListGuid end close Delegation_Users deallocate Delegation_Users declare Delegation_Lines cursor local fast_forward for select DomainUserName from WF40510 open Delegation_Lines fetch next from Delegation_Lines into @DomainUserName while @@FETCH_STATUS=0 begin select @length=LEN(@DomainUserName) select @position=charindex('\',@DomainUserName) select @domain=SUBSTRING(@DomainUserName,1,(@position-1)) select @alias=SUBSTRING(@DomainUserName,(@position+1),(@length-@position)) if DYNAMICS.dbo.IsValidADUser(rtrim(@domain),rtrim(@alias),1,0)=0 begin delete from WF40510 where DomainUserName=@DomainUserName end fetch next from Delegation_Lines into @DomainUserName end close Delegation_Lines deallocate Delegation_Lines delete from WF40500 where rtrim(upper(UsersListGuid)) not in (select rtrim(upper(UsersListGuid)) from WF40510) declare @UserDelegationDates TABLE(ENDDATE datetime, UsersListGuid char(37)) insert into @UserDelegationDates select MAX(ENDDATE) as ENDDATE,UsersListGuid from WF40510 group by UsersListGuid update WF40500 set WF_Auto_Delegate_Tasks=0 where WF_Auto_Delegate_Tasks=1 and UsersListGuid in (select UsersListGuid from @UserDelegationDates where ENDDATE<SYSDATETIME()) END
Then after hitting OK, this error:
ERROR [Microsoft][SQL Server Native Client 11.0][SQL Server]Failed to create AppDomain "DYNAMICS.dbo[runtime].30".
Could not load file or assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. No
I have run this multiple times and it fails at the same stored procedure each time. This is the first time I have tried to create a company after upgrading to GP2013 12.00.1826. Any ideas would be appreciated.
*This post is locked for comments