Informix

nested-group-icon.png

DB2

Expand all | Collapse all

Smart Blob Metadata Queries?

  • 1.  Smart Blob Metadata Queries?

    Posted Mon June 01, 2020 03:49 PM
    Can anyone let me know how to determine the metadata defaults for an SBSpace in code? I know that I can get that from "onstat -g smb" but I want to be able to query the info using SQL or UDR API functions. Anyone?


    ------------------------------
    Art Kagel
    ------------------------------


  • 2.  RE: Smart Blob Metadata Queries?

    Posted Wed June 03, 2020 08:54 AM
    You can use the ADMIN API to execute the onstat command.  It's the same text output so it would still need to be parsed.

    https://www.ibm.com/support/knowledgecenter/en/SSGU8G_14.1.0/com.ibm.adref.doc/ids_sapi_154.htm


    echo "execute function task('onstat', '-g smb s')" | dbaccess sysadmin

    Database selected.

    (expression)
    IBM Informix Dynamic Server Version 14.10.FC3DE -- On-Line -- Up
    12 days 15:10:47 -- 172852 Kbytes

    Sbspace Summary:

    sbnum 2 address 452e1340
    Space : flags nchk owner sbname
    -------- 1 informix sbspace1
    Defaults :
    ...

    ------------------------------
    Brian Hughes
    ------------------------------



  • 3.  RE: Smart Blob Metadata Queries?

    Posted Wed June 03, 2020 09:32 AM
    Brian:

    Thanks. However, not easy to parse onstat output in an ESQL/C program.

    What I am trying to do is improve the myschema --infrastructure=cmd output to accurately recreate the smart blobspaces. Dbschema -c -ns does not do this either. Currently neither dbschema nor myschema generate the -Mo offset not the -Df default options that were used to create the original sbspace because those details are not presented in sysmaster! If there are binary flags in the reserved pages of the sbspace, that onstat is accessing, that's good for me, I can do that as well. I just need to know where to find the info.

    While we're at it, dbschema -c -ns also doesn't correctly generate the -u option for unencrypted dbspaces (myschema does B^) )!

    Anyway, even if I can't "fix" myschema, if onstat can get the info, then dbschema ought to be able to as well!

    Art

    Art S. Kagel, President and Principal Consultant
    ASK Database Management


    Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference.  Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.








  • 4.  RE: Smart Blob Metadata Queries?

    Posted Wed June 03, 2020 06:19 PM
    Hi Art,

    In the results of the onstat -g smb s command, the defaults value for sbspace seems to be related to the sbcflag column in the sysmaster:sysdbstab table.

    After several changes to the default list with the onspaces -ch option, I can see that the sbcflag value changes.

    However, the flag value corresponding to the default option is not documented, so it is questionable whether it can be defined accurately.

    ------------------------------
    SangGyu Jeong
    Software Engineer
    Infrasoft
    Seoul Korea, Republic of
    ------------------------------



  • 5.  RE: Smart Blob Metadata Queries?

    Posted Wed June 03, 2020 06:39 PM
    Thanks SangGyu. I had looked at that briefly but hadn't seen a correlation. I will play with that some more and see what I can figure out.

    Art

    Art S. Kagel, President and Principal Consultant
    ASK Database Management


    Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference.  Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.