Sitecore 9.0.1 - Publishing Target

I’m currently working on an upgrade project – upgrading a Sitecore v 8.1 solution to Sitecore v9.0.1. I’m using Sitecore Update Installation Wizard. Sure, I had some preparations for the upgrade (like making clean Sitecore include config files etc.), but after that, the upgrade it self actually ran quite smoothly – anyway, better than my +13 years of Sitecore implementation would have predicted…

Sitecore v9. have some breaking changes, new ways of doing configurations etc.

One of the new stuff is how to add new Sitecore databases/Publishing Target. Still, you have to create a “Pulishing Target” item in the Sitecore Shell (located at “master:/sitecore/system/publishing targets”). Create a new Item based on the “Publishing Target” template and add the Database ID in the “Target database” field. Add the connectionstring to the “/App_Config/ConnectionString.config” file (name the connectionstring element with the value from the “Target database” field). But the database element in the Sitecore.Config file has changed. Sitecore no longer uses the proxyDataProvider element. Also, you must add settings for the propertystore and the eventqueueprovider

The Sitecore v8 database element in the Sitecore.config file goes from:
 ...
 <databases>
    <database id="publish-target-Name" singleInstance="true" type="Sitecore.Data.Database, Sitecore.Kernel">
      <param desc="name">$(id)</param>
      <icon>Images/database_web.png</icon>
      <securityEnabled>true</securityEnabled>
      <dataProviders hint="list:AddDataProvider">
        <dataProvider ref="dataProviders/main" param1="$(id)">
          <disableGroup>publishing</disableGroup>
          <prefetch hint="raw:AddPrefetch">
            <sc.include file="/App_Config/Prefetch/Common.config" />
            <sc.include file="/App_Config/Prefetch/Webdb.config" />
          </prefetch>
        </dataProvider>
      </dataProviders>
      <proxiesEnabled>false</proxiesEnabled>
      <proxyDataProvider ref="proxyDataProviders/main" param1="$(id)" />
      <archives hint="raw:AddArchive">
        <archive name="archive" />
        <archive name="recyclebin" />
      </archives>
      <cacheSizes hint="setting">
        <data>100MB</data>
        <items>50MB</items>
        <paths>2500KB</paths>
        <itempaths>50MB</itempaths>
        <standardValues>2500KB</standardValues>
      </cacheSizes>
    </database>
  </databases>


In Sitecore v9.0.1 To:
...
<databases>
    <database id="publish-target-Name" singleInstance="true" type="Sitecore.Data.DefaultDatabase, Sitecore.Kernel">
      <param desc="name">$(id)</param>
      <icon>Images/database_web.png</icon>
      <securityEnabled>true</securityEnabled>
      <dataProviders hint="list:AddDataProvider">
        <dataProvider ref="dataProviders/main" param1="$(id)">
          <disableGroup>publishing</disableGroup>
          <prefetch hint="raw:AddPrefetch">
            <sc.include file="/App_Config/Prefetch/Common.config" />
            <sc.include file="/App_Config/Prefetch/Webdb.config" />
          </prefetch>
        </dataProvider>
      </dataProviders>
      <PropertyStore ref="PropertyStoreProvider/store[@name='$(id)']" />
      <remoteEvents.EventQueue>
        <obj ref="eventing/eventQueueProvider/eventQueue[@name='$(id)']" />
      </remoteEvents.EventQueue>
      <archives hint="raw:AddArchive">
        <archive name="archive" />
        <archive name="recyclebin" />
      </archives>
      <cacheSizes hint="setting">
        <data>100MB</data>
        <items>50MB</items>
        <paths>2500KB</paths>
        <itempaths>50MB</itempaths>
        <standardValues>2500KB</standardValues>
      </cacheSizes>
    </database>
    </databases>


And add the propertyStoreProvider:
<PropertyStoreProvider>
    <store name="publish-target-Name" prefix="publish-target-Name" getValueWithoutPrefix="true" singleInstance="true" type="Sitecore.Data.Properties.$(database)PropertyStore, Sitecore.Kernel" >
      <param ref="dataApis/dataApi[@name='$(database)']" param1="$(name)" />
      <param resolve="true" type="Sitecore.Abstractions.BaseEventManager, Sitecore.Kernel" />
      <param resolve="true" type="Sitecore.Abstractions.BaseCacheManager, Sitecore.Kernel" />
    </store>
  </PropertyStoreProvider>
Add the EventpQueueProvider:
  <eventing>
    <eventQueueProvider>
      <eventQueue name="publish-target-Name" type="Sitecore.Data.Eventing.$(database)EventQueue, Sitecore.Kernel">
        <param ref="dataApis/dataApi[@name='$(database)']" param1="$(name)" />
        <param ref="PropertyStoreProvider/store[@name='$(name)']" />
      </eventQueue>
    </eventQueueProvider>
  </eventing>