Catégorie : Scripts

PostgreSQL Defrag les plus gros indexes et tables

Réduire la fragmentation  https://www.timescale.com/learn/how-to-reduce-bloat-in-large-postgresql-tables Afficher les (10) plus gros indexes : SELECT    indexrelname AS index_name,    pg_size_pretty(pg_relation_size(relid)) AS index_size,    pg_size_pretty(pg_total_relation_size(relid)) As « Total Size »FROM pg_catalog.pg_stat_all_indexes WHERE schemaname =’public’ORDER BY pg_total_relation_size(relid). read more…

[SYSTEM]

This script uses the local tnsnames.ora file to create a connection, and requires the variable ${p} to hold the current SYSTEM password. #on récupère le mdp systeme[[ -z « ${p} » ]]. read more…

Ora2PG script creation project

#!/bin/sh#——————————————————————————-## Script to create an ora2pg project# Author : JJY##——————————————————————————-#set -vxclearecho  » « echo  » Welcome in the program to create a migration project. « echo  » « echo  » Write the working. read more…

[Oracle] Calculate the lobs size

#!/bin/sh#script to calculate the lobs sizesqlplus /nolog<<!EOF conn / as sysdbaspool req1.sqlset head offset feed offselect ‘SELECT max(dbms_lob.getlength( »’||col.column_name|| »’)) from ‘||col.owner||’.’||col.table_name||’;’from sys.dba_tab_columns col inner join sys.dba_tables t on col.owner = t.owner and. read more…

Translate »