All posts by Mark Jacobsen

Why a Big Tax Refund Isn’t as Awesome as You Think #1aDay

With tax season behind us, here’s a little PSA to remind you why a big refund isn’t actually all that great even if it may feel that way. I just need to remind myself of this every time I have to write checks to Uncle Sam πŸ™‚

Read the full article here

Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

Make Your Fridge Last (Almost) Forever With These 8 Tips #1aDay

After the furnace, the most important appliance in your home is probably the refrigerator. It’s also one of the most expensive ones. When you spend $1,000 or more on an item, you want it to last for many years.

How many of these tips have you heard?

Read the full article here

Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

Stop Fooling Yourself With These 7 Money Traps #1aDay


What are the 7 traps?

  1. Mental Accounting – Treating some money as more special than other money based on subjective criteria, such as how it will be spent or where it came from.
  2. The “Anchoring” Effect – Estimating the value of something based on irrelevant information (e.g., the “anchor”), such as the price you paid for it, the cost of something else you own, or what someone told you it was worth.
  3. Present Bias – Difficulty postponing immediate returns, or delaying gratification.
  4. Status Quo Bias – Preferring things you know over the things you don’t know, even if other options are superior.
  5. Restraint Bias – Overestimating our ability to resist temptation.
  6. Ownership Effect – Placing a higher value on the things you own, because you own them.
  7. Familiarity Bias – Gravitating toward products and investments that you know over unknown options, which may be better.

While some of them may be pretty similar I’m sure we all have a tendency to fall into one of the traps from time to time. For me, it’s probably “Restraint Bias” – especially once I’ve gotten an idea in my head that I want something. How about you? What’s your biggest trap?

Read the full post here

Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

Heartbleed and the Importance of Two-Factor Authentication #1aDay

With the recent announcement of the Heartbleed vulnerability it’s more important than ever to consider your security precautions. Of particular importance you should be…

  • Using a password manager like LastPass or KeePass
  • Using Two-Factor Authentication wherever you can
  • Using strong passwords wherever you can’t use Two-Factor Authentication

So now a few details…

What is Heartbleed and why do I care?

For those who are not server administrators, Heartbleed made it possible for attackers to steal information from servers memory. Of importance to you, that information may have included usernames and passwords. Should an attacker have your username and password I’m sure you can figure out that they could do not nice things with that information.

What can I do?

Use a password manager like LastPass or KeePass

Tools like LastPass and KeePass are great because they give you a secure and central place to store your usernames and passwords. Plus a service like LastPass includes additional tools and can provide valuable services like they did with Heartbleed to let you know where you should be updating your passwords. Concerned about using a service like LastPass? Here’s a good article on why you may not need to worry.

Use Two-Factor Authentication wherever you can

As that article above pointed out, you should be using Two-factor authentication wherever you can. Two-factor authentication requires an additional step in addition to entering your password, usually by sending a message to your mobile phone or using an app on your smartphone. Basically, with 2 factor authentication, logins require something you know (your password) and something you have (your phone). In short, two factor auth prevents Heartbleed because should an attacker have your password, they still don’t have your phone and thus would not be able to login as you.

You can find a good site with lots of places that allow two factor authentication here. My suggestion, support companies like these with take security seriously.

Use strong passwords wherever you can’t use Two-Factor Authentication

If a site does not allow two factor authentication, I would highly recommend that you use a strong password. Here’s another place where a service like LastPass or KeePass come in handy because they can generate strong passwords for you.

Change your Passwords

Keep an eye on this list for when and where to update your passwords. Even if a site sends you an email saying they weren’t affected, it wouldn’t hurt to change your password and add it to your password manager. Chances are you weren’t using a secure one to being with.

Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

How to Tell What Objects Reference a DB2 Table

This “little” πŸ™‚ query will do it for you. Just change the where clause at the bottom…

SELECT Type_X AS "Type" 
, RefObj_X AS "Referencing Object" 
FROM ( 
SELECT RTRIM(SYSPROC.PROCSCHEMA)||'.'||RTRIM(SYSPROC.PROCNAME) AS RefObj_X 
, RTRIM(SYSPROC.PROCSCHEMA) AS Schema_X 
, RTRIM(SYSPROC.PROCNAME) AS Obj_X 
, RTRIM(PDEP.BSCHEMA)||'.'||RTRIM(PDEP.BNAME) AS BaseObj_X 
, 'Proc' AS Type_X 
FROM SYSCAT.PACKAGEDEP PDEP 
INNER JOIN SYSIBM.sysdependencies SYSDEP 
ON SYSDEP.BSCHEMA = PDEP.BSCHEMA 
AND SYSDEP.BNAME = PDEP.PKGNAME 
INNER JOIN SYSIBM.sysprocedures SYSPROC 
ON SYSDEP.DNAME = SYSPROC.SPECIFICNAME 

UNION ALL 

SELECT RTRIM(TRIGSCHEMA)||'.'||RTRIM(TRIGNAME) AS RefObj_X 
, RTRIM(TRIGSCHEMA) AS Schema_X 
, RTRIM(TRIGNAME) AS Obj_X 
, RTRIM(BSCHEMA)||'.'||RTRIM(BNAME) AS BaseObj_X 
, 'Trigger' AS Type_X 
FROM SYSCAT.TRIGDEP 

UNION ALL 

SELECT RTRIM(VIEWSCHEMA)||'.'||RTRIM(CAST((VIEWNAME) AS CHAR(126))) AS RefObj_X 
, RTRIM(VIEWSCHEMA) AS Schema_X 
, RTRIM(CAST((VIEWNAME) AS CHAR(126))) AS Obj_X 
, RTRIM(BSCHEMA)||'.'||RTRIM(BNAME) AS BaseObj_X 
, CASE DTYPE WHEN 'S' 
THEN 'SUMMARY TABLE' 
ELSE 'View' 
END AS Type_X 
FROM SYSCAT.VIEWDEP 

UNION ALL 

SELECT RTRIM(INDSCHEMA)||'.'||RTRIM(INDNAME) AS RefObj_X 
, RTRIM(INDSCHEMA) AS Schema_X 
, RTRIM(INDNAME) AS Obj_X 
, RTRIM(TABSCHEMA)||'.'||RTRIM(TABNAME) AS BaseObj_X 
, 'Index' AS Type_X 
FROM SYSCAT.INDEXES 

UNION ALL 

SELECT RTRIM(TABSCHEMA)||'.'||RTRIM(TABNAME) AS RefObj_X 
, RTRIM(TABSCHEMA) AS Schema_X 
, RTRIM(TABNAME) AS Obj_X 
, RTRIM(BASE_TABSCHEMA)||'.'||RTRIM(BASE_TABNAME) AS BaseObj_X 
, 'Alias' AS Type_X 
FROM SYSCAT.TABLES 
WHERE TYPE = 'A' 

UNION ALL 

SELECT DISTINCT RTRIM(CAST(RTRIM(TABSCHEMA) AS VARCHAR(126))) || '.' || RTRIM(TABNAME) AS RefObj_X 
, RTRIM(CAST(RTRIM(TABSCHEMA) AS VARCHAR(126))) AS Schema_X 
, RTRIM(TABNAME) AS Obj_X 
, RTRIM(REFTABSCHEMA)||'.'||RTRIM(REFTABNAME) AS BaseObj_X 
, 'Table' AS Type_X 
FROM SYSCAT.REFERENCES 
) AS RefTbl 
WHERE BaseObj_X = 'XX.MY_TABLE' 
ORDER BY 
Type_X 
, RefObj_X;

Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

Quick apt-get Tutorial

List installed packages…

dpkg --get-selections | grep -v deinstall

List installed packages (but filter based on name)…

dpkg --get-selections | grep -v deinstall | grep filter

Install a package…

sudo apt-get install the-package-name

Uninstall/remove a package…

sudo apt-get remove the-package-name

Update package lists/dependencies (does not actually install anything)…

sudo apt-get update

Apply updates to existing packages based on an “update” call (without removing anything)…

sudo apt-get upgrade

Apply updates to existing packages based on an “update” call and remove obsolete packages…

sudo apt-get dist-upgrade
Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

Force values into DB2 GENERATED ALWAYS fields

If doing a conversion of data where you need to force a value into a field that is GENERATED ALWAYS after the conversion, you can still load values into the generating and generated fields.

In your conversion load process, use the “generatedoverride” modifier (ex: LOAD FROM C012 OF CURSOR MODIFIED BY generatedoverride MESSAGES $l_sLog). This will allow you to force values into GENERATED ALWAYS fields.

Once your load completes, issue one of the following statements to take your table out of the “set integrity pending” state:

SET INTEGRITY FOR table-name GENERATED COLUMN IMMEDIATE UNCHECKED; 
-- will not verify the values you supplied in the load

SET INTEGRITY FOR table-name IMMEDIATE CHECKED; 
-- will verify the values you supplied in the load

Ref: http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.admin.doc/doc/c0004592.htm

Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

How to Tell who has DB Admin Privileges in DB2

If you…

SELECT * FROM SYSCAT.DBAUTH

... you will get back a lot of details about what permissions people have including DB Admin.

Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

Quick CRON Tutorial

The fastest way to setup scheduled tasks in Linux is with cron. To list your cron tasks, run:

sudo crontab -l

To modify your cron tasks, run:

sudo crontab -e

For help generating the string for when your tasks should run, just google around for “cron calculator”, and remember to test, test, test.

Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

When Was a DB2 Table Created and by Who?

This little bit of SQL should help you determine who created a table or when it was created…

SELECT 
CASE TAB.TYPE 
WHEN 'A' THEN 'Alias' 
WHEN 'N' THEN 'Nickname' 
WHEN 'S' THEN 'MQT' 
WHEN 'T' THEN 'Table' 
WHEN 'V' THEN 'View' 
ELSE 'OTHER: '||TAB.TYPE 
END AS T_TYPE 
,RTRIM(TAB.TABSCHEMA)||'.'||TAB.TABNAME AS TABLE_NAME 
,DATE(CREATE_TIME) AS CREATED 
,DATE(ALTER_TIME) AS ALTERED 
,TAB.COLCOUNT AS COLUMNS 
,TAB.DEFINER AS CREATED_BY 
FROM SYSCAT.TABLES TAB 
WHERE TABSCHEMA = 'XX' 
ORDER BY TABLE_NAME 
FOR READ ONLY 
WITH UR;

Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...