London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Magnus Rahl
Aug 24, 2009
  6319
(0 votes)

R2 SP2 Upgrade fails with case sensitive collation

Trying to upgrade a site from EPiServer CMS 5 R2 SP1 to R2 SP2 I ran into problems. The error message I encountered was

Invalid column name 'fkPageTypeId'
Invalid column name 'pkId'
Invalid column name 'fkPageId'

The reason turned out to be that the database, for an unknown reason (it’s an old migrated site), was using a case sensitive collation, and one of the upgrade scripts has incorrect case in a couple of lines. The culprit is the file [EPiServer install dir]\CMS\5.2.375.236\Upgrade\Database\sql\0005_0002_0375_0220to0005_0002_0375_0229.sql where the following lines had to be changed:

Line 48:
select tblPage.pkId, tblPAge.fkMasterLanguageBranchId FROM tblPageType
    INNER JOIN tblPage ON tblPage.fkPageTypeId = tblPageType.pkId
    INNER JOIN tblPageLanguage ON tblPageLanguage.fkPageId = tblPage.pkId

Should be:

select tblPage.pkID, tblPage.fkMasterLanguageBranchID FROM tblPageType
    INNER JOIN tblPage ON tblPage.fkPageTypeID = tblPageType.pkID
    INNER JOIN tblPageLanguage ON tblPageLanguage.fkPageID = tblPage.pkID

Line 94:
UPDATE tblPageLanguage SET PublishedVersion = @workPageId WHERE fkPageId = @pageId AND fkLanguageBranchId = @masterLanguageBranchId

Should be:

UPDATE tblPageLanguage SET PublishedVersion = @workPageId WHERE fkPageID = @pageId AND fkLanguageBranchID = @masterLanguageBranchId

Aug 24, 2009

Comments

Please login to comment.
Latest blogs
Optimizely Product Recommendation Troubleshooting

In today’s fast-paced digital landscape, personalization is everything . Customers expect relevant, tailored experiences whenever they interact wit...

Sanjay Kumar | Apr 28, 2025

Natural Language Q&A in Optimizely CMS Using Azure OpenAI and AI Search

In Part 2, we integrated Azure AI Search with Azure Personalizer to build a smarter, user-focused experience in Optimizely CMS. We used ServiceAPI ...

Naveed Ul-Haq | Apr 25, 2025 |

Identifying Spike Requests and Issues in Application Insights

Sometimes within the DXP we see specific Azure App Instances having request spikes causing performance degredation and we need to investigate. I fi...

Scott Reed | Apr 25, 2025

Optimizely Frontend Hosting Beta – Early Thoughts and Key Questions

Optimizely has opened the waitlist for its new Frontend Hosting capability. I’m part of the beta programme, but my invite isn’t due until May, whil...

Minesh Shah (Netcel) | Apr 23, 2025