> For the complete documentation index, see [llms.txt](https://help.auxalia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.auxalia.com/plant-tools/planttools-support/plantdatamanager/permissions-for-sql-server.md).

# Permissions for SQL Server

This chapter describes the setting of Permissions for SQL-Server Users When Using PlantDataManager.

### <mark style="color:blue;">Introduction</mark>

In this blog, we will explain the permissions required for SQL-Server users when using PlantDataManager. This information is aimed at technical users and administrators responsible for managing and configuring SQL-Server environments.

If the necessary permissions are not set correctly, users will receive an error message similar to the following when attempting to make changes in PlantDataManager:

![](/files/VCRvWzjvXN9zTJuJxNGE)

### <mark style="color:blue;">Overview of Permissions</mark>

For the standard use of PlantDataManager (PDM) by standard users with the server role `public`, editing and importing data are possible without issues. However, the initial setup requires special permissions.

### <mark style="color:blue;">Initial Setup</mark>

Since version 7.3.0.3767 of PlantDataManager for SQL-Server projects, individual databases are created for each user. This means that a database in the format `PDMDataCache\_Username` is created for each user.

To create these databases, the user using PlantDataManager must have the server role `dbcreator`. This role allows the user to create new databases on the SQL-Server.

![](/files/PlLjGE3Yt3ZWIAhyZvGF)

### <mark style="color:blue;">Ongoing Operations</mark>

Once the database for the user is created, the `dbcreator` server role can be removed if desired for security reasons. The created database will then only be filled with content or emptied (e.g., after an import). For ongoing operations, only read and write permissions are required.

### <mark style="color:blue;">Technical Background</mark>

The approach of creating an individual database for each user increases data security and simplifies handling and consistency for PlantTools between collaboration projects and network projects. A reference file (PDMDataCache\_Username.dcf) is created in the project folder, and a corresponding database is created on the SQL-Server. This process requires that the user can create a database themselves.

### <mark style="color:blue;">Quick Guide: Setting Temporary Permissions via SSMS</mark>

Below is a step-by-step guide on how to temporarily set permissions via SQL-Server Management Studio (SSMS) so that the user can make changes in PlantDataManager, and how to remove these permissions afterward.

### <mark style="color:blue;">Step 1: Connect to SQL-Server</mark>

1.Open SQL-Server Management Studio (SSMS).

2.Connect to your SQL-Server.

### <mark style="color:blue;">Step 2: Set the</mark> <mark style="color:blue;">`dbcreator`</mark> <mark style="color:blue;">Server Role</mark>

1.In the Object Explorer, navigate to \*\*Security > Logins\*\*.

2.Select the relevant user, right-click on it, and choose \*\*Properties\*\*.

3.Go to \*\*Server Roles\*\*.

4.Check the `dbcreator` role and click \*\*OK\*\*.

### <mark style="color:blue;">Step 3: Perform User Changes in PlantDataManager</mark>

1.Allow the user to make and save changes in PlantDataManager. These changes can then be deleted again. This will create the `PDMDataCache\_Username` database.

### <mark style="color:blue;">Step 4: Remove the</mark> <mark style="color:blue;">`dbcreator`</mark> <mark style="color:blue;">Server Role</mark>

1.Navigate again to \*\*Security > Logins\*\*.

2.Select the user, right-click on it, and choose \*\*Properties\*\*.

3.Go to \*\*Server Roles\*\*.

4.Uncheck the `dbcreator` role and click \*\*OK\*\*.

### <mark style="color:blue;">Conclusion</mark>

Setting up the correct permissions for SQL-Server users when using PlantDataManager is crucial for smooth operation and data security in your projects. By following the steps outlined above, you ensure that the necessary databases can be created without permanently granting unnecessary permissions.
