This morning i’ve tried to delete my old 9i local database using oracle’s dbca. Somehow, nothing shown up. So I just open up my command console and dive into the exact folder of the dbca.. thinking maybe oracle is confuse as i have 2 oracle version in my machine..another one is 10g. Ran the dbca.bat and it prompted me this error:

E:\oracle\ora92\bin>dbca
Exception in thread “main” java.lang.UnsatisfiedLinkError: initializeCluster
at oracle.ops.mgmt.nativesystem.WindowsSystem.initializeCluster(WindowsSystem.java:390)
at oracle.ops.mgmt.cluster.GetActiveNodes.initializeCluster(GetActiveNodes.java:260)
at oracle.ops.mgmt.cluster.GetActiveNodes$ClusterWareThread.<init>(Compiled Code)
at oracle.ops.mgmt.cluster.GetActiveNodes.<init>(GetActiveNodes.java:139)
at oracle.ops.mgmt.cluster.GetActiveNodes.create(GetActiveNodes.java:158)
at
at oracle.sysman.assistants.dbca.backend.Host.checkOPS(Host.java:1815)
at oracle.sysman.assistants.dbca.backend.Host.<init>(Host.java:469)
at oracle.sysman.assistants.dbca.ui.UIHost.<init>(UIHost.java:185)
at oracle.sysman.assistants.dbca.ui.InteractiveHost.<init>(InteractiveHost.java:54)
at oracle.sysman.assistants.dbca.Dbca.getHost(Dbca.java:141)
at oracle.sysman.assistants.dbca.Dbca.execute(Dbca.java:85)
at oracle.sysman.assistants.dbca.Dbca.main(Dbca.java:161)

Reading that… never crossed my mind that it has to do with the multiple oracle version in the same machine. Asked my friend (i.e. pakcik google) and it spit out several result and this one fixed my problem.

In the command prompt:

> set PATH=all_my_existing_path_but_without_10G_paths
> dbca

It’s not that often i would drop my db.. so the above should work for now.. no need to change my permanent path as i’m still using my 10G as well

Posted by: azj | May 7, 2007

ERR.150 in MySQL

Have you encounter such error before? I did.. several times. And I fixed it without knowing actually what happened at the back. After some try and error… the error gone and I managed to alter the table. Tonite, it came back.. and I hate when it just saying so few words on something really important..dropping primary key.

After googling on the mySQL dev documentation about foreign key constraints, i had to revisit the primary key and check whether it being used somewhere else. And yes, there is some reference on some other table. So, to fix it… I just remove the key from the ‘child’ table first and then the table that I actually wants (at the first place).

Yeahhh… sukses!!!

Posted by: azj | April 6, 2007

VARRAY in Oracle

Today, I tried using the Oracle’s PL/SQL collection data type called VARRAY. At first, I thought the keyword EXTEND is used once which is before we filled up the array/collection. However, by not defining any parameter to it (which I just discovered) it will only allocate 1 space. So, how should we deal with this if we have so many item to put into the varray??

Browsing the ORACLE’s doc, I found that EXTEND has 3 ways of ‘extending’ the array size:

  • EXTEND appends one null element to a collection.
  • EXTEND(n) appends n null elements to a collection.
  • EXTEND(n,i) appends n copies of the ith element to a collection.

(Taken from the DOC)

So, by right I have to count how many items for this array.. and allocate certain range via EXTEND. Sounds easy. Let’s try…

Posted by: azj | April 5, 2007

Hello World

Setelah sekian lama mencari tempat utk mem’blog’.. akhirnya berjaya jugak menulis first posting kat blog sendiri (tp gune wordpress laa..) .. Anyway, kenapa saya blogging?

  • Saje.. ikut org
  • Nanti kalau interviewer tanya,”Adakah anda ada blog”.. saya bley jawab “YA!!!” hahaha
  • Kecik2 tade diari.. so dah besar ni teringin laaaa
  • Sebab yg penting sekali adalah… saya nak share apa yg saya tahu/belajar/cuba kpd org lain. At the same time, org lain bleh bg feedback on how to improve them (kalau diorg baca blog ni la kan)

Okeh, tamat “Hello World”.

Categories