You can configure a Microsoft SQL Server database for use with Content Services. To modify the default database configuration, you must edit values in the <classpathRoot>/alfresco-global.properties file.
-
Install the Microsoft SQL Server database connector to allow the database to talk to the Content Services server.
Check the Supported Platforms page for the correct driver version.
- Download the database connector from the Microsoft SQL Server download site .
- Copy the JDBC file into the /lib directory.
-
Increase the available connections setting in the Microsoft SQL Server configuration file.
Follow the instructions in Configuring the user connections option to update the setting.
-
Create a database named alfresco.
Create the database using default collation settings.
-
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.
- Set the new user's password to alfresco.
-
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.
-
Enable snapshot isolation mode with the following command:
ALTER DATABASE alfresco SET ALLOW_SNAPSHOT_ISOLATION ON;
- Ensure that the TCP connectivity is enabled on the fixed port number 1433.
- Open the <classpathRoot>/alfresco-global.properties.sample file.
- Locate the property: dir.root=
-
Edit the line with an absolute path to point to the directory in which you want to store Content Services data.
dir.root=C:/Alfresco/alf_data
-
Set the database connection properties:
db.name=alfresco db.username=alfresco db.password=alfresco db.host=localhost db.port=1433 db.pool.max=275
-
Add the following properties to register the driver and set up the connection:
db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver db.url=jdbc:sqlserver://${db.host}:${db.port};databaseName=${db.name};lockTimeout=1000; db.txn.isolation=4096
- Save the file without the .sample extension.
-
Restart the Content Services 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.