5

I am trying to deploy Sitecore 8.2 Update 2 instance to Azure PaaS. I've installed a fresh instance on my local machine, installed content/media/template packages from our previous version, republished the entire site, and gotten it to work fine locally.

Then I followed the instructions here:

http://borisbrodsky.com/sitecore/sitecore-8-2-azure-deployment-with-arm-templates-and-powershell/

I was able to upload a XP0 web deploy package to blob storage and deploy - I receive no errors during the deployment. However, when I then load the site or or the sitecore admin screen - I receive the same message:

Server Error in '/' Application.

Invalid column name 'TemplateID'.
Invalid column name 'ID'.
Invalid column name 'Name'.

[SqlException (0x80131904): Invalid column name 'TemplateID'.
Invalid column name 'ID'.
Invalid column name 'Name'.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +3277272
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +345
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +5002
   System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +92
   System.Data.SqlClient.SqlDataReader.get_MetaData() +102
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption) +602
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +3152
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +704
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +121
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +307
   Sitecore.Data.DataProviders.Sql.DataProviderCommand.ExecuteReader() +91

[DataException: Error executing SQL command:  SELECT DISTINCT [ID], [Name] FROM [Items] WHERE [TemplateID]=@templateId]

All the databases appear to be deployed -- but the Web database is missing those columns in the item table. Are they not being deployed because I'm publishing my content before creating the web deploy package? Or is there something else I'm missing?

Thanks!

2
  • Did you use the XP0 web deploy package provided by dev.sitecore.net? Commented Feb 16, 2017 at 1:43
  • Yes, and I figured out a solution - but I'm not sure it's a "answer" to this question or another way I've messed up. I will post in a few minutes.
    – Watson
    Commented Feb 16, 2017 at 16:20

2 Answers 2

5

Using DotPeek, I have spotted the issue in the class Sitecore.Cloud.Packaging.WebDeployPackages.WebDeployPackageBuilder on the Build method, I suspect this is the root cause of the problem.

      {
        "core",
        path1 + "\\Sitecore.Core.dacpac"
      },
      {
        "master",
        path1 + "\\Sitecore.Master.dacpac"
      },
      {
        "web",
        path1 + "\\Sitecore.Reporting.dacpac"
      },
      {
        "reporting",
        path1 + "\\Sitecore.Web.dacpac"
      }

Currently waiting on Sitecore to provide a fix for this.

3
  • 1
    Thanks for sharing Tom :-) Please update this answer with relevant information, when you hear back from Sitecore.
    – Mark Cassidy
    Commented Mar 22, 2017 at 15:22
  • Will do when I hear back Commented Mar 22, 2017 at 16:46
  • Nice Tom -- I marked this as the answer because it's clearly a bug they will need to fix.
    – Watson
    Commented Mar 22, 2017 at 18:53
1

Once I was able to connect to the database -- I noticed that the Web database and the Analytics database were switched. The Web database contained Facts and the Item table only contained two columns - ItemId and Url. This mirrors the Analytics table on my local.

I double checked my connection strings and verified everything ran locally fine. I do not see anywhere to explicitly set this in the azure packaging. My solution was to just swap the names of my Analytics and Web databases in my local and re-create the web deploy package. Then the deployment seems to work.

Seems like a bug I will try to submit to sitecore support -- unless anyone has any suggestions on what could be wrong in my script.

3
  • I would check your script and make sure your SQL database variables are matched up correctly. I haven't seen a problem with analytics/web getting switched up with the Sitecore provided WDP. Commented Feb 16, 2017 at 17:26
  • I triple checked. Ironically if I switch them in the connection strings it fails to work locally but the Azure package is generated correctly....
    – Watson
    Commented Mar 15, 2017 at 20:11
  • I have seen the exact same behaviour as well when creating a custom SCWDP Commented Mar 22, 2017 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.