Evaluating Null in Oracle

In a previous article Oracle conditions and how they handle NULL I give some examples on how NULL is evaluated in Oracle. After talking with Scott, a student who is doing some database work with me this semester I believe I may have a better way of explaining the initially cryptic evaluation of NULL.

NULL in Oracle is essentially considered a non-answer. For example let’s consider this yes/no question:

Are you currently living in the USA?

There are two obvious answers to this question, Yes and No, but we need to be prepared for one more circumstance, a non-answer.

So if you ask me this question and I don’t answer it can you say “Jon is currently living in the USA”? No. Can you say “Jon is not currently living in the USA”? No! We can’t compare against something we don’t know so any comparisons against NULL are treated as false.

To handle these circumstances in Oracle we must use IS NULL and IS NOT NULL to detect these non-answer values. For some examples of this code and more detail on this check out my original article on the topic.

database, database administration, database programming, dba, oracle

Micromanagement

Innovation Creators (which I’ve started reading regularly) has an interesting and broad article about micromanagement. The article touches on micro- versus macro-management in industry, relevance to enterprise blogs and economy.

Having recently suffered through the ultimate micromanagement experience, and now working for a true macromanager (referred to as Theory X and Theory Y managers respectively) this article outlines the differences very well and points to some other interesting resources on the topic.

management, project management, theory x, theory y, cat herding, micromanagement

Changing Video Settings on SunBlade 100

To change the display resolution or refresh rate on a SunBlade 100 or similar Sun hardware isn’t as easy as it sounds. Or at least it’s not obvious. These directions are for an M64 type graphics accelerator. The steps are similar for other Sun graphics accelerators, but the command will be different (maybe ffbconfig). Check your hardware documentation for details.

These coommands should be run as root. I recommend running these commands via ssh from another system. If you accidentally change the resolution to something that is not supported you won’t be able to see so well to change it back.

To change video settings you’ll first want to find out what the card and display are capable of.

m64config -res ?

This will print the resolution and refresh rate options you have. Where three numbers are listed this represents the horizontal and vertical resolution and refresh rate respectively.

The current configuration will be shown with a [3] next to it. Write down the current resolution and refresh rate. There are a lot to choose from and you’ll want to know you can get back to one that works.

Configurations marked with a [2] are not supported by the video card and will probably not work.

To change the settings run this command with the desired resolution/refresh rate. The now forces the system to change these settings immediately rather than at next refresh.

m64config -res 1024x768x75 now

Your monitor should click and flicker and with luck will then come back at the new resolution. If it doesn’t you can change it back to the old settings by running the m64config command with the orignal settings. You did write the old setting down like I told you to right?

solaris, sun, unix, system administration, sysadmin

Getting Hardware Information in Solaris

Here’s a quick way to find out what hardware is installed in your Solaris system, including RAM, CPUs, PCI cards, and external devices. The output will usually include the size of each memory chip in the system.

The one trick to using this command is to make sure you use the backtick instead of a single quote around the uname -i. The backtick is typically shift tilde and forces the command between the backticks to be executed and substituted in to that part of the command.

/usr/platform/`uname -i`/sbin/prtdiag

prtdiag actually displays system diagnostic information. I’ve used this on Solaris 7 through 10. The best parts is you do not even need to be root to execute this.

For more info on prtdiag check out the man page.

solaris, sun, unix, system administration, sysadmin

Oracle Prefers Solaris 10

It looks like Oracle is re-aligning themselves with Sun Solaris as their preferred 64-bit platform. In the March issue of Oracle Magazine they have a short announcement on the topic:

Oracle has chosen the Solaris 10, Sun Microsystems’ multiplatform, open source operating system, as its preferred development and deployment platform for most 64-bit architectures. Solaris 10 will be used throughout Oracle’s development organization, and Oracle will release and ship 64-bit versions of all Oracle products on Solaris prior to, or simultaneously with, release on other operating systems.

Check out the whole article here or sign up to get your free copy of Oracle Magazine.

Thanks to Jon G. for sending this on to me.

oracle, database, database administration, dba, systems administration, sysadmin, solaris, sun, sun microsystems, UNIX, open source, 64-bit