ATMega328P 8MHz on a Breadboard
· ☕ 4 min read
I had an urgent need (!) to build a breadboard version of an Arduino board which I needed to run without the 16MHz crystal and the two 22pF capacitors used by most Arduino boards. The following steps are what I had to do, as my brand new ATmega328P micro-controller came supplied with an Arduino Uno boot-loader installed. I didn’t want that one because it depends on having the 16MHz crystal and that takes up two of the I/O pins, which I might have a good use for, plus I can run it at 3.

Oracle Deadlock Analysis
· ☕ 1 min read
There’s a new utility to assist in diagnosing the underlying cause of Oracle deadlocks. Interested? You can download source code as well as binaries for Linux and Windows at https://github.com/NormanDunbar/DeadlockAnalysys/releases. All you have to do is execute the DeadlockAnalysis utility with a list of Oracle trace files on the command line. Each trace file will get its own report, in HTML format, in the same directory as the trace file.

Useful AIX Unix Commands
· ☕ 1 min read
proctree The proctree command acts like the Linux pstree and displays the hierarchy of processes from a given starting process id. View Large Files If, when you view a large file you get an errors about it being too big, try the following: echo "set ll=3501720 dir=/tmp" >> ~/.exrc That will allow you to read up to 3501720 lines in a single text file.

ENQ: TS - Contention
· ☕ 1 min read
Thanks to http://www.dbaglobe.com/2010/08/drop-temporary-tablespace-hang-with-enq.html it was a simple matter to resolve the above enqueue wait on an attempt to drop a previously default temporary tablespace. The session causing the problem was a DBSNMP session being run by the OEM agent on the server. The following script, from the above blog, allowed me to identify the session and sort out getting it ‘removed’ to allow the drop to continue. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 SELECT se.

RMAN-20033: control file SEQUENCE# too low
· ☕ 1 min read
Have you ever seen the error RMAN-20033: control file SEQUENCE# too low and wondered what could be causing it? If you look on MOS, you will probably see that the error is caused by the control file in use is older than the one that was most recently used to synchronise the RMAN catalogue and that you should either recreate the database control file(s), or, delete the database from the catalog and add it in again.

Generate Entity Relationship Diagrams from a SQL Script.
· ☕ 5 min read
Sometimes, just occasionally, you find yourself as a DBA on a site where, for some strange and unknown reason, you don’t have an Entity Relationship Diagram (ERD) for the database that you are working on. You could use a tool such as Toad, or SQL*Plus (or even, SQL Developer - if you must) to generate a list of referential integrity constraints. There has to be a better way. The problem with lists is, they are just words.

Snorkelling in the Oracle Listener Logs.
· ☕ 11 min read
(Snorkelling is not quite as in depth as a “deep dive”!) Attempting to parse a listener.log will probably bend your brain, but I needed to do it recently to determine which unique servers and/or desktops and/or application servers were still connecting to a database prior to that database going down for maintenance. This was an exercise in confirming that the documentation we have, is correct. According to the Net Services Administrator’s Guide, there are a number of different message types that can appear in a listener.

IMPDP Hangs, or Appears to Hang - But Has it?
· ☕ 5 min read
You know the score, you are running an impdp and it looks to have hung up. You’ve watched the log file (or on screen messages) and it’s sitting at something like: Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX But hasn’t moved from there for what seems hours. The alert log for the database is of no help, as there are no errors or warnings logged there. What’s going on? Is the import actually running?

Arduino Nano - Cannot Upload Sketches after Board Upgrade to 1.6.21
· ☕ 1 min read
My Arduino Nano started to refuse to upload sketches after I upgraded the boards library to version 1.6.21 from 1.6.20. All I got was this: ... avrdude: stk500\_recv(): programmer is not responding avrdude: stk500\_getsync() attempt 1 of 10: not in sync: resp=0x00 avrdude: stk500\_recv(): programmer is not responding avrdude: stk500\_getsync() attempt 2 of 10: not in sync: resp=0x00 ... Repeat 100 times! After reverting back to the previous boards library, version 1.

FLAC to MP3 as Easy as Pie!
· ☕ 2 min read
I have ripped all my music, well most of it, to FLAC for the quality aspect. Sometimes though, I need to convert to MP3 for some of the lesser audio players out there that I might have to use from time to time. I have recently come across a pretty nifty (Linux) way to do this, without having to cope with having duplicate files in FLAC and MP3 formats on my hard drives.

Using FUSE to Mount an SSH Folder Locally
· ☕ 2 min read
I have recently come across a pretty nifty Linux utility that allows me to mount a remote filesystem on an SSH server, locally and without requiring root privileges to do so. The remote filesystem happens to be where my backups are located, so that’s going to be useful for making and restoring backups! The utility I’ve discovered is called sshfs and is a FUSE file system whereby a normal, non-root user, can mount the remote folder and see the contents as if they were actually in a local folder.

Compiling Sqlite3 Shell with Embarcadero/Borland C.
· ☕ 2 min read
I wanted to compile the sqlite3 shell on Windows, using my Free Embarcadero C compiler, but it didn’t work. It was quite easy to fix, but if you are affected, read on. First Attempt After unzipping the amalgamated source files a default compilation was attempted with the following command line. The -tCM option simply says to create a console based non-windows application. bcc32c -o sqlite3.exe shell.c sqlite3.c -tCM Which results in the following compiler warnings and linker errors:

Trace Collier and TraceAdjust
· ☕ 2 min read
Trace Collier has been updated and rewritten. Numerous bugs and foibles have been fixed. TraceAdjust is a new, useful, utility to carry out some pre-processing on a trace file before you have to use your own weary eyes to work thorough potential Oracle performance problems! That’s why I wrote it! Trace Collier My old utility has been totally rewritten in C++ rather than vanilla C, which has had the bonus of allowing me to fix some bugs, and do away with the need to recompile whenever you hit a system limit of some kind.