See this page of the documentation: https://world.mendix.com/display/refguide4/Configuration
Go to project settings / configuration / Edit. The tab database gives you the option to specify which database to use.
I did this changes to configure the database but this is only working for local , do we have to do anything for runtime ?
You can connect azureSQL, not sure about ms sql:
What cloud are you deploying to? The mendix cloud only supports PostgreSQL. If you want to use sql-server you have to install on-prem on a windows server. You can use the mendix service console to configure your application to use sql-server. For more info see: https://docs.mendix.com/developerportal/deploy/deploy-mendix-on-microsoft-windows