SQL Server
Steps and required credentials to connect SQL Server to Squadbase
Required Information
| Field | Description |
|---|---|
| SQL Server JDBC URL | The JDBC connection URL for your SQL Server instance (e.g., jdbc:sqlserver://host:1433;database=mydb;encrypt=true;trustServerCertificate=true). The jdbc: prefix may be omitted (sqlserver://...). |
| Username (Optional) | SQL Server login name. Can be embedded in the JDBC URL via user=.... |
| Password (Optional) | SQL Server password. Can be embedded in the JDBC URL via password=.... |
| SSH Tunnel Host (Optional) | Hostname of the SSH bastion host to tunnel through. Leave empty to connect directly. |
| SSH Tunnel Port (Optional) | SSH port of the bastion host. Defaults to 22. |
| SSH Tunnel Username (Optional) | Username for SSH authentication. Required when SSH Tunnel Host is set. |
| SSH Private Key (Optional) | Private key (PEM, base64-encoded) for SSH authentication. Required when SSH Tunnel Host is set. |
| SSH Private Key Passphrase (Optional) | Passphrase for the SSH private key, if it is encrypted. |
How to Obtain
SQL Server JDBC URL
The connection details (host, port, database name, username, and password) vary depending on your deployment environment. Check your cloud provider's console (e.g., Amazon RDS, Google Cloud SQL) or contact your database administrator.
The JDBC URL follows this format:
jdbc:sqlserver://<host>:<port>;database=<database>;encrypt=true;trustServerCertificate=true| Parameter | Description |
|---|---|
<host> | Hostname or IP address of your SQL Server instance |
<port> | SQL Server port (default: 1433) |
<database> | Name of the database to connect to |
encrypt=true | Enables encrypted connections |
trustServerCertificate=true | Trusts the server's SSL certificate. Use for on-premise instances with self-signed certificates. Set to false if using a trusted CA-signed certificate. |
Example:
jdbc:sqlserver://myserver.example.com:1433;database=mydb;encrypt=true;trustServerCertificate=trueThe jdbc: prefix may be omitted — Squadbase accepts both jdbc:sqlserver://... and sqlserver://....
Username / Password (Optional)
The Username is the SQL Server login name (SQL Server Authentication). The Password is the corresponding password.
Credentials can also be embedded directly in the JDBC URL:
jdbc:sqlserver://host:1433;database=mydb;user=myuser;password=mypassword;encrypt=true;trustServerCertificate=trueIf credentials are embedded in the URL, the Username and Password fields can be left empty.
SSH Tunnel (Optional)
If your SQL Server instance is on a private network and not directly accessible from the internet, you can connect through an SSH bastion host.
| Field | How to obtain |
|---|---|
| SSH Tunnel Host | The public hostname or IP address of the SSH bastion server |
| SSH Tunnel Port | The SSH port of the bastion server (default: 22) |
| SSH Tunnel Username | The username used to authenticate with the bastion server |
| SSH Private Key | The private key (PEM format) corresponding to the authorized public key on the bastion server |
| SSH Private Key Passphrase | The passphrase for the private key, if it is encrypted |