Category Archives: Databases

#SQL to find dependency between tables in #Oracle database

There are times when we need to find which are the tables that depend on a given table. This is useful when cleanup or archiving jobs have to pe performed and the interconnection of constraints is becoming a nuisance. Lucky for us in the case of Oracle database is quite simple to search through all… Read More »


Investigate #Oracle #deadlocks

Sometimes we may end up having some application resources competing for the same resource on our Oracle database. This is usually the case when some exclusive resource must be allocated or updated as in the case of database based locking mechanisms. If there are code issues we may end up in a deadlock situation when… Read More »

Drop a not null constraint with #SQL

Sometimes very annoying things can be removed with a simple SQL commands which nobody remembers because is used so rarely. For example when we have to update a database schema and remove a not null constraint on a column. There is a short one liner for it:

Optimizing DELETE operations on big tables in #DB2

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 »