Archive for June, 2009

Processor architecture

Monday, June 29th, 2009

oracle@kcdb01:~> echo “You have $(cat /proc/cpuinfo | grep “physical id” | sort -u | wc -l) $(cat /proc/cpuinfo | grep cores | head -1 | awk ‘{print $4}’) core processors” You have 2 4 core processors oracle@kcdb01:~> »

Posted in Linux | No Comments »

Range scans when using VARCHAR2 instead of NUMBER

Friday, June 26th, 2009

I was a little surprised today when another DBA did not know the effect of using a VARCHAR2 datatype for what is functionally a number.  I wanted to ensure I had an article to which I could point when this question comes up in the future, so here it is. A VARCHAR2 that functions... »

Posted in Oracle, Performance | No Comments »

Do we actually use characters that require more than one byte?

Thursday, June 25th, 2009

I couldn’t find a way to identify those columns that actually had a character with a code point value greater than 255. As a result, I ended up writing the following. If you have better way, please reply. import java.sql.*; public class checkUnicode { public static void main(String args) { ... »

Posted in Java, Oracle | No Comments »

Space used with a multi-byte database characterset

Wednesday, June 24th, 2009

We found our database was using a lot more space than when we issued a select dbms_lob.getlength() on CLOB columns. We found our issue was that our database characterset is AL32UTF8, so everything requires more space. To test this, we first insert a row into each database and then dump the block on which... »

Posted in Oracle | No Comments »

Who’s blocking my java?

Saturday, June 20th, 2009

Hanging java applications can be a system architects worst nightmare. There are so many pieces in the stack, finding where the true issue lies can be a daunting task. Fortunately, you can dump all threads in a JVM to see where it may be hanging. DBA’s specifically should be able to... »

Posted in Java | No Comments »

Renaming an ASM diskgroup in 10g

Wednesday, June 17th, 2009

Since their is no “alter diskgroup rename” command, I tried this on a test system and it works.  Pretty cool, but this not even remotely supported by oracle, so use at your own risk With everything down… cd $ORACLE_HOME/rdbms/lib make -f ins_rdbms.mk ikfed for f in $(ls /dev/raw/raw* | grep -v rawctl); do echo "Processing... »

Posted in Oracle | No Comments »

Using v$sql_bind_capture

Monday, June 15th, 2009

This is a very useful view in 10g. When a user came to me with a performance problem, I used to find myself asking, “What value did you use for the search?”. Not very professional, although it could work. I would also set system 10046 trace and then grep for the... »

Posted in Oracle, Performance | No Comments »

Manually adding a component to the OCR

Sunday, June 7th, 2009

If for whatever reason you need to add a component to the OCR, and the corresponding GUI is not cooperating, you can manually add it. This afternoon, I had to add a new node to a cluster. When I tried to add the listener on the new node, netca kept complaining about... »

Posted in Oracle, RAC | No Comments »

Migrating from raw devices to ASMLIB

Sunday, June 7th, 2009

Oracle’s Automatic Storage Management (ASM) technology was introduced with releases 10.1 of its flagship database product. It was designed to remove from the database administrator’s task list the need to decide on which disks to place which datafiles. It is effectively a database aware logical volume manager. The database administrator provides disk to... »

Posted in Oracle | No Comments »

Switch to our mobile site