Connect Bytebase to Microsoft SQL Server, including Availability Groups and encryption.
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.
On a self-managed server, create a login for Bytebase and add it to sysadmin. The examples name the login bytebase.
CREATE LOGIN bytebase WITH PASSWORD = '<password>';ALTER SERVER ROLE sysadmin ADD MEMBER 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:
CREATE LOGIN bytebase WITH PASSWORD = '<password>';-- Repeat in each database that Bytebase manages.USE <database>;CREATE USER bytebase FOR LOGIN bytebase;ALTER ROLE db_owner ADD MEMBER bytebase;
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.
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.
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.
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.