Documentation Center

Configuring a Microsoft SQL Server database as a content storage and session data storage medium

To make a Microsoft SQL Server database available as a storage medium for content and session data, add two Storage elements to the Storage Layer configuration file.

Procedure

  1. In the configuration directory of the Role, open cd_storage_conf.xml for editing.
  2. In the Storages element, ensure the presence of two <Storage> elements, uncommented, one for the Content Data Store and one for session data storage:
    <Storage Type="persistence" Id="UNIQUE_ID" dialect="MSSQL" 
    	Class="com.tridion.storage.persistence.JPADAOFactory">
    	<Pool Type="jdbc" Size="5" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120" />
    	<DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
    		<Property Name="serverName" Value="SERVER_NAME" />
    		<Property Name="portNumber" Value="1433" />
    		<Property Name="databaseName" Value="DATABASE_NAME" />
    		<Property Name="user" Value="USER_NAME" />
    		<Property Name="password" Value="PASSWORD" />
    	</DataSource>
    </Storage>
    where:
    • UNIQUE_ID is a string of your choosing that uniquely identifies this storage medium
    • SERVER_NAME is the name of the database server host
    • DATABASE_NAME is the name of the database to access
    • USER_NAME is the name of a user who can access the database
    • PASSWORD is a valid password for that user
  3. Ensure the presence of an ItemTypes element with its defaultStorageId attribute set to the ID of the database.
  4. SDL strongly recommends entering any sensitive strings, such as passwords, in encrypted form. You can obtain the encrypted form of a sensitive string by doing the following:
    1. In a command shell, navigate to a location that contains the files cd_core-BUILD.jar and cd_common_util-BUILD.jar, where BUILD is the JAR file's build number. For example, you can find these files on the installation media in the folder Content Delivery\roles\api\rest\java\lib\
    2. Depending on your operating system, enter one of the following commands:
      Windows operating systems
      java -cp cd_core-BUILD.jar;cd_common_util-BUILD.jar com.tridion.crypto.Encrypt INPUT
      Unix operating systems
      java -cp cd_core-BUILD.jar:cd_common_util-BUILD.jar com.tridion.crypto.Encrypt INPUT

      where INPUT is the unencrypted string. (You may wish to redirect output to a file for easy copy-pasting of the tool's response.)

      The tool return the following kind of response:
      SDL Web configuration value = encrypted:9FUJ9CP81Oj63VhnJxcqx//pW3fP4bekeupIexctzcs=

      where the encrypted string is encrypted:9FUJ9CP81Oj63VhnJxcqx//pW3fP4bekeupIexctzcs=

  5. Save and close cd_storage_conf.xml.