Deploying an Application Load Balancer in AWS

Pre-requisites: Two EC2 instances deployed in two different availability zones to work as the web servers. Script to include in the EC2 user data section to deploy the Apache web server.     #!/bin/bash yum update -y yum install httpd -y echo “<html><body><h1>The Apache Server!</h1></body></html>” >/var/www/html/index.html systemctl start httpd    systemctl enable httpd Create the Application…

Use an existing Key Pair in the AWS CloudFormation when deploying an EC2 instance

Under the Parameters section include the Key Pair entry and then from the Resources section reference the Key Pair. Parameters: KeyName: Description: “Name of an existing key pair” Type: String … … … Resources: EC2Instance: Type: ‘AWS::EC2::Instance’ Properties: InstanceType: t3.micro ImageId: ‘ami-008677ef1baf82eaf’ KeyName: Ref: KeyName … …

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…