Amat Victoria Curam
Amat Victoria Curam
Amat Victoria Curam

Blog

Docker tips

Docker tips

#docker #devops

Recently, I started working with Docker on various projects. So here’s just a bunch of commands I’ve found to be quite helpful while troubleshooting errors with Docker. # List all containers docker images REPOSITORY TAG IMAGE ID CREATED SIZE project_web latest f4ef8d25add1 ... Read more

20 Sep 2017 - 1 minute read
Blockchain and IoT

Blockchain and IoT

#blockchain #linux

Here’s a small script to open a JavaScript interface to interact with an IoT device. This interface can then be easily incorporated in a larger Blockchain project with real tangible everyday life objects. I’ll cover the Blockchain aspect of this project in another article, focusing on Hyperledger. The IoT device I’ll be using for this project i... Read more

20 Aug 2017 - 2 minute read
Image compression from the command line

Image compression from the command line

#linux

Here’s a small script to compress JPEG images in a folder. Useful to save a few kilobytes of bandwith when serving images from your website. I might improve this script in the future to include more compression tools and/or file extensions. #!/bin/bash for f in *.jpg *.JPG *.jpeg *.JPEG do echo -en "Converting ${f} ... " kb_orig=`du -... Read more

20 Jul 2017 - less than 1 minute read

Compress a Whole Linux or UNIX Directory

Compress a Whole Linux or UNIX Directory

#linux

Ok, that’s a simple one, but it’s always nice to have a quick syntax remainder. So, here’s the best way to compress a whole directory under Linux/UNIX using a shell prompt. This technique is often used to backup files or to move data using a compressed archive. The GNU tar command is best for this work. This command does two things for you: ... Read more

20 Jun 2017 - 1 minute read
Restart a hung Oracle database

Restart a hung Oracle database

#oracle

On rare occasions, mostly during a high server load peak or a process failure, an Oracle instance may not accept any connection. Either from regular users as well as SYSDBA. This situation is called a hung database and must be quickly resolved as the database isn’t accessible for your users anymore. As you cannot connect to the hung database, yo... Read more

20 May 2017 - 1 minute read
Resolve the ORA-00904 invalid identifier error

Resolve the ORA-00904 invalid identifier error

#oracle

Eventually, you’ll issue a valid SQL statement and SQLPlus* will return the error ORA-00904 invalid identifier. First, make sure it’s not a typo and you typed a valid and existing column name. If the column exists you should be able to query it and not get this error. The invalid identifier error most commonly happens when you are referencing an... Read more

20 Apr 2017 - 1 minute read

How to write to the alert log

How to write to the alert log

#oracle

Juste in case you wondered, yes it is possible to write custom messages directly to the alert log. For this, you’ll have to use the procedure ksdwrt stored in the dbms_system supplied package. This can be a useful way to implement custom messages when you execute a stored procedure, or it can help with testing by generating alerts. SQL> exec... Read more

20 Mar 2017 - less than 1 minute read
PL/SQL loop through a set of values

PL/SQL loop through a set of values

#oracle #plsql

Here’s a simple trick on how to make a PL/SQL loop iterate through a set of predefined values. This can be useful when you need to perform a report query on a set of Oracle user account, or to query a set of specific dictionary objects for example. Note that you can also make this static list a dynamically generated list. set serveroutput on ... Read more

20 Feb 2017 - less than 1 minute read
Index managment

Index managment

#oracle

In this article, I’ll show you various ways to move an index to another tablespace when you need to reorganize database objects or free some space. Move an index on a different tablespace Simple and efficient. Will work flawlessly for small indexes (> 200-300 Mb) Alter index index_name rebuild tablespace new_tablespace_name; Alter index I... Read more

20 Jan 2017 - 1 minute read

Shared pool purge

Shared pool purge

#oracle

A few days ago, I was trying to optimize a single SQL statement in a production environment. The statement was using bind variables, so the plan would change to a different (sub-optimal) plan as adaptive cursor sharing was kicking in. I needed to flush that plan out of the shared pool without flushing the entire pool. Here’s how to do that. Get... Read more

20 Dec 2016 - 1 minute read
Sync Oracle sequences

Sync Oracle sequences

#oracle

In a database copy scenario, or to fix an applicative bug, you may have to resync sequences. Basically, there’s two ways to achieve this: Drop and recreate the sequence. Artificially invoke it to catch up with the real maximum ID used. I advise using the first solution in most cases, as it will be instant and won’t waste ... Read more

20 Nov 2016 - 1 minute read
Install Oracle JDK 8 on Raspberry Pi

Install Oracle JDK 8 on Raspberry Pi

#oracle #java

In this post, I’ll show you how to download and install Oracle JDK 8 on a Raspberry Pi. Visit Oracle download website and click the download button for Java Platform (JDK) 8. Then accept the license agreement and proceed to download the Linux ARM x32 version. Login to your Raspberry Pi and extract the archive in the /opt directory. $ sudo tar ... Read more

20 Oct 2016 - less than 1 minute read