Yes, I have two instances of SQL Server running. I stopped one of them, just to see if that would help. It didn’t. My setup is on Windows 10, VritualBox, here’s the details:
System Health
arch |
x86_64 |
chassis |
vm |
dev |
false |
docker |
true |
docker_version |
19.03.11 |
hassio |
true |
host_os |
HassOS 4.14 |
installation_type |
Home Assistant OS |
os_name |
Linux |
os_version |
5.4.69 |
python_version |
3.8.6 |
supervisor |
2020.11.0 |
timezone |
America/Los_Angeles |
version |
0.117.5 |
virtualenv |
false |
Lovelace
dashboards |
1 |
mode |
storage |
resources |
0 |
views |
4 |
In SQL Server, I setup a new database “HomeAssistant”, and a new user “ha”, giving that user permissions for the new database. My SQL has the remote access checkbox checked.
My problem has been that in just 30 or 40 days, my database has gotten to 30GB, and I cannot purge it. I start a purge, and watch the files, I see those two temporary file created and the one grows up to about 2GB or so (differs each time), then that stops for several minutes, then next thing I know the two temp files disappear, and start flashing off and on the screen as they are created and deleted (same normal activity I see when not doing a purge). I ended up deleting my db, and let it be recreated last night. I’m trying to use the exclude in recorder to not log as much data.
Since I have SQL Server running already, and one person said that it would be faster than SQLLite, I decided to try that. Plus I’d be in full control of the SQL Server, able to do whatever I wanted.
Anyway, in recorder, I have my SQL Server I’m trying to switch to:
db_url: mssql+pyodbc://ha:[email protected]/HomeAssistant?charset=utf8;DRIVER={FreeTDS};Port=1433;
I did not do any special setup, in the recorder docs, those 5 lines they say to run don’t work. They are supposed to “install a few dependancies” and pyodbc. There is no “sudo” command. So I am assuming that stuff may already be installed on my HassOS? BTW: Port 1433 is open on my firewall.
Under SQL server logs, I see no attempt, not reached there. Under the HA logs, I see the following:
2020-11-13 09:26:59 WARNING (MainThread) [homeassistant.setup] Setup of recorder is taking over 10 seconds.
2020-11-13 09:27:49 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-11-13 09:28:49 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-11-13 09:29:49 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-11-13 09:30:49 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: recorder
2020-11-13 09:31:10 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (pyodbc.OperationalError) (‘08S01’, ‘[08S01] [FreeTDS][SQL Server]Unable to connect: Adaptive Server is unavailable or does not exist (20009) (SQLDriverConnect)’)
(Background on this error at: http://sqlalche.me/e/13/e3q8) (retrying in 3 seconds)
Let me know if you have any ideas, thanks in advance!