470,810 Members | 912 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,810 developers. It's quick & easy.

DB2 Image Extenders

Ok, I think I just may be a moron, but where the heck are the Image
extenders found? I've look all around, tried all the DB2 cd's I have,
are they installed by default somewhere? Which install fileset (AIX) are
they part of?
The CD's only show spatial and xml extenders?
Feb 21 '06 #1
8 1950
yoyo wrote:
Ok, I think I just may be a moron, but where the heck are the Image
extenders found? I've look all around, tried all the DB2 cd's I have,
are they installed by default somewhere? Which install fileset (AIX) are
they part of?
The CD's only show spatial and xml extenders?


The AIV webpages state that it is bundled with several editions of DB2. You
happen to have one of those?
http://www-306.ibm.com/software/data...rodbundle.html

Related, but different question: what do you have in mind with this
extender?
You have to remember that it is based on 8-10 year old technology and maybe
this is a better alternative? http://tinyurl.com/q4zpn

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Feb 21 '06 #2
yoyo wrote:
Ok, I think I just may be a moron, but where the heck are the Image
extenders found? I've look all around, tried all the DB2 cd's I have,
are they installed by default somewhere? Which install fileset (AIX) are
they part of?
The CD's only show spatial and xml extenders?

If I'm not mistaken, you have to purchase one of the Developer's
Editions to get the Image Extender (if it still even exists).

Larry Edelstein
Feb 21 '06 #3
Knut Stolze wrote:
yoyo wrote:

Ok, I think I just may be a moron, but where the heck are the Image
extenders found? I've look all around, tried all the DB2 cd's I have,
are they installed by default somewhere? Which install fileset (AIX) are
they part of?
The CD's only show spatial and xml extenders?

The AIV webpages state that it is bundled with several editions of DB2. You
happen to have one of those?
http://www-306.ibm.com/software/data...rodbundle.html

Related, but different question: what do you have in mind with this
extender?
You have to remember that it is based on 8-10 year old technology and maybe
this is a better alternative? http://tinyurl.com/q4zpn


I see that page, I look at my media, and it's not there.
I have every DB2 8.1 & 8.2 edition out there (enterprise is what I have
actually installed). It's not called out on any filesets on any of the
install media.

