basic MSSQL database configuration

Jump to solution
jasonunf
Community Member

HI,

I'm looking to migrate our CD2 setup from postgres to MSSQL and I'm running into an issue. Does anybody have information on properly setting the DAP for MSSQL server? I'm not finding any information beyond the basic connection string used and i'm getting this error when doing a basic dap init command

 

2025-02-20 15:17:30,660 - INFO - Package versions: {'aiofiles': '24.1.0', 'aiohttp': '3.11.12', 'aiohttp-retry': '2.9.1', 'instructure-dap-client': '1.3.1', 'json_strong_typing': '0.3.6', 'PyJWT': '2.10.1', 'pysqlsync': '0.8.2', 'tsv2py': '0.7.1', 'types-aiofiles': '24.1.0.20241221'}

INFO:pysqlsync.mssql:connecting to sa@localhost:1433/canvasdata

2025-02-20 15:17:30,670 - ERROR - ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)')

 

It looks like i'm supposed to specify an ODBC driver? I've verified that i have version 17 and 18 installed on our Windows Server hosting the DB.

I'm trying to do a basic command like this: dap --base-url https://api-gateway.instructure.com --client-id=client.... --client-secret=secret.... initdb --connection-string mssql://sa:pass@server/canvasdata --namespace canvas --table users

Labels (1)
0 Likes
1 Solution
jasonunf
Community Member
Author

Thank you for all the replies, but as the error message stated, looks like its asking to specify a driver. Adding the ?driver={name of DSN for the sql server driver that was created} in the connection string solved my issue. 

here's my connection string:

"mssql://{username}:{password}@{ipaddress}/{databasename}?driver={name of DSN for the sql server driver that was created}"

View solution in original post

0 Likes