Search code examples
mulemule-studiomule-elmule-componentmule-module-jpa

Connecting MS SQL Server with mule


I am working in a mule application and I am new in mule application development. In my application, how can I connect to MS Sql server. I have tried Database connector but it is not having Connection configuration for SQL Server.

Thanks.


Solution

  • I'm using SQLserver express 2012. - Download the sqljdbc41.jar file from microsoft sqljdbc41.jar - Put the jar file into the Anypoint Studio Plugin directory (e.g C:\Program Files (x86)\AnypointStudio\plugins) - Using SQL configuration manager, goto SQL Server Network Configuration --> Protocols for SQLEXPRESS and enable TCP/IP protocol

    In AnyPoint studio (I'm using v5.1 March 2015), select the Database connector. In the General Tab --> Basic Settings, edit the connector configuration.

    set the Datbase URL:

    jdbc:sqlserver://localhost\SQLEXPRESS;database=your_database;user=your_dbuser;password=your_dbPassword

    set the Driver Class to

    com.microsoft.sqlserver.jdbc.SQLServerDriver

    and press "Test Connection"