I’ve been doing a lot with Sitecore 9 lately as we work to retrofit automation processes into the new Sitecore Installation Framework (SIF) paradigm. It will be nice to have Sitecore’s approved way of provisioning a Sitecore environment with JSON and PowerShell . . . but it’s a shame we’ve spent years investing in our own libraries doing the same thing with essentially the same technologies 🙂
That may sound like sour grapes from me, but that’s not really the case. It’s just not trivial to master the SIF specifics at the same time as one is digesting the whole of Sitecore 9 with xConnect, Sitecore PaaS, and Sitecore 9 for Commerce coming any day now. Taking a step back, I’m now in the process of crafting PowerShell to automate the prequisites for Sitecore 9 SIF — and if that strikes you as ironic, I think you get my point. Can a publicly available Sitecore 9 bootstrapper be that far away? Lets just hope it’s not a custom miasma of JSON with PowerShell and with it’s very own prerequisites to perpetuate the cycle!
Just an aside: I think many of us are doing the same thing, just refer to this effort around Solr or this GUI to layer on top of Sitecore’s new framework. Both these efforts, and many others, are excellent, but illustrate how Sitecore 9 SIF feels unfinished.
With that all off my chest . . . I thought I’d share a gotcha with SIF that I haven’t seen documented elsewhere in case it helps others. Categorize this as a self-inflicted Sitecore 9 SIF wound, I can’t really blame the framework here — the exception message is actually very helpful. While the WebDeploy task was running with any Sitecore 9 SIF installation, I would get this error every time from a few of our servers:
Could not deploy package.
Internal Error. The database platform service with type Microsoft.Data.Tools.Schema.Sql.Sql130DatabaseSchemaProvider is not valid. You must make sure the service is loaded, or you must provide the full type name
of a valid database platform service.
Here’s how it looks in situ as part of the InstallWDP : WebDeploy task with SIF:
This didn’t happen on development environments, but on some build servers or new virtual machines.
I reviewed the Sitecore installation documentation but couldn’t see anything explicitly speaking to this, and I verified the SQL Server DAC fx was consistent with the installation docs. My initial solution was to install SQL Server Management Studio (SSMS) as that package includes the key dependencies for automating SQL Server 2016 the way SIF expects. Then I realized it’s probably encompassed in this line item tucked into the Installation Guide:
The link https://msdn.microsoft.com/en-us/dn864412 reads more like VS.Net integration tooling when I glanced at it, so I initially dismissed it for my use-case . . . but WebDeploy gets what WebDeploy wants, and to get Sitecore 9 SIF running you’ll need these libraries one way or the other.
This explains why development machines or other servers that had been around a while wouldn’t exhibit this problem — they already had the SQL tooling installed through one means or another.
For posterity, here’s the output from my console in case it helps a web searcher find their resolution . . .
InstallWDP : WebDeploy [WebDeploy]:[Path] C:\Program Files\iis\Microsoft Web Deploy V3\msdeploy.exe Info: Adding MsDeploy.Site (MsDeploy.Site). Info: Adding database (user id=sqlUserNotTelling;data source=SC9Run482-SQL;initial catalog=xp0482_Processing.Pools) Info: Initializing deployment: Pending. Info: Analyzing deployment plan: Pending. Info: Updating database: Pending. Info: Creating deployment plan: Pending. Info: Verifying deployment plan: Pending. Info: Deploying package to database: Pending. Info: Creating deployment plan: Running. Info: Initializing deployment: Running. Info: Initializing deployment (Start) Info: Initializing deployment: Faulted. Info: Initializing deployment (Failed) Info: Creating deployment plan: Faulted. Info: Verifying deployment plan: Faulted. Info: Deploying package to database: Faulted. msdeploy.exe : Error Code: ERROR_EXECUTING_METHOD At C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework\1.1.0\Public\Tasks\Invoke-CommandTask.ps1:31 char:13 + & $Path $Arguments | Out-Default + ~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (Error Code: ERROR_EXECUTING_METHOD:String) , RemoteException + FullyQualifiedErrorId : NativeCommandError More Information: Could not deploy package. Internal Error. The database platform service with type Microsoft.Data.Tools.Schema.Sql.Sql130DatabaseSchemaProvider is not valid. You must make sure the service is loaded, or you must provide the full type name of a valid database platform service.