Database Connector Examples - Mule 4
Anypoint Connector for Database (Database Connector) examples help you configure database connections, query a database, execute stored procedures, execute DDL statements, execute scripts, execute database transactions, use bulk operations, and configure custom data types:
-
Configure a Database Connection
Connect to both popular and generic database. Additionally, configure the connector to connect to a global data source, set a JDBC driver, configure connection pooling, and connection to an Oracle database with TNS. -
Configure an Oracle TLS Database Connection
Connect to Oracle through a secure TPC (TCPS) tunnel using multiple secure Oracle connection levels and Mule’s TLS configuration. -
Configure Driver Visibility using Mule Maven Plugin
Use the Mule Maven Plugin to configure properly the driver classes visibility. -
Query a Database
Configure the Select operation to query data from a database. -
Query a Single Record from a Database
Configure the Query single operation in a Mule application that retrieves books information from a table in a MySQL database. -
Insert, Update, and Delete Data
Configure the Insert, Update and Delete operations to manage data. -
Bulk Insert, Bulk Update, and Bulk Delete Data from a Database
Configure the Bulk insert, Bulk update, and Bulk delete operations to manage date in bulk. -
Execute Stored Procedures
Configure the Stored Procedure operation to combineinput
,output
, andinput-output
parameters. Additionally, configure dates on stored procedures. -
Call an Oracle Stored Procedure That Uses UDTs
Configure the Stored procedure operation to call an Oracle database stored procedure that uses UDTs for its input and output parameters. Additionally, useprepareStruct
andprepareArray
DataWeave functions to map application data to your custom types. -
Execute DDL Statements
Configure the Execute DDL operation to execute DDL statements that create or modify data within tables or other data structures. -
Execute Scripts
Configure the Execute Script operation to execute a script as a single statement. -
Configure Database Data Types
Configure custom data types to use when connected to a particular connection provider. -
Configure Database Transactions
Execute database operations in the context of a transaction. -
Insert large file content into a table
Configure a Mule app flow to read and insert a large file into a table. -
Using XA Transactions in Database Connector
Configure the Use XA Transactions field in the Database Connector global configuration so the datasource supports Extended Architecture Transactions (XA Transactions). -
Configure Use Bulk Copy for Database Connector SQL Server Connection
Configure the Use Bulk Copy to do bulk copy operations when executing batch insert operations.