MariaDB as Source - DSS 6 | Data Source Solutions Documentation
Documentation: MariaDB as Source - DSS 6 | Data Source Solutions Documentation
MariaDB as Source
Capture
Data Source Solutions DSS supports capturing changes from MariaDB database. This section describes the configuration requirements for capturing changes from MariaDB database. For the list of supported MariaDB versions from which DSS can capture changes, see Capture changes from location in Capabilities.
Capture Methods
DSS allows the following methods for capturing (Capture) changes from MariaDB:
In terms of capture speed and database resource consumption, there is not much difference between using SQL or DIRECT method for capturing from a MariaDB location. By default, DSS captures changes from MariaDB using the SQL capture method (Capture_Method=SQL).
Direct Binary Log Reading
In this capture method (Capture_Method=DIRECT), DSS reads transaction log records directly from the DBMS log file using the file I/O. This capture method requires:
- an DSS Agent to be installed on the MariaDB source database server.
- the operating system user under which the DSS is running must have permission to read from the binary log files.
Binary Logs via SQL
In this capture method (Capture_Method=SQL), DSS captures changes over an SQL connection. The benefits of this capture method are the ability to:
- capture from a local/remote database without using an DSS Agent.
- run with minimal OS and database privileges.
Grants for Capture
This section lists the grants required for capturing changes from MariaDB database.
- To capture changes from MariaDB, the DSS database User must be granted the following privileges:
grant replication client on *.* to '<em>username</em>'@'%' ; grant replication slave on *.* to '<em>username</em>'@'%' ; grant select on *.* to '<em>username</em>'@'%' ;
Configuration for Binary Logging
In MariaDB, the transaction updates are recorded in the binary logs. For DSS to capture changes, the binary logging should be configured in MariaDB database. MariaDB allows you to define system variables (parameters) at server level (global) and at session level. The configuration for binary logging should be strictly defined as mentioned in this section. Defining parameters not mentioned in this section may lead to DSS not capturing changes.
For more information about binary logging, search for "binary logging" in MariaDB Documentation.
If binary logging is not enabled in MariaDB, a similar error is displayed in DSS: "dssinit: F_JD0AC8: The 'SHOW MASTER STATUS' command returned no results. Please check that the binary logging is enabled for the source database. F_JR0015: The previous error was detected during generation of objects for channel dss_demo. It is possible that objects have been left incomplete."
The following parameters should be defined in MariaDB configuration file my.cnf (Unix) or my.ini (Windows):
- log_bin=ON - to enable binary logging in MariaDB.
- binlog_format=ROW - to set the binary logging format.
- binlog_row_image=full or binlog_row_image=noblob - to determine how row images are written to the binary log.
binlog_row_image=minimal is not supported by DSS.
Compare and Refresh from MariaDB
DSS allows you to perform only Compare and Refresh from MariaDB database (without using Capture). This section describes the configuration requirements for performing only Compare and Refresh from MariaDB database.
Grants for Compare and Refresh from MariaDB
This section lists the grants required for performing only Compare and Refresh from MariaDB database.
- To read from the MariaDB database, the DSS database User must be granted the following privilege:
grant select on <em>table_name</em> to <em>username</em>;