diff --git a/source/_integrations/recorder.markdown b/source/_integrations/recorder.markdown index 49dc1f0f059..97ce6591b59 100644 --- a/source/_integrations/recorder.markdown +++ b/source/_integrations/recorder.markdown @@ -241,7 +241,7 @@ The following database engines are tested when major changes are made to the rec | PostgreSQL | `postgresql://user:password@SERVER_IP/DB_NAME` | | PostgreSQL (Socket) | `postgresql://@/DB_NAME` | | PostgreSQL (Custom socket dir) | `postgresql://@/DB_NAME?host=/path/to/dir` | -| MS SQL Server | `mssql+pyodbc://username:password@SERVER_IP/DB_NAME?charset=utf8;DRIVER={DRIVER};Port=1433;` | +| MS SQL Server | `mssql+pyodbc://username:password@SERVER_IP:1433/DB_NAME?charset=utf8&driver=DRIVER` |
@@ -392,6 +392,6 @@ You will also need to install an ODBC Driver. Microsoft ODBC drivers are recomme
-If you are using Hass.io, FreeTDS is already installed for you. The db_url you need to use is `mssql+pyodbc://username:password@SERVER_IP/DB_NAME?charset=utf8mb4;DRIVER={FreeTDS};Port=1433;`. +If you are using Hass.io, FreeTDS is already installed for you. The db_url you need to use is `mssql+pyodbc://username:password@SERVER_IP:1433/DB_NAME?charset=utf8mb4&driver=FreeTDS`.
diff --git a/source/_integrations/sql.markdown b/source/_integrations/sql.markdown index 042ba435d4b..4b66572a94f 100644 --- a/source/_integrations/sql.markdown +++ b/source/_integrations/sql.markdown @@ -176,7 +176,7 @@ Use the same `db_url` as for the `recorder` integration. Change `DB_NAME` to the ```yaml sensor: - platform: sql - db_url: "mssql+pyodbc://username:password@SERVER_IP/DB_NAME?charset=utf8;DRIVER={FreeTDS};Port=1433;" + db_url: "mssql+pyodbc://username:password@SERVER_IP:1433/DB_NAME?charset=utf8&driver=FreeTDS" queries: - name: DB size query: "SELECT TOP 1 SUM(m.size) * 8 / 1024 as size FROM sys.master_files m INNER JOIN sys.databases d ON d.database_id=m.database_id WHERE d.name='DB_NAME';"