Smart Blob Metadata Queries?
Posted in 2020
Art Kagel asked how to query an sbspace's metadata defaults via SQL or UDR rather than onstat -g smb, to improve myschema output. Brian Hughes suggested the Admin API task('onstat'), which still needs parsing. SangGyu Jeong linked it to sysmaster:sysdbstab.sbcflag. Vicente Salvador Cubedo gave an undocumented bitval query showing the logging (0x01) and keep-access-time (0x08) flags.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Topics: Storage & Space Management
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
------------------------------
#Informix
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 KbytesSbspace Summary:
sbnum 2 address 452e1340
Space : flags nchk owner sbname
-------- 1 informix sbspace1
Defaults :
...
------------------------------
Brian Hughes
------------------------------
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
www.askdbmgt.com
Blog:
http://informix-myview.blogspot.com/
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.
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
------------------------------
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 www.askdbmgt.com Blog: http://informix-myview.blogspot.com/ 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.
undocumented,but you can use this:
select name[1,18], sbcflag, hex(sbcflag), bitval(sbcflag, '0x00001') is_log, bitval(sbcflag, '0x08') keep_access from sysdbstab where sbcflag != 0
If 0, then it means nolog and no_keepaccesstime
------------------------------
Vicente Salvador Cubedo
------------------------------
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
www.askdbmgt.com
Blog:
http://informix-myview.blogspot.com/
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.
Original Message:
Sent: 6/3/2020 6:19:00 PM
From: SangGyu Jeong
Subject: RE: Smart Blob Metadata Queries?
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
------------------------------
Thanks Vicente! Art ------------------------------ Art S. Kagel, President and Principal Consultant ASK Database Management Corp. www.askdbmgt.com ------------------------------
@Vicente Salvador Cubedo Thanks for the information! ------------------------------ SangGyu Jeong Software Engineer Infrasoft Korea, Republic of ------------------------------
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g