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:~> »
Archive for June, 2009
Range scans when using VARCHAR2 instead of NUMBER
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... »
Do we actually use characters that require more than one byte?
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) { ... »
Space used with a multi-byte database characterset
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... »
Who’s blocking my java?
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... »
Renaming an ASM diskgroup in 10g
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... »
Using v$sql_bind_capture
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... »
Manually adding a component to the OCR
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... »
Migrating from raw devices to ASMLIB
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... »