Where are my (simple) BLOBS, really?
Posted in 2006
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML DIR=ltr><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"></HEAD><BODY><DIV><FONT face="Courier New" color=#000000 size=2>Environment: HP_UX 11.11 IDS
10.00.FC4X2</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>--</FONT></DIV>
<DIV><FONT face="Courier New" color=#000000 size=2></FONT> </DIV>
<DIV><FONT face="Courier New" color=#000000 size=2>I have a need (HDR) to
re-attach my TEXT/BYTE blobs to my tables.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>I have a new 6K bufferpool for those few
tables affected, to minimize the impact of now passing the logs through the
buffers.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>After recreating the tables, a 'dbschema'
seems to show the blob column is with/IN the table, as in:</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>---------------------------</FONT></DIV>
<DIV><FONT face="Courier New" size=2>create table "dba".document_dot<BR>
(<BR> document_dot_type char(1) not null
,<BR> document_dot_path varchar(255),<BR>
blob_original_size integer,<BR> document_dot_blob
byte, --- THIS INDICATES 'IN TABLE', YES?<BR><snip
columns></FONT></DIV>
<DIV><FONT face="Courier New" size=2> check (document_dot_type
IN ('A' ,'B' ,'P' ,'T' )) constraint
"dba".c_document_dot_document_dot_type<BR> ) in
cais_attached_blobspace extent size 512 next size 64 lock mode
row;<BR>
<DIV><FONT face="Courier New" size=2>---------------------------</FONT></DIV>
<DIV> </DIV></FONT></DIV>
<DIV><FONT face="Courier New" size=2>My new dbspace, with the 6K pages, is
"cais_attached_blobspace".</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>However, when I run the following
query:</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>----------------------</FONT></DIV>
<DIV><FONT face="Courier New" size=2>SELECT TRIM(systables.tabname) || "." ||
TRIM(syscolumns.colname) ||<BR>CASE<BR>WHEN syscolumns.coltype = 11<BR>THEN "
BYTE "<BR>WHEN syscolumns.coltype = 12<BR>THEN " TEXT "<BR>END<BR>|| " IN " ||
sysblobs.spacename<BR>FROM systables, syscolumns, sysblobs WHERE systables.tabid
> 99<BR>AND<BR>systables.tabid = sysblobs.tabid<BR>AND<BR>systables.tabid =
syscolumns.tabid<BR>AND<BR>syscolumns.colno = sysblobs.colno<BR>ORDER BY
1<BR>----------------------</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>I get the following:</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV>(expression) document_dot.document_dot_blob BYTE IN
caisdbs1</DIV>
<DIV> </DIV>
<DIV>(or more directly:)</DIV>
<DIV>
<DIV>UNLOAD to "whats_up" select * from sysblobs where tabid IN (select tabid
from systables where tabname = "document_dot");<BR>--</DIV>
<DIV>>cat whats_up</DIV>
<DIV> </DIV>
<DIV>caisdbs1|M1439|4|</DIV>
<DIV><BR> </DIV></DIV>
<DIV> </DIV>
<DIV><FONT face="Courier New" size=2>caisdbs1 is the dbspace in which the
database was initially created.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Where is my blob, really? It still
appears to be detached, and, I suspect, will still not replicate. My
detached blobs show as being where I expect them to be.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>I have been searching the Info Center, but
see nothing that would explain what I am seeing.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>--</FONT></DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV> </DIV>
<DIV>Schuyler Southwell</DIV>
<DIV>Software Engineer, Consulting</DIV>
<DIV>Maricopa County Attorney's Office</DIV>
<DIV>Phoenix, AZ 85003</DIV>
<DIV>tel: 602 506 8107</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face="Courier New" size=2></FONT><FONT face="Courier New"
size=2> </DIV></FONT>
<DIV><FONT face="Courier New" size=2> </DIV></FONT></BODY></HTML>