PostgreSQL 13 logical replication configuration

Prerequisite: Two VM hosts with PostgreSQL 13 preinstalled. Master Node: pg13-master; 192.168.56.71 Standby Node: pg13-replica; 192.168.56.72 Logical replication uses a publish and subscribe model with one or more subscribers subscribing to one or more publications on a publisher node. Subscribers pull data from the publications they subscribe to and may subsequently re-publish data to allow…

PostgreSQL 13 stream replication configuration using rsync in Linux

Prerequisite: Two VM hosts with PostgreSQL 13 preinstalled. Master Node: pg13-master; 192.168.56.69 Standby Node: pg13-standby; 192.168.56.70 rsync should be installed on the nodes to transfer WAL files to the standby node. Configuration Steps: Configure passwordless authentication as continuous WAL archiving will be performed using rsync from master to standby node. On the master, execute ssh-keygen…

PostgreSQL 13 log shipping replication configuration using rsync in Linux

Prerequisite: Two VM hosts with PostgreSQL 13 preinstalled. Master Node: pg13-master; 192.168.56.67 Standby Node: pg13-standby; 192.168.56.68 rsync should be installed on the nodes to transfer WAL files to the standby node. Configuration Steps: Configure passwordless authentication as continuous WAL archiving will be performed using rsync from master to standby node. On the master, execute ssh-keygen…

ORA-01031: insufficient privileges raised during materialized view creation on another schema

Scenario: ORA-01031: insufficient privileges raised during the creation of materialized view (MVIEW) on another schema by the SYSTEM user. CREATE MATERIALIZED VIEW kaysar.mview_test BUILD IMMEDIATE AS (SELECT * from kaysar.test); [Error] Execution (4: 26): ORA-01031: insufficient privileges Investigation: The SYSTEM already has the privilege of CREATE_MATERIALIZED_VIEW to create the MVIEW on another schema but failed…

[ERROR] mariadbd: Out of sort memory

Scenario: Got below error from application end. SQL state [HY001]; error code [1038]; (conn=15945) Out of sort memory, consider increasing server sort buffer size; nested exception is java.sql.SQLException: (conn=15945) Out of sort memory, consider increasing server sort buffer size at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:89) Investigation: Detailed dig down on the MariaDB error log found the below error. [ERROR]…

Detected table cache mutex contention at instance 1: 60% waits. Additional table cache instance activated. Number of instances after activation: 2.

Scenario: All the three nodes of Galera cluster uses 98 percent of memory and swapping heavily, no DML could be performed. Investigation: From the error log on the node 3 the below error has been notified: Detected table cache mutex contention at instance 1: 60% waits. Additional table cache instance activated. Number of instances after…

MySQL Replication on CentOs 7: Configure binary log file position based replication (Fresh server with no data)

Prerequisites: Two virtual machine each of 2GB RAM, 10 GB HDD and Two vCPU with CentOS 7 installed on these. Workaround: Configure the networking between two nodes: Step1: Change the host name of the master node to master-node and make entries to the /etc/hosts file. # hostnamectl set-hostname master-node # echo ‘192.168.56.103 master-node’ >> /etc/hosts…

ERROR 1419 (HY000): You do not have the SUPER privilege and binary logging is enabled

MariaDB Error: ERROR 1419 (HY000): You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_routine_creators variable) Cause: The user who is executing the create function doesn’t have the required SUPER privilege. Solution: AS for security concern the user couldn’t be given the SUPER privilege…

ORA-39142: incompatible version number 5.1 in dump file

Error: Experienced the below error during the import of the export dump file to the Oracle 12.1. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options ORA-39001: invalid argument value ORA-39000: bad dump file specification ORA-39142: incompatible version number 5.1 in…

Connect to MariaDB from Oracle and perform DML on remote MariaDB table

Background: In enterprises most cases their database infrastructures or applications are built on different databases, sometimes data needs to be transferred or synced from one database to another heterogenous database. Oracle supports heterogenous connectivity to popular databases like MySQL, SQL Server, MariaDB, DB2, Sybase and more on the list. Here we will try to establish…

ORA-12012: error on auto execute of job “SYS”.”ORA$AT_OS_OPT_SY_****

Error: Errors in file /u01/app/oracle/diag/rdbms/bpay/bpay/trace/bpay_j000_24499.trc: ORA-12012: error on auto execute of job “SYS”.”ORA$AT_OS_OPT_SY_586″ ORA-20001: Statistics Advisor: Invalid task name for the current user ORA-06512: at “SYS.DBMS_STATS”, line 47207 ORA-06512: at “SYS.DBMS_STATS_ADVISOR”, line 882 ORA-06512: at “SYS.DBMS_STATS_INTERNAL”, line 20059 ORA-06512: at “SYS.DBMS_STATS_INTERNAL”, line 22201 ORA-06512: at “SYS.DBMS_STATS”, line 47197 Cause: It’s a known bug, the advisory…

Install and configure MariaDB Galera 4 cluster on Centos 7 in VirtualBox

Install and configure MariaDB Galera 4 cluster on Centos 7 in VirtualBox

Background: Clustering is used to achieve High Aaailability(HA) in many forms and is widely used in database technologies to meet the service uptime and to load balance clients requests. We will see how to configure a Opensource Galera cluster on MariaDB database. This documents assume that you are familiar with virtualization technologies especially VirtualBox, you…

Oracle table partitioning: why, when and how

Oracle table partitioning: why, when and how

Why partitioning: Enhances the performance, manageability, and availability. Partitioning allows tables, indexes, and index-organized tables to be subdivided into smaller pieces. When to partition a table: Tables larger than 2gb size. Historical data Contents must be stored in different storage Avoid index maintenance when data is removed Index maintenance on parts of data like rebuilding…

Migrating Bitnami WordPress website from AWS EC2 to VPS Bitnami NGINX

Steps to perform during migration: Install VPS with CentOS 7 without any LAMP stack. configure the x11 window and forwarding make a directory named as /bitnami to be used as installed directory Download the WordPress NGINX stack installer from bitnami. Login as root user, installation should be done as root user to avoid later complexities.…