All posts by Mark Jacobsen

Find the column causing a DB2 import to fail

Ever run DB2 IMPORT and get a super helpful error like…

SQL0407N  Assignment of a NULL value to a NOT NULL column "TBSPACEID=7,
TABLEID=265, COLNO=2" is not allowed.  SQLSTATE=23502

SQL3185W  The previous error occurred while processing data from row "126" of 
the input file.

After you calm down from wanting to smack a DB2 developer in the face, remember the syscat tables and run this SQL to find out the table and column giving you grief…

select  * 
from    syscat.columns c
            inner join syscat.tables t
                on  c.TABSCHEMA = t.TABSCHEMA
                    and c.TABNAME = t.TABNAME
where   c.COLNO = 2 
        and t.TABLEID = 265
        and t.TBSPACEID = 7

How do I send email from the linux command line?

Need to email from your linux command line? Assuming the underlying pieces are configured correctly (run the 1st example to see) here are the basics…

Send a test email

mail -s "Hi there"

Include some body text…

echo "This is some body text" | mail -s "Hi there"

Email the contents of a file to someone…

mail -s "My Subject" < /path/to/your/file.txt

You can find more here

Weekly Round-Up: 10/6/13 to 10/12/13

The Weekly Round-Up is a once weekly collection of my #1Aday daily shares. Hope you find something of interest!

Mon 10/7
Emily Co on: Ways to Make Passive Income –

Tue 10/8
Krissy Brady @writtenbykrissy on: 12 Habits of Perfectly Organized People –

Wed 10/9
MMM @MrMoneyMustache on: Wealth Advice that Should Be Obvious –

Thu 10/10
iOS 7’s Biggest Annoyances (and How to Fix Them) –

Weekly Round-Up: 9/29/13 to 10/5/13

The Weekly Round-Up is a once weekly collection of my #1Aday daily shares. Hope you find something of interest!

Mon 9/30
11 Tips to Keep iOS 7 From Destroying Your Battery Life –

Tue 10/1
The Minimalists @JFM reminds us: A Rolex Won’t Give You More Time –

Wed 10/2
What to Do (and Not Do) When You’re in a Car Accident –

Thu 10/3
Craig Dewe @LifestyleOutlaw on: How To Double (Or Triple) Your Current Income –

Fri 10/4
Tom Webster @webby2001 says: Open Plan Offices Make People Unhappy – and I would tend to agree –

Listening Twice as Fast!

I have a few PodCasts I enjoy and have recently been enjoying our library’s audio book selection. The thing is it always seemed to take so long to get through everything and I don’t like feeling like I’m behind on things. Then, one of my favorite PodCasts (the Lifehacker PodCast) mentioned a feature on most PodCast listening apps to let you listen at 1.5 speed. Sure enough, I opened up my favorite PodCast player and there was the option. Not only did I try it out, I cranked it up to 2x speed and have done the same on my audio book app as well!

If you’re a fan of spoken word content, check it out!

How can I be getting a deadlock trying to create a stored proc?

If you’re getting an error similar to the following…

SQL0911N The current transaction has been rolled back because of a deadlock 
or timeout. Reason code "68". LINE NUMBER=171. SQLSTATE=40001

… and you know your tables are all just fine, it may be that someone (likely a DBA) has the SYSCAT.ROUTINES table locked up. Try running this…


…and if that errors, try running “WITH UR”. Assuming the 1st fails and the 2nd does not, have your neighborhood DBA kill any connections that may be causing the lock.

Weekly Round-Up: 9/15/13 to 9/21/13

The Weekly Round-Up is a once weekly collection of my #1Aday daily shares. Hope you find something of interest!

Mon 9/16
Joshua Becker says: We Can Do Better –

How do I run a script in the background?

Use nohup! Here’s an example…

nohup /some/script.ksh

And even better, to redirect all output to a specific location…

nohup /home/user/script.ksh > /home/user/script.log 2>&1 &

Yes, the ” 2>&1 &” at the end is important.

Putting it on a shirt doesn’t make it true

I’ve never been impressed with the help at our local Kroger which is probably why I’m always so glad when I do get someone that takes more than 4 seconds to assist and is actually pleasant.

Recently I’ve noticed that the new Kroger shirts all say, “our #1 goal. Highly satisfied customers”…

Sorry guys, but putting it on a shirt doesn’t make it true.