Mittwoch, 30. Juli 2008

Logitech Harmony Remote

Recently I was so bored by all the different remotes for all different devices laying around, I went off to my next store and bought a Logitech Harmony Remote 555. It's a quite nice device and helped me to put away all other remotes by programming this one.
Like all devices, there is also here a negative point: The Software on my PowerBook didn't start, it just complained: The application configuration was not loaded. Reinstall the software or contact customer service.
The problem is based on the case sensitive filesystem and as I doesn#t want to change my entire Harddisk into a case insensitive one, I followed the hint from the forum:
  • create a disk image with 'disk utility', make sure it's not case sensitive. About 100 megabyte is enough

  • move the '/Applications/remotecore.app' and '/Applications/Logitech Harmony Remote Software.app' applications to that disk image

  • create a symbolic link of remotecore.app to '/Applications/remotecore.app'
    So if you mounted your created volume 'Logitech' you can create a symbolic link with:
    $ ln -s /Volumes/Logitech/remotecore.app /Applications/remotecore.app

  • make sure the image is mounted and start the 'Logitech Harmony Remote Software' located in that created volume.

Update:
Version 7.5 is out, and it works well so far. (just tested minimal)

Dienstag, 29. Juli 2008

TimeMachine for windows

I love my Mac, and I like TimeMachine as the best new feature (I use) from Leopard.
I also searched for such a solution for Windows (e.g. for my parents or my sisters laptop).
My search has an end, I found rsyncbackup.vbs from heise.de.
I know, it's not a solution, jus a script. but I'm sure, I can adapt it a little bit, so it would be useable for my family (e.g.: in startup-script, check if target-disk is available, etc.)
We will see...

Sonntag, 27. Juli 2008

Oracle Server Architecture - pdf

I've found a nice PDF (created by Lars Ditzel) which describes an Oracle Server from a file/process and memory point of view.
even it's not that new, it's more or less correct.
(maybe I will try to find the deltas to a current 11g instance with all its flavours)

Freitag, 25. Juli 2008

DBAs little helper

You might know this situation: Your users call and complain, the DB is hanging. While trying to connect (and making plans what to check first, sessions, waits, locks, ...) you do not get any prompt. Ok, there would be a lot of things you get in mind to check, analyze and then fix. But in fact, the users want their connections back, don't care about current open sessions and just ask to reboot the instance.
Even reboot is not that simple in this situation (have I mentioned the missing prompt in sql*plus?). So the next way is to try kill on os-level (which doesn't do anything at the end, as the process seems to wait for something on OS). A much more entertaining way is kill -9. I hope, if I kill a vital kernel process, the others will do the cleanup and close everything the best way they can (similar to a shutdown abort). But even this doesn't happen. The others are hanging around and doing nothing. At the end I have to kill all processes using -9.
There is just one more thing to do: startup. but, unfortunately, at the login there is one thing missing: 'Connecting to an idle instance' - and a 'startup' just hangs.
Why? Because no one did the cleanup! Do you remember the kill -9 of all, also the last background process? Doing so, I did not gave any process the chance to release the semaphore and the shared memory segments. They are just hanging around. Even no one uses them, sqlplus belives because they exists, there is a running system. So it connects to them, sends messages, but noone ever listens. this makes this sqlplus-instance also hanging.
How can i do the cleanup manually?
The old way, back in those days, when Versions did not contain characters like i or g, is to search all other instances for their ressources using oradebug ipc, and afterwards removing them with ipcs. If anything went wrong - another DB crashed very beautiful and interresting.
The new way, introduced in this millenium, is sysresv, which you can find in $ORACLE_HOME/bin. With this, you can show the semaphor and shared memory segments used by your current os-user, $ORACLE_HOME and $ORACLE_SID (or for multiple SIDs). It can also release the ressources for a given SID. This makes live much easier and more secure in situations like shown above.
I doesn't know why Oracle doesn't mention this binary in its documentation.

Freitag, 18. Juli 2008

Oracle Performance books

I got 2 new books:
Cost-Based Oracle Fundamentals by Jonathan Lewis (ISBN:1-59059-636-6)
and
Troubleshooting Oracle Performance by Christian Antognini (ISBN:1-59059-917-9)
Both are worth reading.
I will try to read and understand both of them.
Maybe I will reproduce some of their tests and will try to do my own, and maybe maybe I will post the results here ;-)

