FillDB.aspx

In version 7 Sitecore introduced the FillDB.aspx, which allows you to create a huge amount of content items (for performance testing) based on several parameters specified in the FillDB.aspx.

In Sitecore version 7.2 the FillDB.aspx has been reworked. Besides that FillDB.aspx now uses a web.config setting to enabled the tool (which gives you the advantages of managing the tool differently from different environments), each step in the tool is now optional and lets the user specify the parameters for the steps. Also, from version 7.2 the FillDB.aspx handles POST request.

Following is a walkthrough of the FillDB.aspx from Sitecore version 7.2. You find the tool by navigate to /sitecore/admin/FillDB.aspx. By default, the tool is disabled due to the config setting "EnableFillDB":


The config setting for enabling the tool is located in the Sitecore.Bucket.config (located at “App_Config/Include”). You can change the value of the setting named “EnableFillDB” from “false” to “true” directly into this include file, or you can add the setting into a specific include file for the development environment (doing so, just make sure, your own include file will be rendered after the Sitecore.Bucket.config):

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <settings>
      <!-- Enable FillDB Page
           This setting enables or disables the /sitecore/admin/filldb.aspx page. Always disable this page in production environments.
           You can use the FillDB page to insert large amounts of test content into Sitecore to test facets, new search types, as well as
           the performance and scalability of indexing and search in your solution.
           Default value: false
      -->
      <setting name="EnableFillDB" value="true" />
    </settings>
  </sitecore>
</configuration>

Reloading the /Sitecore/admin/FillDB.aspx and the tool is ready to use.

The FillDB.aspx is divided into the two sections “Key Settings” and “Steps”, respectively.

The "Key Settings" section




The “Database Name” field specify the “context” database, from where the items will be created. If you want to create items into different databases, run the tool for each database specified in this field. 

The “Words Directory” field specify the location, where the FillDB.aspx tool will place the word files, which will be used to fill content into the created items. This will be explained below.

The "Steps" section

This section consist of six steps. The first three steps (“Prepare database”, “Prepare words directory” and “Download word files”) prepare the solution for filling the database with items. These steps only need to run once. The last three steps (“Clear site caches”, “Generate Items” and “Rebuild index”) should be run, whenever using the tool for creating items.

The first step:



This step runs the ItemGenerator.sql. The ItemGenerator.sql creates to stored procedures into the specified database (in the “Key Settings” section) “AppendVersionedFields” and “AppendItems”, respectively. The stored procedures prepares the tool to insert items into the tables “VersionedFields” and “Items” respectively. 

The second step:


This step creates the directory specified in the “Word directory” field from the “Key Settings”. 

The third step:


In this step you specify from where to get the text files, used to fill values into the created items. The text files will be placed into the “Word directory”. 

The fourth step:


This step clear all defined sites caches.

The fifth step:
This step creates the items based on the six values specified in this step. Notice, the tool allows you to prefix the items created. 


The sixth (and last) step:

In this step, you can specify the indexes, which should be rebuild. By specifying item GUIDs in the “Index roots” field, the FillDB.aspx allows you to specify the root item(s) from where the index will be rebuild along with the root items descendants. 

As stated above, the first three steps need to run the first time. Afterwards, you only need to run the last three steps (step 4 to 6).

When the tool has finished running, some data about the run will provide at the top of the tool:



Navigation to the Content Editor, and verify the items created. Notice, the tool creates the items in a new folder created under the specified parent item specified in step five “Generate items”:


In Sitecore version 8 the FillDB.aspx is equal to the one reworked in Sitecore version 7.2. No changes had been made.



No comments: