How to create an Microsoft SqlServer connection?

About

This howto shows you how to create a connection to an sqlserver database.

Attributes

An sqlserver connection supports :

Example

Here are the attributes of the howto connection

comment: The default sqlserver connection
driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
password: TheSecret1!
uri: jdbc:sqlserver://localhost:1433;encrypt=true;trustServerCertificate=true
user: sa

How to create

You can create an sqlserver connection:

Secret

In this howto, the password is expected to be stored in the MY_MYSQL_PASSWORD OS environment variable but there is more way to provide secrets.

To know how to pass and handle secrets, read more at Secret Value

Configuration Vault

In a Configuration Vault, to define a sqlserver connection with the name sqlserverOne, you would write:

connections:
   sqlserverOne:
     uri: jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks
     # driver is optional
     driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
     user: loginUser
     password: ${MY_MYSQL_PASSWORD}
     natives:
       # https://learn.microsoft.com/en-us/sql/connect/jdbc/setting-the-connection-properties?view=sql-server-ver17#properties
       applicationName: tabulify

Tabul Command

With the tabul add command of the connection module, you can add a sqlserver connection with the name sqlserverConnectionName:

tabul connection add "sqlserverConnectionName" \
    "jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks" \
    --user login \
    --password '${MY_MYSQL_PASSWORD}'

tabul connection add "sqlserverConnectionName" "jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks" ^
    --user login ^
    --password '${MY_MYSQL_PASSWORD}'



Related Pages
SQL Server

Tabulify supports as source and target. It inherits the attributes of the database system. See See Over the upsert operation, SqlServer...

Task Runner