I am unable to connect hasura with already existing Microsoft SQL Server database. For testing purpose I have used a local Microsoft SQL Server database with:
- server name:
(LocalDb)\MSSQLLocalDB - user_name: user
- password: pass
I have used the hasura cloud for connecting the existing database.
This is the database url:
Driver={ODBC Driver 18 for SQL Server};Server=tcp (LocalDb)\MSSQLLocalDB,1433;Database=tester;Uid=user;Pwd=password;Encrypt=optional
Error :
[
{
"definition": "Default",
"message": {
"exception": {
"message": "[Microsoft][ODBC Driver 18 for SQL Server]Login timeout expired",
"type": "unsuccessful_return_code"
}
},
"name": "source Default",
"reason": "Inconsistent object: mssql connection error",
"type": "source"
}
]
You could try to create yourself a docker compose file to test locally see if you can connect to a local DB, then set it to connect to remote DB.
Here is a sample Docker-compose file
I know this is using PG but it's pretty much the same process. Then you can change the variable HASURA_GRAPHQL_DATABASE_URL to set your DB credentials and connection