Donnerstag, 17. Juli 2008

interpreting CDP packages (the ugly way)

today I had to interpret CDP packages on our network.
I'm no shell-coder, but sometimes I'm curious and in such situations this script will come out.
In this particular case its output just gives the Switchname, Switchport, VLAN and Duplex settings, but everyone who wants can do a lot more (and better).
the script itselve:
#!/usr/bin/bash

snoopfile="/tmp/snoopy$$.bin"
snoopline="/tmp/snoopy$$.line"
snoop -d $1 -c 1 -vv  -o $snoopfile 'dst 01:00:0c:cc:cc:cc and length > 50'
snoop -i $snoopfile  -x 26 | nawk -F: ' { print $2 } ' | \
cut -b1-41|  sed -e 's/ //g' | nawk 'BEGIN { ORS="" } { print $1 } ' | \
tr [a-z] [A-Z] > $snoopline
instr=`cat $snoopline`
while  [ $instr ]
do
typ=`echo $instr | cut -b1-4`
lhex=`echo $instr | cut -b5-8`
length=$(echo "ibase=16; $lhex*2" | bc)
next=$(echo "ibase=16; $lhex*2+1" | bc)
if [ $length -gt 8 ]
then
texthex=`echo $instr | cut -b9-$length`
else
texthex=""
fi
#  echo "$typ $lhex $texthex"
if [ $typ == "0001" ]
then
printf "Switchname: "
while  [ $texthex ]
do
charhex=`echo $texthex | cut -b1-2`
chardec=$(echo "ibase=16; $charhex" | bc)
printf "%b" `printf '\x%x' $chardec 2>/dev/null`
texthex=`echo $texthex | cut -b3-`
done
echo " "
fi
if [ $typ == "0003" ]
then
printf "Switchport: "
while  [ $texthex ]
do
charhex=`echo $texthex | cut -b1-2`
chardec=$(echo "ibase=16; $charhex" | bc)
printf "%b" `printf '\x%x' $chardec 2>/dev/null`
texthex=`echo $texthex | cut -b3-`
done
echo " "
fi
if [ $typ == "000A" ]
then
echo "VLAN: 0x$texthex $(echo "ibase=16; $texthex" | bc)"
fi
if [ $typ == "000B" ]
then
echo "Duplex: $texthex"
fi
instr=`echo $instr | cut -b$next-`
done
rm $snoopfile $snoopline
Sorry for the line-breaks - you will have to reformat it a little bit (cut, paste & think).

OCM with or without proxy settings

I tried to install and customize OCM version 10.3.

Installation was quite easy on our development system.
Just as I tried to create a response-file (using emocmrsp) for our test and production-systems, I noticed I cannot add proxy-settings to this.

I have to notice the ability to connect directly to *.oracle.com from this development server.

After some searching I created SR:6969566.993 and got the answer:
Starting with OCM 10.3 setupCCR , configCCR and emocmrsp commands does not include a parameter to specify a proxy server and port. However, If the systems these commands run on does not have direct Internet access then you will be automatically prompted to enter the proxy information. So in case you run emocmrsp on a system that does not have direct Internet access then you will be prompted to enter the proxy information and that will be recorded in the responce file also. If now there is no Internet access then you can enter the word NONE when prompted for a proxy and that will instrall it in disconnected mode.

This is a little bit boring, as I will not run a configuration tool on a Prod-Env, but cannot create a working response-file on my development-node.

I created an Enhancement Request BUG:7258715 enable emocmrsp to add proxy-settings to response-file in any case

Dienstag, 15. Juli 2008

Shadow process leak on ASM instance when diskspace exhausted (ORA-20)

Once again one of 'my' bugs:
Facts:
  • 10.2.0.3
  • HP-UX
  • archive_log_dest in ASM
  • ASM-Diksgroup full
Symptoms:
  • ORA-20
  • archivelogs doesn't get archived, even the whole backup-subsystem works properly.
