tags:

views:

109

answers:

1

How, in Informix IDS 11.5, do I determine in which SmartLob space does a BLOB reside?

So really it's two questions:

  1. How can I get something like the dbschema command to produce the PUT clause.
  2. How can I find from which sblobspace did a particular SmartLOB come from?
+1  A: 

The answer to the DB-Schema (first) question is "with the '-ss' option", where 'ss' is mnemonic for 'server-specific'. This will include the data specific to IDS, such as the PUT clause.

The counter-question for the blobspace (second) question is:

  • Why do you think it matters which blobspace the blob comes from?

For an individual smart blob, you can find out which blob space a specific smart blob is stored in as long as you are using ESQL/C or one of the related C-based APIs. The function to do this is ifx_lo_specget_sbspace(), and it is documented in the ESQL/C manual.

I don't know of an SQL-based way of determining the smart blobspace that holds a particular blob.

Jonathan Leffler
I'm not sure that it matters to me; but can't the table be altered to start putting blobs in a different space? I really asked in anticipation of questions from my employer.
hometoast
Yes, the table can be altered to put blobs in different smart blob spaces.
Jonathan Leffler
Wanted to add we recently installed this (http://www.ibm.com/developerworks/data/zones/informix/library/techarticle/db_sblob.html#SblobSbspace) module and it'll tell you where a blob resides.
hometoast