Oracle 9 restart on solaris

I spent quite a time searching for a way to restart an oracle server yesterday… without being root.

For the record, here is what I did:

Start the listener:

/home/ORACLE/product/9.2.0/bin/lsnrctl start

Start the instance:

sqlplus /nolog
SQL> conn /AS sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.

I checked that it runs via :

ps -ef |grep smon
myUser 25942     1  0 16:24:48 ?        0:00 ora_smon_NAMEOFTABLESPACE
myUser 26297  9609  0 16:31:14 pts/4    0:00 grep smon

OS x trace utilities

Skype is spying us: the proof in this Interresting post (in french) explaining how to track system calls under linux made by a specific program.

Instructions use strace command (which can be replaced by ktrace -p process_id under os x).

In case you use ktrace, you may use kdump to parse the resulting log file.

To stop ktrace, either kill the attached process or use ktrace -C to stop all traces.

Ultimate find…

You have got a directory and subdirectories full of jar/zip files and you would like to know which one contains the requested “Message” class … and avoid decompiling everything…

for i in `find . -name "*.jar"; find . -name "*.zip"`;
  do r=`jar -tvf $i | grep "Message"`;
    if [ "$r" != "" ]; then echo "Class found in $i";
    else echo "Not found in $i";

Thank you Gabriel…

Model driven development…

A pilot project, which has been required to use Model Driven Development principles has just launched at my work. So here comes a quick gathering of information on the subject.

Tools for UML2 modeling

UML2 model native via EMF in eclipse: Exports the models in the XMI format but model is displayed as trees.

We need to use topcased (open source) or other proprietary software to provide graphical editing of the model. This french project, that just reached version 2 seems very active at the moment.

Disable spotlight indexing on a external drive (Tiger)

I do not want Mac OSX to index my backup drive (FAT32), so I just added a .metadata_never_index file at the top level directory of the volume.

original article on macosxhints

Find and move old files

A very simple script to find all files modified within the 60 last days and move them to a specific directory.

find . -type f -mtime -60 | xargs -i  cp {} /tmp/archiveCopy/

Note the sign in front of 60. Without it, we would only retrieve the files modified 60 day ago. We could use + to retrieve files modified before this date.

Selenium limits

I am planning to rewrite a set of web pages. Theses pages are inked together in a pretty complex way and, I am in big fear of breaking everything. I want to be sure that all inter-pages links are preserved.

So I am using selenium, to record several navigation scenario on the current set of pages. The selenium IDE is a Firefox that works pretty well. The scenario recording is almost done by clicking through the webpages.

However, after trying it for a few hours, several limitations appear:

– does not locate new windows very well (I have difficulties with links that open in target=blank)

– I still did not manage to test that a link to file works (our pages hosts a lot of PDF files the users should download and I would like to test their availability).