Minimalistic Oracle

Minimalistic Oracle contains a collection of practical examples from my encounters with Oracle technologies. When relevant, I also write about other technologies, like Linux or PostgreSQL. Many of the posts starts with "how to" since they derive directly from my own personal experience. My goal is to provide simple examples, so that they can be easily adapted to other situations.

Monday, July 14, 2025

How to find when a PostgreSQL table was last vacuumed

›
SELECT schemaname, relname, last_vacuum, last_autovacuum, last_analyze, last_autoanalyze FROM pg_stat_user_tables WHERE relname = 'docu...
Friday, July 11, 2025

PostgreSQL: how to tail the alert log of the day with filtering for long-running statements

›
I have set the parameter log_min_duration_statement to 2 seconds and reloaded the config: postgres=# alter system set log_min_duration_sta...
Wednesday, July 9, 2025

How to list all subdirectories and exclude certain subdirectories in a tree-like fashion

›
In this example I want to see all subdirectories that starts with "dir", but also to exclude the directory "dirdat": cd...
Thursday, June 19, 2025

Postgres: List all RANGE partitions, sorted by their range start value

›
My table contains 180 partitons, and looks like this when described in psql: mydb=> \d mytable Partitioned table "myschema.m...
Thursday, June 5, 2025

PostgreSQL search_path basics

›
Similar to Oracles alter session set current_schema=<schema_name> , in PostgreSQL, search_path is a session-level setting that dete...

How to limit connections in a postgres database

›
This is how you can restrict connections for a specific database to zero: postgres=# alter database db01 connection limit 0; ALTER DATABA...

create user in postgres - basic syntax

›
I will create a group role called common_users a user called ro_user1 in a database called db01 The read-only user ro_user1 should ...
›
Home
View web version

About Me

My photo
Name: Vegard Kåsa
My career as an Oracle DBA startet in 2001, when I acceptet a request to take on the responsibility as my current employer's DBA. From that point and onwards, managing Oracle databases has kept me busy and engaged. I enjoy my work, and particulary appreciate the constant learning and devlopment that comes with the job. From 2014, I am self-employed through my company Oric Consulting AS (Norway), and from 2024 Oric Consulting AB (Sweden) I currently live in Göteborg, Sweden, with my family.
View my complete profile
Powered by Blogger.