I've come across that page many times now, nice stuff, but unless I
missed something (and that's possible) it deals with blobs already
existing in the database, which I have yet to accomplish. It doesn't say
anything about how to insert those blobs.

What do I have in mind? Well, since you ask....I want to store an image
from a file into a blob from with php code using odbc. There's known
issues with php&db2 trying to insert and retrieve blob (they both point
the blame on the other and the issue is still open, from 2002). So next
I wanted just to try shell_exec a command line insert to insert a blob
from a file.
It doesn't even have to be a blob, I try to use clob and convert my
image before insert....blah..blah...many tries, mostly ending up with
only 4k of the image coming back out.

I just need to store small thumbnail images in the database. I'm going
crazy here. 2 day on this. 2 DAYS!!!!!!
Is there a better way? I've searched for the last 2 days on this, and
nothing. Everything points to the DB2 image extenders, which I havn't
tried yet.
Feb 21 '06 #4
yoyo wrote:
What do I have in mind? Well, since you ask....I want to store an image
from a file into a blob from with php code using odbc. There's known
issues with php&db2 trying to insert and retrieve blob (they both point
the blame on the other and the issue is still open, from 2002).
You are probably referring to the old odbc-php driver that was used to talk
to DB2. This was not quite acceptable code. For example, there was no
support for LOBs at all. (It is definitively a PHP issue.) You should
rather stick with the newer Zend Core for IBM that handles stuff properly:
http://www-306.ibm.com/software/data/info/zendcore/
So next
I wanted just to try shell_exec a command line insert to insert a blob
from a file.
It doesn't even have to be a blob, I try to use clob and convert my
image before insert....blah..blah...many tries, mostly ending up with
only 4k of the image coming back out.
Those 4K might be the result from the truncation done by the DB2 CLP. The
whole LOB might actually be stored in the row.
Is there a better way? I've searched for the last 2 days on this, and
nothing. Everything points to the DB2 image extenders, which I havn't
tried yet.


Unless you need some sort of image processing, the extender won't help you
either.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Feb 21 '06 #5
Knut Stolze wrote:
yoyo wrote:

What do I have in mind? Well, since you ask....I want to store an image
from a file into a blob from with php code using odbc. There's known
issues with php&db2 trying to insert and retrieve blob (they both point
the blame on the other and the issue is still open, from 2002).

You are probably referring to the old odbc-php driver that was used to talk
to DB2. This was not quite acceptable code. For example, there was no
support for LOBs at all. (It is definitively a PHP issue.) You should
rather stick with the newer Zend Core for IBM that handles stuff properly:
http://www-306.ibm.com/software/data/info/zendcore/

So next
I wanted just to try shell_exec a command line insert to insert a blob
from a file.
It doesn't even have to be a blob, I try to use clob and convert my
image before insert....blah..blah...many tries, mostly ending up with
only 4k of the image coming back out.

Those 4K might be the result from the truncation done by the DB2 CLP. The
whole LOB might actually be stored in the row.

Is there a better way? I've searched for the last 2 days on this, and
nothing. Everything points to the DB2 image extenders, which I havn't
tried yet.

Unless you need some sort of image processing, the extender won't help you
either.


Zend core. There's something I've not come across. I really wonder if it
will help me though, to store that image in a DB2 database.
The UDF I wanted from the image extender is the DB2IMAGE one, which
allows someone to do this from a command line:

insert into mytablewithblobcolum (CHARATT1,BLOBATT2) values
('ken',DB2IMAGE('/tmp/myjpg.jpg','jpg','26k'))

and it's supposed to take that jpeg and put it in your blob column.
If I have a true blob in there, I'm able to get it out with php odbc.
(I had to use the db2 import function to populate something in that
database with a blob though, I really don't want to use that as a
solution however)
I've never had a problem with odbc connector for db2 in php (until now),
been using for 3 years. I didn't even know of the zend core that IBM wrote.
I'll check out the code and see what's there. Is there native support
for blob then???? Hopefully....

Anyway, thatnks for the help, it's hope anyway,

ANy idea where those DB2 IMage extensions are in 8.1 or 2???????

Ken
Feb 21 '06 #6
yoyo wrote:
Knut Stolze wrote:
yoyo wrote:

What do I have in mind? Well, since you ask....I want to store an image
from a file into a blob from with php code using odbc. There's known
issues with php&db2 trying to insert and retrieve blob (they both point
the blame on the other and the issue is still open, from 2002).


You are probably referring to the old odbc-php driver that was used to
talk
to DB2. This was not quite acceptable code. For example, there was no
support for LOBs at all. (It is definitively a PHP issue.) You should
rather stick with the newer Zend Core for IBM that handles stuff
properly:
http://www-306.ibm.com/software/data/info/zendcore/

So next I wanted just to try shell_exec a command line insert to
insert a blob
from a file.
It doesn't even have to be a blob, I try to use clob and convert my
image before insert....blah..blah...many tries, mostly ending up with
only 4k of the image coming back out.


Those 4K might be the result from the truncation done by the DB2 CLP.
The
whole LOB might actually be stored in the row.

Is there a better way? I've searched for the last 2 days on this, and
nothing. Everything points to the DB2 image extenders, which I havn't
tried yet.


Unless you need some sort of image processing, the extender won't help
you
either.


Zend core. There's something I've not come across. I really wonder if it
will help me though, to store that image in a DB2 database.
The UDF I wanted from the image extender is the DB2IMAGE one, which
allows someone to do this from a command line:

insert into mytablewithblobcolum (CHARATT1,BLOBATT2) values
('ken',DB2IMAGE('/tmp/myjpg.jpg','jpg','26k'))

and it's supposed to take that jpeg and put it in your blob column.
If I have a true blob in there, I'm able to get it out with php odbc.
(I had to use the db2 import function to populate something in that
database with a blob though, I really don't want to use that as a
solution however)
I've never had a problem with odbc connector for db2 in php (until now),
been using for 3 years. I didn't even know of the zend core that IBM wrote.
I'll check out the code and see what's there. Is there native support
for blob then???? Hopefully....

Anyway, thatnks for the help, it's hope anyway,

ANy idea where those DB2 IMage extensions are in 8.1 or 2???????

Ken

Watch out for an article on BLOB in PHPs by Helmut Tessarek in the next
issue of php|architect magazine.

Cheers
Sege

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Feb 22 '06 #7
yoyo wrote:
Zend core. There's something I've not come across. I really wonder if it
will help me though, to store that image in a DB2 database.
The UDF I wanted from the image extender is the DB2IMAGE one, which
allows someone to do this from a command line:

insert into mytablewithblobcolum (CHARATT1,BLOBATT2) values
('ken',DB2IMAGE('/tmp/myjpg.jpg','jpg','26k'))

and it's supposed to take that jpeg and put it in your blob column.
To be more precise, it takes an image that resides in a file in the file
system and stores it in the BLOB column. But that BLOB column exists in a
so-called side table and not your normal user table. Only a
reference/handle is stored in the user table.

If you want to go that route, I recommend that you have a look at the
article I cited as the Download includes a UDF "SI_loadImage" that does
exactly what you want with much less overhead. (You can also implement
something like this in Java if you like.)
If I have a true blob in there, I'm able to get it out with php odbc.
(I had to use the db2 import function to populate something in that
database with a blob though, I really don't want to use that as a
solution however)
You don't have to go over the file route. You can directly insert a BLOB
send from the client into the database. Here is a sample PHP script that
does just that:

http://tinyurl.com/r3oqg

Note that the script is still based on the old PHP ODBC driver, but that
driver was heavily modified.

And here is a script to extract BLOBs and send them (as PDF) to the client:
http://tinyurl.com/odcwf
I've never had a problem with odbc connector for db2 in php (until now),
been using for 3 years. I didn't even know of the zend core that IBM
wrote. I'll check out the code and see what's there. Is there native
support for blob then???? Hopefully....


Yes, BLOB support is there (besides that a lot of other bugs don't exist
there).

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Feb 22 '06 #8
Knut Stolze wrote:
yoyo wrote:

Zend core. There's something I've not come across. I really wonder if it
will help me though, to store that image in a DB2 database.
The UDF I wanted from the image extender is the DB2IMAGE one, which
allows someone to do this from a command line:

insert into mytablewithblobcolum (CHARATT1,BLOBATT2) values
('ken',DB2IMAGE('/tmp/myjpg.jpg','jpg','26k'))

and it's supposed to take that jpeg and put it in your blob column.

To be more precise, it takes an image that resides in a file in the file
system and stores it in the BLOB column. But that BLOB column exists in a
so-called side table and not your normal user table. Only a
reference/handle is stored in the user table.

If you want to go that route, I recommend that you have a look at the
article I cited as the Download includes a UDF "SI_loadImage" that does
exactly what you want with much less overhead. (You can also implement
something like this in Java if you like.)

If I have a true blob in there, I'm able to get it out with php odbc.
(I had to use the db2 import function to populate something in that
database with a blob though, I really don't want to use that as a
solution however)

You don't have to go over the file route. You can directly insert a BLOB
send from the client into the database. Here is a sample PHP script that
does just that:

http://tinyurl.com/r3oqg

Note that the script is still based on the old PHP ODBC driver, but that
driver was heavily modified.

And here is a script to extract BLOBs and send them (as PDF) to the client:
http://tinyurl.com/odcwf

I've never had a problem with odbc connector for db2 in php (until now),
been using for 3 years. I didn't even know of the zend core that IBM
wrote. I'll check out the code and see what's there. Is there native
support for blob then???? Hopefully....

Yes, BLOB support is there (besides that a lot of other bugs don't exist
there).


Hey, thanks alot for those. That really helps! I've been playing with
the driver too, mabey I can get it to work.. I've checked out the Zend
core for IBM as well, looks nice, but in order for me to use I need to
change alot of things etc....I'll try it on my next project.
Feb 22 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by wayne mcfadden | last post: by
3 posts views Thread by Rolf Schuster | last post: by
2 posts views Thread by Vavel | last post: by
reply views Thread by Allan Ebdrup | last post: by
4 posts views Thread by satish mullapudi | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.