I'm not overly conversant with DB2, however if it runs on a 'server' (as i assume it must, like mysql does) then it'll be just a case of finding the protocol to connect/exchange data via mIRC sockets.
However, if your intension is to use mIRC to gather information for use on a website, your best bet, would probably be scrap mIRC scripting and go for PHP or another language that supports (java does) sockets, and use that to connect to IRC and join a channel, and then grab/parse the information.
Eamonn.