Current database reverts to startup database after a short time passes
sql-cli version 0.61 (current) OS: macOS El Capitan 10.11.6 and Windows 10 x64
Steps to reproduce startup mssql without specifying a database use a different database run .tables run some queries do nothing for about a minute re-run the last query You'll get Error: Invalid object name [whatever table is in the query] It has reverted to master
quit out of sql-cli startup again this time specify a database that is NOT master (I have one called juliedb, so: mssql -s server -p password -d juliedb run .tables, I see the correct tables use master run .tables I see master's tables query one of those tables do nothing for about a minute re-run last query you'll get ERROR: Invalid object again run .tables you'll see that it is now using the original database again ...in my case, juliedb
This has been reproduced by others: https://github.com/Microsoft/mssql-docker/issues/86
Thanks. Also LOVE sql-cli . Great UX
I have observed this issue as well. Env: Ubuntu 16.04.
That said, I also love sql-cli, great tool!
I should probably issue a no-op query periodically to keep the connection alive
WAITFOR DELAY '0:0';