Explanation:
If the DG is full he database will try to connect to ASM for every retry of archiver to create archivelog. Even after the attempt to create archivelog fails, this process is not closed.
This will eat up all 'processes' in ASM, so also the DB-process which tries to backup (and delete) the archivelogs can not connect to ASM.
Even if you freed up space in the ASM-DG in the meantime, this problem still persists.

WorkAround:
find OS-process of archiver (ps -ef | grep arc | grep $ORACLE_SID) and kill this process. this will also release all its childs (which holds processes in ASM) and solve the problem.

Reproduce:
  1. fill up your diskGroup
  2. force archiver to respawn a lot of processes (alter system archive log current;) or wait at least for the factor of the REOPEN parameter of your log_archive_dest_x multiplied with PROCESSES from your ASM.
  3. check if there are no more ASM-processes available (e.g. a select name, free_mb from v$asm_diskgroup; will return no rows selected even there are diskgroups available and in use!)
  4. free some space in the DiskGroup
  5. check again if there are ASM-processes available
  6. kill archiver
  7. check again

The good newas after all: there is no corruption, just a ugly hang situation.

Montag, 14. Juli 2008

10g RDBMS vs. 11g ASM

I tried to create a small test-env to compare oracle 10G and 11G.
My setup:
11G ASM (11.1.0.6)
11G DB (11.1.0.6)
10G DB (10.2.0.4)

Both DBs a re using their own DiskGroup within ASM, called according to their SID.

now at the 'CREATE DATABASE' i get:
ORA-00200: control file could not be created
ORA-00202: control file: '+TEST10G_DG'
ORA-17502: ksfdcre:4 Failed to create file +TEST10G_DG
ORA-15001: diskgroup "TEST10G_DG" does not exist or is not mounted
ORA-15204: database version 10.2.0.3.0 is incompatible with diskgroup TEST10G_DG

I also checked the Known Issues from 10.2.0.4 Patch Set - Availability and Known Issues, but with no results.

Once again, this leads to a new ServiceRequest (only visible for my CSI - sorry).

Reason/Solution:

dbca sets 'compatible=10.2.0.3' in the init.ora it uses to create the DB. this was the source of the problem.
By changing this Value to 10.2.0.4, everything is fine now.

Freitag, 11. Juli 2008

ASM doesn't see block devices any longer since 10.2.0.4

according to BUG:7120987 - base.BUG:6454631 from Version 10.2.0.4 onwards ASM does no longer see any block devices. I also tested and reproduced this in 11.1.0.6. Use character devices instead.
Only on Linux, you can still use block devices.
this doesn't seem to be rated as bug, more a kind of feature. so don't expect this to change back again.
This is also described in Note:601591.1 - After Upgrading to 10.2.0.4 or 11.1.0.6 Unable to discover disks using block devices
and marked as expected behavior.

Oracle SIB

I found an intresting SIB in Oracle clusterware.
Why SIB? IT's not a BUG, it's not a Docu-BUG, nevertheless it's not working and I'm advised to use my WorkAround ( a simple patch to some files). So it must be SomethingInBetween. I wasn't aware Oracle has such a status, but yes, it's there.

Summary:
On an Oracle- RAC Cluster on Solaris, you can not bring up a VIP on an interface, if you can not reach the default-GW via this interface. (If there is enough traffic on that network, it might or might not work, depending on the traffic during the probe-phase).

The problem is based on the way oracle checks if the interface is healthy: it first checks the packages in/out on that If, then tries to create some network-traffic using ping -I (Linux) or ping -i (solaris) and checks the packages again. If the numbers differ, it assumes the interface is good.

Unfortunately the -I (Linux) and -i (Solaris) differ a little bit:

Linux:
-I interface address
Set source address to specified interface address. Argument may be numeric IP address or name of device. When pinging IPv6 link-local address this option is required.

Solaris:
-i interface_address
Specify the outgoing interface address to use for multicast packets for IPv4 and both multicast and unicast packets for IPv6. The default interface address for multicastpackets is determined from the (unicast) routing tables.
interface_address can be a literal IP address, for example, 10.123.100.99, or an interface name, for example, eri0, or an interface index, for example 2.

Links:
my BUG:6839000 - Status: Not a Bug. To Filer - Base BUG:6332776 - Status: Closed, Not a Bug
my enhancement-request:6969925- not published - Status-code 15 (To Internal (Oracle) Review)