Skip to main content

Microsoft SQL Server Connections

TablePro connects to SQL Server 2017 and later via FreeTDS. This covers instances on Windows, Linux, Docker, and Azure SQL Database.
FreeTDS must be built before connecting to SQL Server. Run scripts/build-freetds.sh once to compile the required library.

Quick Setup

Run scripts/build-freetds.sh first. Click New Connection, select SQL Server, enter host/port/credentials/database, and click Create.

Connection Settings

Example Configurations

Local: host localhost:1433, user sa, database master Docker: mcr.microsoft.com/mssql/server:2022-latest, env ACCEPT_EULA=Y, SA_PASSWORD must have uppercase/lowercase/digits/symbols Remote: Standard credentials Azure SQL: Host server.database.windows.net, user may need user@servername suffix

Connection URL

See Connection URL Reference for all parameters.

Features

Schema Selection: Default schema is dbo. Switch with Cmd+K. Shows accessible schemas and tables. Table Info: Columns (types, nullability, defaults), indexes (clustered/non-clustered), foreign keys, DDL with constraints. Query Editor (T-SQL, pagination with OFFSET/FETCH):
Schema Editing (T-SQL with bracket notation): ALTER TABLE [dbo].[users] ADD [col] TYPE; EXEC sp_rename 'dbo.table.old', 'new', 'COLUMN'; DROP COLUMN [field]; CREATE INDEX [IX_name] ON [dbo].[table] ([col]); Foreign Keys: Displayed in structure. Manual query: SELECT fk.name FROM sys.foreign_keys fk... Authentication: SQL Server Authentication only (username/password). No Windows Auth. Create login: CREATE LOGIN user WITH PASSWORD = 'StrongPassword1!'; CREATE USER user FOR LOGIN user; ALTER ROLE db_datareader ADD MEMBER user;

SSL/TLS

TablePro maps the SSL/TLS pane to FreeTDS DBSETENCRYPT. FreeTDS dblib accepts four encryption strings; verification beyond the system trust store is configured in freetds.conf, not per connection. For Azure SQL Database, pick Required or stricter. For SQL Server 2017+ on a self-signed cert, the system trust store will reject the handshake. To skip verification per connection, override via freetds.conf (tds_check_certificate = no under the relevant section) or import the server certificate into the macOS keychain.

Troubleshooting

Connection refused: Enable TCP/IP in SQL Server Configuration Manager, verify SQL Server service running, check firewall port 1433, ensure Docker started. Login failed: Verify credentials, check mixed-mode authentication enabled: SELECT SERVERPROPERTY('IsIntegratedSecurityOnly'); Set to 2 for mixed mode. If the login only has access to one database (an Azure SQL contained user), set the Database field. TablePro sends it during login; without it the server authenticates against master and rejects the login. FreeTDS not found: Run scripts/build-freetds.sh to compile and place library. Limitations: SQL Server Auth only, no Windows Auth, named instances unsupported (use IP:port), NTEXT/TEXT/IMAGE deprecated (use *MAX types).