You are here

Configuring a SQL Server database

This section describes how to configure a Microsoft SQL Server database for use with Alfresco. To modify the default database configuration, you must edit values in the <ClasspathRoot>\ file.
  1. Install the Microsoft SQL Server database connector. The database connector allows SQL Server database to talk to the Alfresco server.

    This release requires the Microsoft SQL Server JDBC Driver 4.0 for compatibility with the SQL Server database.

    1. Download sqljdbc4.jar from the Microsoft SQL Server download site.
    2. Copy the JDBC driver into the <TOMCAT_HOME>/lib directory.
  2. Increase the available connections setting in the Microsoft SQL Server configuration file.

    Follow these instructions to update the setting: Configuring the user connections option.

  3. Create a database named alfresco.

    Create the database using default collation settings.

  4. Create a user named alfresco.

    This user must have write permissions on all tables and sequences. For example, you can provide these permissions by granting your database user (in this case, the alfresco user) the db_owner role. See Database-Level Roles for more information.

  5. Set the new user's password to alfresco.
  6. Ensure the alfresco user has the required privileges to create and modify tables.

    This can be removed once the server has started, but may be required during upgrades.

  7. Enable snapshot isolation mode with the following command:


  8. Ensure that the TCP connectivity is enabled on the fixed port number 1433.
  9. Open the <classpathRoot>/ file.
  10. Locate the following property:


  11. Edit the line with an absolute path to point to the directory in which you want to store Alfresco data. For example: dir.root=C:/Alfresco/alf_data
  12. Set the database connection properties.
  13. Add the following properties to register the driver and set up the connection:
  14. Save the file.
  15. Restart the Alfresco server.

    If you receive JDBC errors, ensure the location of the SQL Server JDBC drivers are on the system path, or add them to the relevant lib directory of the application server.