SQL Server

Showed up in a suit. Ready for business.
Lily talks to SQL Server over its own protocol (TDS). No ODBC driver or Microsoft tools need to be installed.
Connecting
| Field | Default | Notes |
|---|---|---|
| Host | localhost | |
| Port | 1433 | |
| Database | Empty connects to master | |
| User | sa | SQL Server authentication |
| Password | Kept in the Keychain |
- Use TLS / SSL encrypts the whole connection, without verifying the certificate. Without it, only the login is encrypted.
- URLs:
sqlserver://andmssql://. - SSH tunnels are supported.
Databases and schemas
The Database menu lists the server's databases; the Schema menu defaults to dbo. Create new databases with a query (CREATE DATABASE …).
Performance
- Trace through the DMVs: Live, recording, Blocks, Top (from
sys.dm_exec_query_stats, totals in CPU time) and kill. Seeing other sessions needsVIEW SERVER STATE. - Visual plan from
SHOWPLAN_XML, without running the query. - Speed up this query and Investigate.
Health Check
The common rules apply.
Limits
- Change with AI is not available on SQL Server.
- A schema must be empty before Lily drops it.
Playground
mcr.microsoft.com/mssql/server:2022-latest on port 11433, user sa, password Lily_Str0ng!. The image is large and the first start takes a while.