DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Data Engineering
  3. Databases
  4. Connecting the MMC With the MS-SQL Database

Connecting the MMC With the MS-SQL Database

Read this article to find out how easy it can be to configure the MMC application with an external MS-SQL server database.

Anirban Sen Chowdhary user avatar by
Anirban Sen Chowdhary
·
Nov. 01, 16 · Tutorial
Like (2)
Save
Tweet
Share
3.42K Views

Join the DZone community and get the full member experience.

Join For Free

Mule Management Console, or MMC, is a centralized management and monitoring function for all of our on-premise Mule ESB enterprise deployments. That includes running as a standalone instance, as a cluster, or embedded in application servers.

MMC as an enterprise management and monitoring tool is designed specifically for Mule on-premises instances. It provides all the functionality for managing, monitoring, and running Mule on-premises servers, Mule clusters, deployed applications within Mule servers, and the flows within those applications. Another important feature is that it also provides ways of looking at specific transactions through pre-defined business events, as well as transactions in flight.

MMC by default supports internal derby databases to persist environment and transaction data. If we start our MMC application under the Apache Tomcat server, we can see under the bin folder is a folder named mmc-data that is created where it stores all the MMC-related data to support all the MMC functionalities:

Image title

If we enter into that folder, we will see the derby database is created with all other folders:

Image title

MC versions 3.4.2 and later support the external database, which means that we can connect to any external remote database instead of using our default internal derby database. It is very easy to connect our MMC with an external database and in this post we are going to demonstrate this in five simple steps.

Currently, it can be connected with any of the following databases other than derby:

  • MySQL
  • Oracle
  • MS-SQL Server
  • PostgreSQL

Externalizing With the MS-SQL Server

We will see here how to connect our MMC with external MS-SQL Server.

Before we start, we should delete the mmc-data folder from <MMC_HOME> /bin folder path after taking a backup.

<MMC_HOME> is the directory where MMC is installed.

Step 1

The first step is simple. Since we are connecting our MMC with the MS-SQL Server, we need the driver and copy it into the <Mule install path>/apps/mmc/webapps/mmc/WEB-INF/lib folder:

Image title

Step 2

In the folder <MMC_HOME>/WEB-INF, we need to configure our web.xml. By default, in the spring.profiles.active section, we will see the parameter string as env-derby, which is pointing for default derby configuration:

Image title

We need to replace it with env-mssql as follows:

Image title

We also need to delete the string tracking-h2 and replace it with tracking-mssql to Persist Transaction Data to MS-SQL Server.

Step 3

We will be creating a database called MMC_DB_3.8 in our MS-SQL Server that will be connected to our MMC:

Image title

Step 4

In the directory <MMC_HOME>/WEB-INF/classes/META-INF/databases, we need to locate the file mmc-mssql.properties and do the editing for env.username, env.password, env.host, env.port and env.dbschema:

Image title

Step 5

The final stage will be in directory <MMC_HOME>/WEB-INF/classes/quartz. There is an .sql file called tables_sqlServer.sql; we execute that in SQL DB server:

Image title

This will create the required tables in our database.

That’s it! We are done.

If we start our Apache Tomcat server and browse the MMC portal in a browser, we will see the application has started successfully:

Image title

If we go back to bin folder, we will see that the mmc-data folder is created and contains all of the MMC-related data:

Image title

If we browse into the folder we will find no internal database folder created as we have already configured it with our MS-SQL Server and hence leaving only repository and workspace folder:-

Image title

We can see how easy it is to configure the MMC application with an external MS-SQL server database. I hope you like the post. Please do share your feedback and experiences below.

Microsoft Management Console Database

Published at DZone with permission of Anirban Sen Chowdhary, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • A Beginner's Guide to Infrastructure as Code
  • Keep Your Application Secrets Secret
  • Best Navicat Alternative for Windows
  • DeveloperWeek 2023: The Enterprise Community Sharing Security Best Practices

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: