# How to configure a MSSQL database as a datasource

**URL:** <https://discourse.greatexpectations.io/t/how-to-configure-a-mssql-database-as-a-datasource/295>\
**Category:** Archive\
**Tags:** how-to\
**Created:** [July 30, 2020, 9:14pm UTC](https://discourse.greatexpectations.io/t/how-to-configure-a-mssql-database-as-a-datasource/295 "2020-07-30T21:14:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpcampbell42](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@jpcampbell42](https://discourse.greatexpectations.io/u/jpcampbell42)\
**Post date:** [July 30, 2020, 9:14pm UTC](https://discourse.greatexpectations.io/t/how-to-configure-a-mssql-database-as-a-datasource/295/1 "2020-07-30T21:14:08Z")

</div>

This guide is a space to discuss using Microsoft SQL Server (T-SQL, Transact SQL, MSSQL) with Great Expectations.

---

<div class="post-metadata">

**Author:** ![aunderwood](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@aunderwood](https://discourse.greatexpectations.io/u/aunderwood)\
**Post date:** [December 2, 2020, 8:20pm UTC](https://discourse.greatexpectations.io/t/how-to-configure-a-mssql-database-as-a-datasource/295/2 "2020-12-02T20:20:05Z")

</div>

Incase anyone else runs into this: on mac while connecting to a local mssql server running on docker, I ended up needing to have my driver in the x+x+x+x format. Otherwise it would break the string in half.  
mssql+pyodbc://username:password@127.0.0.1/ge-demo?driver=ODBC+Driver+17+for+SQL+Server&charset=utf&autocommit=true

---

<div class="post-metadata">

**Author:** ![somayah.unique](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@somayah.unique](https://discourse.greatexpectations.io/u/somayah.unique)\
**Post date:** [November 27, 2022, 12:01pm UTC](https://discourse.greatexpectations.io/t/how-to-configure-a-mssql-database-as-a-datasource/295/3 "2022-11-27T12:01:54Z")

</div>

> [@jpcampbell42](#):
>
> This guide is a space to discuss using Microsoft SQL Server (T-SQL, Transact SQL, MSSQL) with Great Expectations.

Where can I find the guide ?

---

<div class="post-metadata">

**Author:** ![somayah.unique](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@somayah.unique](https://discourse.greatexpectations.io/u/somayah.unique)\
**Post date:** [November 27, 2022, 12:03pm UTC](https://discourse.greatexpectations.io/t/how-to-configure-a-mssql-database-as-a-datasource/295/4 "2022-11-27T12:03:32Z")

</div>

I couldn’t connect to my MSSQL database what should I do?
