SQL Server
To setup SQL Server state store create a component of type . See on how to create and apply a state store configuration.
Warning
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described .
- name: actorStateStore
value: "true"
Follow the instructions from the Azure documentation on how to create a SQL database. The database must be created before Dapr consumes it.
Note: SQL Server state store also supports SQL Server running on VMs and in Docker.
- Connection String: The SQL Server connection string. For example: server=localhost;user id=sa;password=your-password;port=1433;database=mydatabase;
- Schema: The database schema to use (default=dbo). Will be created if does not exist
- Table Name: The database table name. Will be created if does not exist
When connecting with a dedicated user (not sa
), these authorizations are required for the user - even when the user is owner of the desired database schema:
CREATE TYPE
- Read this guide for instructions on configuring state store components