/\  Semaphor

Microsoft SQL Server

Connect Semaphor to your Microsoft SQL Server database

Connecting to Microsoft SQL Server

To connect Semaphor to your Microsoft SQL Server database, you need to use a connection string in the following format:

Connection String Format

Connection String
mssql+pyodbc://username:password@server:port/db?ApplicationIntent=ReadOnly&driver=ODBC+Driver+17+for+SQL+Server
  • username – Your database username.
  • password – The password for the specified user.
  • server – The hostname or IP address of your Microsoft SQL Server.
  • port – The port on which Microsoft SQL Server is running (default: 1433).
  • db – The name of the database you want to connect to.

Example Connection String

If your database username is admin, password is mypassword, hosted on db.example.com using the default Microsoft SQL Server port (1433), and the database name is analytics_db, your connection string would be:

Connection String
mssql+pyodbc://admin:mypassword@db.example.com:1433/analytics_db?ApplicationIntent=ReadOnly&driver=ODBC+Driver+17+for+SQL+Server

Prerequisites

To successfully connect Semaphor to your Microsoft SQL Server database, ensure the following requirements are met:

Database Permissions

  • The user account must have read-only access to the required database.
  • The user must have the ability to create session-specific temp tables.

Network Access

  • If your database is private, whitelist the Semaphor IP: 44.199.53.142 to allow connections.
  • Ensure that firewall rules and security group settings permit network access for Semaphor.

Troubleshooting

If you encounter issues connecting to Microsoft SQL Server, consider the following:

  • Invalid Credentials: Verify your username and password.
  • Network Restrictions: Ensure your firewall or security group allows connections to the Microsoft SQL Server server.
  • Incorrect Connection String: Double-check the format of your connection string.
  • Database Permissions: Ensure your user has the required privileges to access the database.

On this page