Category Archives: Databases

#Microsoft SQL Server: Database #Replication (Mirroring) deprecated and replaced by #SQL Availability Groups

By | February 5, 2018

It looks like the Microsoft SQL Database Mirroring a feature I used a lot and for which posted a step by step tutorial that proved to be very popular was deprecated by Microsoft. In a news article on Microsoft site the alternative is presented “Basic Availability Groups (Always On Availability Groups)”. I will summarize in… Read More »

Using temporary indices to optimize DELETE operations on big tables in #DB2

By | December 18, 2019

DELETE operations are much faster in case we disable constraints. This is because not all foreign keys affected by the DELETE are indexed. We have to detect all the foreign keys that point to the table from where you delete data. The we can create temporary indices to help speed up the delete. STEP 1.… Read More »

Optimizing DELETE operations on big tables in #DB2

By | November 21, 2017

Deletes go very slow if the log buffer size is too small and we delete lots of data from big tables. It is very important to have the right settings for log buffer size to avoid having to frequent writes to the disk, writes that cause a high IO traffic that will slow down the… Read More »

Fix #DB2 SQL1639N ( SQLCODE=-1639, SQLSTATE=08001, SQLERRMC=null) authentication issue

By | November 21, 2017

After migrating my full DB2 backup (binaries and data) to a new server I got into several issue. One was already described in the previous post here. ISSUE: Even after fixing that start issue I was still not OK. My WebSphere data source that linked to the DB2 instance was not responding. Trying to ping… Read More »

Fix #DB2 Communication protocol failed to start issue: SQL5043N

By | November 21, 2017

I moved my DB2 installation to a new server from a full back-up. After performing all the necessary steps: 1. Recreate the necessary users: db2inst1, db2fenc1, db2das1 2. Give ownership to their home directories ISSUE: I tried to start the instance. I logged in to the db2inst1 user and started the database. This was the… Read More »

XA datasources with #WebSphere and #Oracle

By | December 5, 2017

When using XA data sources with Websphere and Oracle we must grant to the Oracle user rights to perform XA recovery. STEP 1: Create an XA datasource AdminTask.createJDBCProvider(‘[-scope Node=’+ node +’,Server=’+serverName +’ -databaseType Oracle -providerType “Oracle JDBC Driver” -implementationType “XA data source” -name “‘+jdbcXAProviderName +'” -description “Oracle JDBC Driver (XA)” -classpath [${ORACLE_JDBC_DRIVER_PATH}/ojdbc7.jar ] -nativePath “”… Read More »

#Oracle 12c invisible columns

By | February 20, 2021

“Invisible columns”: This is a new feature introduced in Oracle 12c that got me all excited.In short you can now have hidden columns in a table that are not visible to the standard SELECT, INSERT clauses if you do not want to. Some usage for this: Legacy application queries I hate how you have to… Read More »

Set up automatic #Oracle database back-up using #RMAN

By | September 19, 2017

There is a very easy method of setting up on Linux an automatic back-up for Oracle by using database procedures, RMAN and scripts. STEP 1: Define a back-up script Create in /home/oracle/backup.sh a script file with the content: #!/bin/bash export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1 export PATH=$PATH:$ORACLE_HOME/bin export ORACLE_SID=prod rman target / CMDFILE=/home/oracle/bin/backup.rman LOG /data/oradata/backuplogs/rman-`date -I`.log exit 0 Where… Read More »

Validate and Investigate a live #DRBD replicated Oracle Instance using LVM clone

By | October 19, 2017

This is another post related to the DRBD replication setup I describe in post #DRBD based disk replication of a production cluster to a remote site cluster on RHEL 6. Sometimes we need to be able to mount the offline replicated Oracle database instance for investigations. This can be done by using logical volume snapshots.… Read More »

Debug tools for enterprise environments

By | February 8, 2017

There are various tools that I use to spot issues and investigate an enterprise environment. One of my favourite tools is IBM Performance Analysis Suite. Capabilities described by IBM: Import all kinds of performance data for analysis. Some examples: DB2 snapshot, Java verbose GC output, Java thread dumps. Import software/middle-ware configuration for compliance checking. Some… Read More »