db2look – Create DDL for table or full schema

Db2look is an utility to extract the definition of database objects. It also allows some really interesting statistics to extract objects for export to other test environments / integration plans and get the same access to objects.

In this article we will see more frequent usefulness.

DDL extraction of the objects in my schema:

db2look -d MI_BBDD -a -e -x -o FICHERO_SALIDA.txt

Extraction of the DDL of the DEPT table:

db2look -d MI_BBDD -t DEPT -a -e -x -o FICHERO_SALIDA.txt

 

To include statistics to have to use the “-m” option.

TOP 10 rows on DB2

In this shosrt post we will show how to obtain the N first rows from a Query on IBM DB2.

With Oracle SQL would be with ROWNUM, and with SQL Server we'd use TOP.

 

This is the Top 10 query syntax:

select *

from My_Table

fetch first 10 rows only

 

 

Query to obtain Cache Hit Ratio on IBM DB2

The cache hit ratio is one of the indicators used for tuning tasks. It Measures the percentage of hits in memory, specifically in the bufferpools (each of them).

To get the cache hit ratio for each buffer pool configured to run this query:

SELECT SUBSTR(DB_NAME,1,8) AS DB_NAME, SUBSTR(BP_NAME,1,14) AS BP_NAME,
TOTAL_HIT_RATIO_PERCENT, DATA_HIT_RATIO_PERCENT,
INDEX_HIT_RATIO_PERCENT
FROM SYSIBMADM.BP_HITRATIO ORDER BY DBPARTITIONNUM

 

7 Tips to Optimize Data Visualizations

Data has become a central asset to organizations and visualizations are critical to present data in a clear way. Visualization helps organizations make data-driven decisions. Optimizing data visualizations conveys the information in an accessible way that enhances the user experience. This article provides seven practices you can follow to improve your data visualization process..

Azure Storage Options for Big Data

Azure Storage for BigData

Microsoft Azure offers a wide array of storage options for documents, objects, data and media. Companies working with big data need repositories that can hold large amounts of data in one place. Choosing the right storage for your data in Azure can be complicated. Read on to learn about Azure’s offerings for big data, and the appropriate use case for each service..

Tuning DB2: Snapshots

To tune a database is useful to create snapshots that capture information from different structures/components of the instance.

In this post we show how they can be used to perform an analysis of tuning.

First of all, the monitor switches must be on to collect data from the different structures.

The state monitors are available as follows:

How to Secure Your Open-Source Components

A 2019 survey by Synopsys found that 96% out of 1100 scanned codebases included open-source components. These open-source components come with some unique issues that could be putting your system at risk. This is particularly true if you’re unaware of their presence.

In this article, you’ll learn some considerations for using open-source components. You’ll also learn how to secure your components and minimize your risks..