mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 08:16:53 +00:00
SQL add text on pyodbc for MSSQL (#24748)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
54ba22457e
commit
596c8432b5
@ -95,6 +95,12 @@ Use the same Database URL as for the `recorder` integration. Change `DB_NAME` to
|
||||
|
||||
Example Database URL: `"mssql+pyodbc://username:password@SERVER_IP:1433/DB_NAME?charset=utf8&driver=FreeTDS"`
|
||||
|
||||
<div class='note info'>
|
||||
Connecting with MSSQL requires "pyodbc" to be installed on your system, which can only be done on systems using the Home Assistant Core installation type to be able to install the necessary dependencies.
|
||||
|
||||
"pyodbc" has special requirements which need to be pre-installed before installation, see the ["pyodbc" wiki](https://github.com/mkleehammer/pyodbc/wiki/Install) for installation instructions
|
||||
</div>
|
||||
|
||||
```sql
|
||||
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';
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user