# Need help with MSSQL JDBC connectionstring

**URL:** <https://forum.keycloak.org/t/need-help-with-mssql-jdbc-connectionstring/18698>\
**Category:** Configuring the server\
**Created:** [November 30, 2022, 9:57am UTC](https://forum.keycloak.org/t/need-help-with-mssql-jdbc-connectionstring/18698 "2022-11-30T09:57:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Snadder](https://avatars.discourse-cdn.com/v4/letter/s/eb8c5e/32.png) [@Snadder](https://forum.keycloak.org/u/Snadder)\
**Post date:** [November 30, 2022, 9:57am UTC](https://forum.keycloak.org/t/need-help-with-mssql-jdbc-connectionstring/18698/1 "2022-11-30T09:57:55Z")

</div>

Hi,  
Can someone please help me solve my problem with getting MS Sql server to work as backend for keycloak, using the [Quay](http://quay.io/keycloak/keycloak) docker image?

It works fine when trying with postgres, both locally and in azure.

This command below works fine with postgres backend, but no when i try with mssql.

```auto
docker run -p 8080:8080 --name kcsql -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin -e KC_DB=mssql -e KC_DB_URL=jdbc:sqlserver://mysql.database.windows.net:1433;database=keycloak -e KC_DB_USERNAME=keycloak -e KC_DB_PASSWORD=password quay.io/keycloak/keycloak:latest start-dev

```

I think I could solve it if someone could provide me the connection string for mssql found in:

> /admin/master/console/#/master/providers

and under “connectionsJpa” you will find the connectionstring. If anyone can give me a clue to how this one looks like, it will be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![redarccoder](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/redarccoder/32/5243_2.png) [@redarccoder](https://forum.keycloak.org/u/redarccoder)\
**Post date:** [January 16, 2023, 7:57pm UTC](https://forum.keycloak.org/t/need-help-with-mssql-jdbc-connectionstring/18698/2 "2023-01-16T19:57:25Z")

</div>

Tutorial by me:

> [@How to setup Keycloak 20+ and MS-SQL Server](http://forum.keycloak.org/t/how-to-setup-keycloak-20-and-ms-sql-server/19351):
>
> Configuring Keycloak 20 with MS-SQL Server Hello everyone, I decided to create this post because I just got somewhat tired while trying to create a Keycloak 20.0.2 instance with --a recent-- SQL Server as a Backed using docker, so, before I get to tell you my life history, this is the --somewhat-- complete list of steps that you need to perform for this to work: 1 You need to create a certificate for a FQDN for your sql server instance ([mssql.mydomain.com](http://mssql.mydomain.com)) or a wildcard certificate (\*.mydomain…
