I fixed my problem with a very un-supported solution. Obviously back up your databases and proceed at your own risk.
Because the "duplicate number" error was only appearing at one of my branch sites I knew the problem had to be on that SBA. I suspected that is was a problem in the SBA's copy of the database and rebooting the machine or restarting the Replica
service did not help. Here's what I ended up doing.
I connected to <SBA server name>\RTCLOCAL with SQL Server Mgmt Tools
Open the rtc database
ResourceID is going to be the key value here.
I ran this query to find which ResourceIDs had that phone number
SELECT *
FROM [rtc].[dbo].[ResourcePhone]
WHERE PhoneNum = '+11234567890';
This returned two results in this case ResourceId
569 and 599
Then I ran
select *
from dbo.Resource
where ResourceId = '599';
That returned a user's name as the UserAtHost. I want that user to have the number so I searched the other ID.
select *
from dbo.Resource
where ResourceId = '569';
That returned my-workflow@contoso.com. That's the deleted workflow that is causing the duplicate number problem. So ResourceId 569 is my problem.
Now I ran these commands. I
think you have to run them in this order because of SQL rules in place.
I'm not a SQL guy so hope for the best.
delete from dbo.UserPolicy
where ResourceId = '569';
delete from dbo.ResourcePhone
where ResourceId = '569';
delete from dbo.ResourceDirectory
where ResourceId = '569';
delete from dbo.Resource
where ResourceId = '569';
Which will delete
the rows with ResourceId 569 from those specific tables. And then suddenly it works.
I hope this helps someone someday. I supposse if I blew away my SBA and rebuilt it. That would have solved the problem in a more supported way. I tried searching for a way to force an SBA to purge it's database and rebuild but I didn't find anything helpful.
-
Marked as answer by
eob455
Tuesday, May 26, 2015 6:25 PM