Lync Server 2010 Database Updates Explained – Part 2

by Jamie Schwinn on March 6, 2012

This is a continuation of my previous post Lync Server 2010 CU3 Database Update Explained.

Since the original article was written for CU3 back in September 2011, two additional Cumulative Updates have been released, bringing the latest patch level to CU5 as of March 2012. Both of these subsequent Cumulative Updates have also included a Lync SQL Backend database update. More specifically, the Core Component patch includes files responsible for performing the database update procedure in “C:\Program Files\Common Files\Microsoft Lync Server 2010\DBSetup”.

These files have been updated in each Cumulative Update since CU3 as shown by the file information table included in the KB articles related to the Core Components patches. These files are also directly related to the DbVersionUpgrade row in the dbo.DbConfigInt table of the Lync 2010 Pool Back-End database. The dbsetup.wsf file contains a variable which specifies the DbVersionUpgrade value as seen in the SQL database.

Snippet from CU5 dbsetup.wsf:

//
// Set the upgrade version. We need to do it here
// because only the databases requring patches need it.
// Doing it in dbheader.wsf will manadate all other databases
// to set this value, though they do not require it.
// Right now, only two database needs patching XDS, and Rtc
//

Global.VersionUpgrade = 4;

This information allows us to determine whether the update has been run against the Back-End Database. If the Global.VersionUpgrade value in dbsetup.wsf does not match the DbVersionUpgrade value in dbo.DbConfigInt, we can conclude that Lync Core Components has been patched, but the database update procedure has not yet been executed. See the previous post, Lync Server 2010 CU3 Database Update Explained, for more information on running the database update procedure. The same procedure applies to all current Lync 2010 Cumulative Updates. In conclusion, run the Database Update procedure every time you patch Lync Front End Servers. If you forgot to run the database update after installing a previous patch, don’t worry as the updates are cumulative. Running the database update for CU5 will apply all the previous database updates as well.

Database Update Versions

CU Date Lync Core Version KB Article DBVersionUpgrade
CU3 July 2011 7577.166 KB2571545 1
N/A * September 2011 7577.172 KB2621854 2
CU4 November 2011 7577.183 KB2514981 3
CU5 February 2012 7577.190 KB2670334 4

There was no Database Update included with CU6 or CU7.

* I just discovered that DBVersionUpgrade 2 was issued in between CU3 and CU4 as a hotfix  to resolve an issue with the Lync ResKit ABSConfig tool. I tried applying it on a CU5 patched server to see what would happen. Thankfully, Microsoft’s patching system was able to detect that the CU5 patched server already had newer files than the files in the September hotfix. More on this and the updated ABSConfig tool in a future article.

 

CU3 dbo.DbConfigInt Screenshot

 

CU4 dbo.DbConfigInt Screenshot

 

CU5 dbo.DbConfigInt Screenshot

Be Sociable, Share!

{ 6 comments… read them below or add one }

luisr March 7, 2012 at 5:45 am

There are some other changes:
*On the dbrtc.sql, the ‘ConfpSchedAddInvitee’ and ‘ConfJoinParticipant’ store procedures have a change related to federation;
* The RGS databases have some change from the CU3 release

Brian Purcell March 12, 2012 at 3:35 pm

So if *someone* forgot to do the database update in CU3 and has already installed CU4, can they just do the update for CU4 or do they need to get a copt of the DB update script for CU3 and run it first? I would assume that since these are cumulative updates that don’t have a pre-req, that the latest update would include all the previous ones. Is that a valid assumption?

Jamie Schwinn March 12, 2012 at 3:45 pm

Your assumption is correct. Cumulative Updates will include all previous updates and you don’t need to go hunting for a previous copy of the database update script. Just run the database update PowerShell cmdlet as shown in the KB article.

Brian Purcell March 12, 2012 at 3:59 pm

Thanks! That saves me a bit of consternation.

Octavius April 4, 2012 at 7:16 am

Hi, thanks for the post, my question is, the KB say
■In a Lync Server 2010 Enterprise Edition environment in which the archiving/monitoring services are collocated with an Enterprise Edition back-end server, run this cmdlet from the Enterprise Edition back-end server.
How can I update the DB from the back-end server (sql server) if I don’t have Lync installed there?, how can I run the cmdlet?
Thanks

Jamie Schwinn April 4, 2012 at 8:26 am

Since the Install-CsDatabase cmdlet is not available via LyncPowerShell remoting, the only way to accomplish this would be to install the Lync Core components onto the SQL server to gain access to a Lync PowerShell prompt. Keep in mind that the database update files come with the Core Components updates so you would need to install the latest Core Components update on the SQL server as well before running the database update cmdlet.

Previous post:

Next post: