Sitecore Azureモジュール3.0以降では、Microsoft Azure SQL Databasesサービスが自動的に作成され、デプロイメント中に、デフォルトのSitecore Core、MasterおよびWebデータベースがデプロイされます。
一方で、このモジュールは他のFarmからの既存のデータベースを使用することもできます。これは例えば、一つのデータベースをEditingとDeliveryのFarmで共有する場合などに便利です。
この記事では、Sitecore Azureモジュールを使用して、Farm間でデータベースを手動で共有するのに使用できるテクニックの一覧を掲載します。
Sitecore AzureのFarm間でデータベースを共有する際に推奨される方法は次のとおりです。
- Sitecoreクライアントにログインし、Sitecore Azureアプリケーションを開きます。
- StagingもしくはProductionスロットのいずれかを選択し、EditingまたはDelivery Farmを追加するデータ センターをクリックします。

- New Deploymentダイアログにて、More Optionsボタンをクリックします。Azure Deploymentアイテムが事前選択されたContent Editorが表示されます。

- /sitecore/system/Modules/Azure/<Environment>/<Location>/<Farm>/<WebRole>/<Azure Deployment>/Database Referencesアイテムを選択します。

- /sitecore/templates/Azure/Databases/Database Referenceテンプレートをベースにし、アイテム名をwfmにして、新しいアイテムを挿入します。

重要:アイテム名は、接続文字列の名前と一致している必要があります。
註:例えば、\App_Config\ConnectionStrings.configファイルに含まれるSitecore Web Forms for Marketersデータベースへの接続文字列は以下の通りです:
<connectionStrings>
...
<add name="wfm" connectionString="Data Source=.\SQLEXPRESS2014;Initial Catalog=Sitecore_WFM;Integrated Security=False;User ID=sa;Password=12345" />
...
</connectionStrings>
- wfmアイテムのDatabase Idフィールドに、/Sitecore/system/Modules/Azure/<Environment>/<Location>/<Farm>/Sql01/Set01アイテム配下の既存のAzure SQL Databaseアイテムのパスを入力します。

- 変更を保存して、Content Editorアプリケーションを閉じます。
- Sitecoreのアプリケーション プールをリサイクルするか、Internet Information Services (IIS)をリセットします。
- Sitecore Azureアプリケーションを開き、デプロイメントを再開します。

- New Deploymentダイアログで、Start Deploymentボタンをクリックします。
