dapr / dapr/components-contrib
SQLServer State Store: Support for local SqlServer installation on Windows
- Dominant language
- Go
- Stars
- 602
- Forks
- 580
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 6
Description
## Expected Behavior
config sqlserver as state store component, state management building block can connect to server and create state table.
## Actual Behavior
Got error:
```log
time="2022-09-30T12:37:16.8284625+08:00" level=fatal msg="process component statestore-sqldb error: failed to create db database: unable to open tcp connection with host 'localhost:1433': dial tcp [::1]:1433: connectex: No connection could be made because the target machine actively refused it." app_id=cgs instance=cn-yoz-x1yoga scope=dapr.runtime type=log ver=1.8.4
```
## Steps to Reproduce the Problem
Create a state component yaml file:
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: statestore-sqldb
spec:
type: state.sqlserver
version: v1
metadata:
- name: connectionString
value: Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=dapr;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False
```
Put this file into componements folder
Run any dapr app locally by `dapr run`, will get above error.
If I change connectionString into
```
Data Source=tcp:innocore-sit2.database.windows.net,1433;Initial Catalog=dapr-state;User Id=;Password=;
```
I also got this error.
## System information
- Windows 11 with wsl2 docker desktop
- CLI version: 1.8.1
- Runtime version: 1.8.4
Contributor guide
Assessment
This issue has not been assessed yet.