In this scenario we have a user who is having his/her phone SimRing to an endpoint (such as their mobile device) yet the client doesn’t show any SimRing turned on. How can you verify in the database what is setup for the user.
We will need SQL Management Studio loaded on a server in order to accomplish this.
- Connect to the database. If Lync 2010, go to the backend database. If Lync 2013/SfB go to the primary front-end server for that user. You can use the get-csuserpoolinfo to determine which server is primary.
- Browse to the server\RTCLocal (if 2013/Sfb) or server\RTC (if 2010)
- Find your users resource ID. Open a new SQL Query window:SELECT [ResourceId] ,[UserAtHost] FROM [rtc].[dbo].[Resource] WHERE UserAtHost LIKE ‘rbrynteson@%’This will return a ResourceID, take note of it.
Now head over and open up the PublishedStaticInstance. And run this command:SELECT TOP 1000 [PublisherId],[CategoryId] ,[ContainerNum] ,cast(cast([Data] as varbinary(max)) as varchar(max)) as Data FROM [rtc].[dbo].[PublishedStaticInstance] WHERE PublisherId = ‘9’ AND [CategoryId] = ‘8’Change PublisherID to the ResourceID that you found above. The CategoryID should be 8, which comes from the CategoryDef table and refers to routing.Once you do the above, you would see something like this: </li>
- You can than take ContainerNum 0 (which is everyone level) and copy/paste the Data column to Notepad. From there your file is going to look similar to below. NOTE: I have two values instances of it for comparison.In the top XML, you will see value=”simultaneous_ring” which means the server believes that SimRing is still enabled. Your client might not show this, but this is the routing rules it’s going to follow. In the second XML, you can see what it looks like when I’ve disabled SimRing. The value should be equal to “”.Lastly, you could also see a value=”enablecf forward_immediate” if call forward was enabled.</ol>
**Solution** Honestly, there isn’t a great solution in this case. If the database becomes screwed up in that it will no longer allow you to set a forward, you may need to remove the user and add them back into the system. **Unsupported Solution** NOTE: This is not supported. I would do this in a lab but not production unless you have your resume up to date, know what you are doing and did I mention be prepared to get a new job if this goes sideways. Don’t blame me for doing this in production, do it in a lab. Clear enough? I’ve mentioned this tool before but here goes again. There is a tool that I found that supports editing Image columns and specifically the XML file within them. If you download [EMS SQL Studio](http://www.sqlmanager.net/en/products/studio/mssql) (I’ve never used this product before – just found it on the innerwebs) you can see and modify the XML in the data column. Here you can see my XML file:
You can edit the above XML file you found (if on 2013/SfB – make sure you are on the primary server). This will replicate to other servers and magically solved the issue. In this case, I removed the sim_ring value and set it to “”.