To add a SQL Server database, go to Instances, click Connect instance, and choose MSSQL.
Bytebase lists every database on the server except master, model, msdb, and tempdb as a Bytebase database. On Amazon RDS, it also skips rdscore. See Database.
Supported versions
Bytebase supports Microsoft SQL Server 2019 and later. It connects through a built-in driver, so there is nothing to install.
Create a user for Bytebase
On a self-managed server, create a login for Bytebase and add it to sysadmin. The examples name the login bytebase.
On Amazon RDS for SQL Server, the master user isn’t a member of sysadmin and can’t add other logins to it. Create the login as the master user instead, and make it db_owner in each database Bytebase manages:
Connection details
Authentication
How Bytebase signs in:
- Plain Password: the Username and Password below.
- Azure IAM: a Microsoft Entra identity, for Azure SQL. See Azure.
Hostname
The host name or IP address of the SQL Server instance, such as db.example.com. For an Availability Group, use the listener, as described in Availability Groups.
Port
The server port. SQL Server’s default is 1433.
Username
The SQL Server login Bytebase connects as.
Password
The login’s password. You can also read it from a secret manager.
Connection database
The database Bytebase connects to when it isn’t working in a specific database, such as when it tests the connection or lists databases. If you leave it empty, SQL Server uses the login’s default database.
TLS
Bytebase doesn’t verify the SQL Server certificate yet. It trusts whatever certificate the server presents, the same as TrustServerCertificate=true, and the TLS settings in the form don’t change that. This is a known issue, and a fix is in progress.
By default, only the login is encrypted. To encrypt the whole session, add encrypt with the value true under Extra Parameters, or have the server force encryption. In both cases the session is encrypted, but the server’s identity isn’t checked. Client certificates aren’t available for SQL Server.
Options that Bytebase passes to the driver as key-value pairs, using the driver’s parameter names such as encrypt, multisubnetfailover, and applicationintent. Bytebase sets TrustServerCertificate itself, so adding it here fails.
Availability Groups
Set Hostname to the Availability Group listener, not a server name. The listener follows the primary across failovers. Bytebase syncs every database on the server behind the listener, including secondaries of other Availability Groups, so use Sync Databases to limit the instance to this group’s databases.
Under Extra Parameters, add multisubnetfailover with the value true if the group spans subnets. To serve reads from a readable secondary, add applicationintent with the value ReadOnly on the read-only connection.
Troubleshooting
Test Connection shows the error from the server or the driver:
Read-only connection
A read-only connection has its own Extra Parameters. Set encrypt there too if the read-only connection should be encrypted.