• Home
  • My Tools
  • Visio Stencils
  • Online Tools
  • PS Scripts
  • PS One Liners
  • Downloads
  • Product Review
  • About

Smarter Together

~ by I.M.H.O.

Smarter Together

Category Archives: RGS

Event ID 31137 – Unable to removeadd Agent from Response Group

09 Thursday May 2013

Posted by Paul Bloem in dbo.Agents, event id, Event ID 31137, Event ID 31138, RGS

≈ Leave a comment

Recently I came across a situation where an Agent assigned to a response group had their SIP address changed by an administrator. Suddenly calls to this RGS were misbehaving, also their were 2 errors on the Lync FE server Event ID 31137 and 31138



Found the error by taking the SIP address from the Event  and looking for the user in the Lync database, thats when I noticed it had changed.
Seems Johan came across the same issue before and so here is how he has helped me find the issue..

Response Group agents not removed from dbo.Agents table
Original Article by Johan Veldhuis here


Warning: the procedure described in this blog are used as a workaround for an issue. Incorrect changes in the database may cause malfunctioning of the Response Groups.

In Lync 2010 it’s possible to add users to a group which can be used by the Response Groups. In some scenarios it might be necessary to remove and directly add an agent. This can be the case if a SIP address of a user needs to be changed.

Removing the agent is normally not an issue but adding it directly is. In almost every case the following error will be displayed:

Windows Powershell returned the following errors: 

Cannot insert duplicate key row in object dbo.Agents with unique index IX_Agents_UserSid.
The statement has been terminated.

This error will tell you that it can’t add the agent because there is an existing entry in the agent table which is used by the Response Groups.

Normally you will have to wait a few minutes before you can add the user again. But this week I experienced that after 3 hours the agent still can’t be added to the group. In the event log nothing strange was being logged. On TechNet you will not find many information how the Response Groups really perform this action. But in some cases it looks like the Response Group will be resetted after making a change and it only resets the Response Group if it is idle.

Because I couldn’t add the user after 3 hours it became quiet irritating. As you may know Lync is using SQL databases. The agents of a Response Group are added to the rgsconfigdatabase. This database can be found on the SQl server which also hosts the CMS.

Within this database you will find a table called dbo.Agents. When you will open this table you will see an overview of the agents which are member of the groups.

Perform the following steps to remove an agent from this table:
Right click on the dbo.Agents table and select the option Edit Top 200 rows
Search for the user and remove the specific record

By removing the record it will be possible to add the agent to the group again.

The issue is described in this KB article of Microsoft:

http://support.microsoft.com/kb/2393943

Advertisement

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on Pocket (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to share on Skype (Opens in new window)
  • Click to email a link to a friend (Opens in new window)
  • Click to print (Opens in new window)

Like this:

Like Loading...

RGS – Hours of Business & Holiday sets

20 Tuesday Nov 2012

Posted by Paul Bloem in Holiday Lists, Powershell Scripts, Preset Schedule, Quick Reference Guide, Response Groups, RGS, Workflows

≈ 1 Comment

Response Groups – Creating Workflows


Both the option to add a preset hour schedule and holiday sets are greyed out until they are added from Lync Server Management Shell.

This is done as follows:


Defining Business hours as a Preset Schedule

*/Service Desk$a = New-csRgsTimeRange -Name “Service Desk Business Hours” -OpenTime “7:45” -CloseTime “17:00”

New-CsRgsHoursOfBusiness -Parent “ApplicationServer:” -Name “Service Desk Business Hours” -MondayHours1 $a -TuesdayHours1 $a -WednesdayHours1 $a -ThursdayHours1 $a -FridayHours1 $a

*/Lexel Business hours


$b = New-csRgsTimeRange -Name “Lexel Business Hours” -OpenTime “8:29” -CloseTime “17:05”


New-CsRgsHoursOfBusiness -Parent “ApplicationServer:” -Name “Lexel Business Hours” -MondayHours1 $b -TuesdayHours1 $b -WednesdayHours1 $b -ThursdayHours1 $b -FridayHours1 $b


Defining Standard Holiday Lists

$a = New-CsRgsHoliday -Name “New Year’s Day” -StartDate “1/1/2013 12:00AM” -EndDate “2/1/2013 12:00AM”
$b = New-CsRgsHoliday -Name “Day after New Year” -StartDate “2/1/2013 12:00AM” -EndDate “3/1/2013 12:00AM”
$c = New-CsRgsHoliday -Name “Auckland Anniversary” -StartDate “28/1/2013 12:00AM” -EndDate “29/1/2013 12:00AM”
$d = New-CsRgsHoliday -Name “Waitangi Day” -StartDate “6/2/2013 12:00AM” -EndDate “7/2/2013 12:00AM”
$e = New-CsRgsHoliday -Name “Good Friday” -StartDate “29/3/2013 12:00AM” -EndDate “30/3/2013 12:00AM”
$f = New-CsRgsHoliday -Name “Easter Monday” -StartDate “1/4/2013 12:00AM” -EndDate “2/4/2013 12:00AM”
$g = New-CsRgsHoliday -Name “Anzac Day” -StartDate “25/4/2013 12:00AM” -EndDate “26/4/2013 12:00AM”
$h = New-CsRgsHoliday -Name “Queens Birthday” -StartDate “3/6/2013 12:00AM” -EndDate “4/6/2013 12:00AM”
$i = New-CsRgsHoliday -Name “Labour Day” -StartDate “28/10/2013 12:00AM” -EndDate “29/10/2013 12:00AM”
$j = New-CsRgsHoliday -Name “Xmas Day” -StartDate “25/12/2013 12:00AM” -EndDate “26/12/2013 12:00AM”
$k = New-CsRgsHoliday -Name “Boxing Day” -StartDate “26/12/2013 12:00AM” -EndDate “27/12/2013 12:00AM”

New-CsRgsHolidaySet -Parent “ApplicationServer:lxlls2013fe.lexel.local” -Name “2013 Holidays” -HolidayList($a,$b,$c,$d,$e,$f,$g,$H,$i,$j,$k)

Thanks to Jamie Schwinn at WaveFormatin for a really cool tool called “Lync Holiday Set Editor” managing holidays has become alot less painful. Beers on me Jamie! Look me up if you ever in NZ 🙂

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on Pocket (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to share on Skype (Opens in new window)
  • Click to email a link to a friend (Opens in new window)
  • Click to print (Opens in new window)

Like this:

Like Loading...
Newer posts →

IMHO YouTube Channel

Follow Smarter Together on WordPress.com

Enter your email address to subscribe and receive notifications of new posts.

Join 674 other subscribers

Show your appreciation by donating

Archives

Category

ABS ABServer ADContacts Address Book AddressBook AddressBook Service Communicator contacts CX500 Devices DHCP DNS Edge Server Error Codes event id Exchange UM 2010 GAL Install Guide Lync 2013 Tools Lync Edge Lync Tools Microsoft Teams Monitoring Polycom Powershell Scripts Product Review QOS Quick Reference Guide Reskit RGS RTC Database SIP SIP Options Skype for Business Skype for Business Monitoring Skype for Business Tools SQL Teams TMG Tool Tools Troubleshoot Edge UC Sorted Tools UM Uncategorized Unified Messaging visio Visio Stencil voicemail

Blog at WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Follow Following
    • Smarter Together
    • Join 63 other followers
    • Already have a WordPress.com account? Log in now.
    • Smarter Together
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
%d bloggers like this: