Help › Connect to databases

Connect to SQL Server

What a SQL Server or Azure SQL connection needs, how to sign in, and what is particular to SQL Server in Querlyn.

Querlyn 0.1.0 is not released yet. This help describes it ahead of release.

Querlyn connects to Microsoft SQL Server, Azure SQL Database and Azure SQL Managed Instance.

What you need

  • The server's host name and port (usually 1433).
  • A SQL Server login and its password, or a Microsoft Entra ID account for Azure SQL.
  • Optionally the database to open. Without one you get the login's default database.

Fill in the dialog

  1. Choose File › New Connection… and, under Database engine, SQL Server.
  2. Enter the Host. Port already says 1433.
  3. Enter the Database (optional) and the User.
  4. Enter the Password, or choose another place under Where the password is kept.
  5. Check TLS; see What TLS means on SQL Server.
  6. Choose Test Connection, then Save & Connect.

Named instances

Querlyn does not ask the SQL Server Browser service where a named instance listens. For a server you know as host\INSTANCE, enter the host under Host and the instance's own port under Port.

Sign in

Under AuthenticationUse it for
PasswordSQL Server authentication: a login and its password.
Microsoft Entra IDAzure SQL Database, Azure SQL Managed Instance and Azure Synapse. See Sign in with AWS or Entra ID.

Windows integrated sign-in (Kerberos or NTLM) is not supported.

What TLS means on SQL Server

TLSWhat happens
DisableNothing is encrypted.
PreferEncrypted when the server can; not encrypted only when the server cannot encrypt at all. The certificate is not verified.
Require (no verification)Always encrypted; the certificate is not verified.
Verify fullAlways encrypted, and the certificate and host name are verified.

A server set to accept only strict encryption (TDS 8.0) cannot be connected to yet.

What is particular to SQL Server

  • GO separates batches. When you run a selection or a whole script, Querlyn sends each batch between GO lines as one request. Running the statement at the cursor runs that statement, not its whole batch. GO 5, which repeats a batch, is not supported.
  • Statements without a semicolon run together. T-SQL does not need semicolons, so Querlyn treats lines up to the next ; or GO as one statement. End each statement with ; to run them one at a time.
  • PRINT and RAISERROR messages are listed under Messages.
  • A tab moves between databases. A tab put on another database of the server (in the bar above the editor, or by opening something under that database) moves its session there with USE, keeping its temporary tables and settings; see Choose a tab's connection and database. Azure SQL Database allows no USE: there a tab on another database gets a session of its own in that database, as on PostgreSQL; see Connect to CockroachDB, TiDB and other compatible databases.
  • Read-only is Querlyn's check. SQL Server has no read-only mode for a session, so only Querlyn's check of your statements applies. The dialog says so under the Read-only switch.
  • Server Activity can end a session but not cancel its query. SQL Server has no way to stop another session's statement alone.
  • Backups are made by the server. Querlyn runs BACKUP DATABASE and RESTORE DATABASE, and the file is on the server's disk, not on your computer. See Back up and restore a database.
  • Parameters are written ? or :name. A T-SQL variable such as @total is not a parameter and is never asked for.
  • A lock timeout can be set, but no statement timeout: the server has no such setting for a session.

What Querlyn does not do

  • Windows integrated sign-in, and looking up named instances.
  • Always Encrypted columns.
  • Migration lock warnings (they cover PostgreSQL, MySQL and MariaDB).

Help for Querlyn 0.1.0. All help topics