Search code examples
wso2wso2-api-managerwso2-enterprise-integrator

Exposing a MS SQL database as a service in wso2 integration studio


I followed the tutorial link which uses mysql given below to and it worked without any issues.

https://apim.docs.wso2.com/en/latest/tutorials/integration-tutorials/sending-a-simple-message-to-a-datasource/

Now I want to connect to a database in sql server. Preferably the database "ExersizesData" which is in the database server "DESKTOP-ITFNIJS\SQLEXPRESS".

See Here

I cannot understand how to construct the URL for connecting to this database.

see here

When I try to use it like this (see the screenshot below). It gives connection failed. Could not connect to the database error.

see here1 see here2

Please help me resolve this issue. Appreciate any help. Thank you in advance.


Solution

  • I think the issue is when connecting to SQL Express. SQL Express runs as a separate instance. For example, the Connection String value should have - [SERVER_NAME\SQLEXPRESS] format.

    Try using instance=SQLEXPRESS after //localhost:1433 in your URL. For example, //localhost:1433;instance=SQLEXPRESS