Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Syed Hussaini on IDS 12.10.FC10 could not tell where dbspaces, chunks and the physical log lived. Khaled Bentebal and Art Kagel pointed to onstat -d and sysmaster sysdbspaces/syschunks. Art said the physical log location appears as phybegin in onstat -l (dbspace number and page). Jacob Salomon suggested ls -L on chunk paths to resolve symlinks. Syed was still working on it.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Syed Hussaini — source: IBM Community (ConnectedCommunity.org) Informix forum
Hi DBAs,
We have legacy Informix database and I am unable to figure out dbspaces & their respective chunk names along with full pathname.
Please help me with a query to find the above or any onstat command.
Thanks in advance.
Syed
------------------------------
Syed Hussaini
------------------------------
↪ replying to Syed Hussaini
khaled Bentebal — source: IBM Community (ConnectedCommunity.org) Informix forum
Hi Syed,
You can use
onstat -dto get the list of
dbspaces
and
chunks
associated with each dbspace (the
chunk/dbs
column shows the chunk number and its corresponding dbspace, the
pathname
show the name of the chunk, the
flags
column shows the flags of the chunk (Primary, Mirror, Online or Down chunk, etc), etc).
Check the documentation for all of the flags and other information you might need.
You can also query the tables
sysdbspaces
and
syschunks
in the
sysmaster
database and perform a join between them to get what you want.
Cordialement, Regards, Khaled Bentebal Email:
khaled.bentebal@consult-ix.fr
Site Web:
www.consult-ix.fr
Le 05/11/2024 à 18:18, Syed Hussaini via IBM TechXchange Community a écrit :
↪ replying to Syed Hussaini
Art Kagel — source: IBM Community (ConnectedCommunity.org) Informix forum
Syed:
You can use:
onstat -dThat will show you your dbspaces as well as the chunk paths. Each chunk entry in the report will include the dbsnum (dbspace number) to which it belongs as well and the chunk number of the next chunk in the dbspace if any. The dbspace report line will contain the number of chunks belonging to each dbspace as well as the chunk number of the first chunk in that dbspace's list.
If you want to use queries against the sysmaster database, look at the sysdbspaces table and the syschunks table in that database. They are linked by dbsnum.
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
↪ replying to Art Kagel
Syed Hussaini — source: IBM Community (ConnectedCommunity.org) Informix forum
Thanks Art & Khaled. After your reply I checked onstat -d & ran through both sys tables and can figure out rootdbs and logical log dbspaces/files. But still dont know where physical log dbspace/file reside. Is there a way to figure out this. Thanks again.
IBM Informix Dynamic Server Version 12.10.FC10 -- On-Line -- Up 22 days 04:03:54 -- 1648880 KbytesDbspaces
address number flags fchunk nchunks pgsize flags owner name
80619028 1 0x40001 1 2 4096 N BA informix rootdbs
818db260 2 0x40001 2 1 4096 N BA informix tmslogdb
818db4a0 3 0x40001 3 2 4096 N BA informix tmtabdb1
818db6e0 4 0x40001 4 1 4096 N BA informix tmtabdb2
818db920 5 0x40001 5 6 4096 N BA informix tmtabdb3
818dbb60 6 0x40001 6 5 4096 N BA informix tmtabdb4
818dbda0 7 0x40001 7 4 4096 N BA informix tmtabdb5
818de028 8 0x40001 8 1 4096 N BA informix tmtabdb6
------------------------------
Syed Hussaini
------------------------------
↪ replying to Syed Hussaini
Art Kagel — source: IBM Community (ConnectedCommunity.org) Informix forum
Sayed:
Yes. If you did not create a PLOG type dbspace specifically for it (a v14.10 feature, so that's a no), then it MAY be in the rootdbs or somewhere else. If you run onstat -l and look at the address of the physical log in the top section of the report, you will see the dbspace number:
Physical Logging
Buffer bufused bufsize numpages numwrits pages/io
P-2 0 2048 25840 351 73.62
phybegin physize phypos phyused %used
2
:53 32715 7588 0 0.00
Logical Logging
See the "phybegin" entry. That is showing that the physical log starts on page 53 or dbspace #2 on my system.
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
↪ replying to Syed Hussaini
Jacob Salomon — source: IBM Community (ConnectedCommunity.org) Informix forum
Syed,
Quite some years ago I posted a shell archive containing the Perl module DBspaces.pm and a few utilities to go with it. Separately I posted the Perl utility chunk-path.pl. (Why didn't I include that in the .shar? <face-palm>) And it requires another Perl module, UNLreport.pm, which produces nice column output.
It would be silly for me to suggest you download & install all of this just for a nice listing, unless you are a fellow Perl hack [wannabe]. However, using onstat -d as a starting point (as Art and Khaled have suggested), you might take the last column of the output of the chunks section and, in a shell loop, run
ls -L
on each path to get where the symlink is pointing to. This is essentially what chunk-path does.
Good luck!
------------------------------
Jacob Salomon
---
Nobody goes there anymore, it's too crowded. --Attr: Yogi Berra
------------------------------
↪ replying to Jacob Salomon
Syed Hussaini — source: IBM Community (ConnectedCommunity.org) Informix forum
Thanks Jacob for reply. Let me check if I can work on that. For now I am asked to spin up new instance based on this instance and needed this info quickly
------------------------------
Syed Hussaini
------------------------------
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.