We all know that Informix needs a log, but what each log does, what it means, and so on, we do a discussion below:
The first thing to note is that there are two types of Informix logs: One is the physical log, which holds the image of the data, and the other is the logical log, which is used to store the operation of everything.
In the initialized configuration, the physical and logical logs are not stored in the root disk space. The default size physical log 2M, logical log 6, per log file 2M. However, in the actual production environment, these two parameters generally need to be adjusted.
From Informix's own recommendation, the size of a logical log is typically a requirement for a day's business, a circle of logical logs, and a physical Log/logical log =1/3. But some of the data is very large business system, it is impossible to do, to make appropriate adjustments.
The number of physical log files is only 1, the number of logical log files is minimum 3, and the maximum is 32767. For changes to physical and logical logs, we can use the Onparams command to do so.
C:\Informix>onparams--
Usage: onparams -a-d<DBspace>[-s<size>][-i]|
-d-l<logfilenumber>[-y] |
-p-s<size>[-d<DBspace>][-y]
-a -Addalogicallogfile
-i -Insertaftercurrentlog
-d -Dropalogicallogfile
-p -Changephysicallogsizeandlocation
-y -Automaticallyresponds"yes"toallprompts
Above is the Onparams help file, we first change the physical log location and size:
C:\Informix>onparams-p-s40000-dphydbs-y
Shuttingdown,pleasewait...
Initializing,pleasewait...
Recovering,pleasewait...
The Phybegin in Onstat–l can be used to see which chunk the physical log currently exists on. Physize to view the current physical log file in large size, in units of pages. Before that we created the Phydbs and specified his size. After we specify the size of the physical log file after-s, specify the location of the physical log file after-D. Then we'll do a change in the location and size of the logical log:
C:\informix>onparams-a-dlogdbs-s30000-i
Logicallogsuccessfullyadded.
Then use Onstat–l to view the newly added logical log:
C:\informix>onstat-l
Ibminformixdynamicserverversion9.40.tc2e1--quiescent--up00:08:10--25728kbytes
Physicallogging
bufferbufused bufsize Numpagesnumwritspages/io
P-1 0 8 8 7 1.14
Phybegin physize Phypos phyused%used
3:53 10000 12 0 0.00
Logicallogging
bufferbufused bufsize numrecs Numpagesnumwritsrecs/pagespages/io
L-3 0 8 37 14 14 2.6 1.0
subsystem Numrecs logspaceused
Oldrsam 37 2628
Address number flags UNIQID begin size Used%used
0cb37ca81 u-b----1 1:763 500 500 100.00
0cb37ce82 u-b----2 1:1263 500 500 100.00
0cb37d283 u-b----3 1:1763 500 500 100.00
0cb37d684 u-b----4 1:2,263 500 500 100.00
0cb37da85 u-b----5 1:2,763 500 284 56.80
0CB37DE86 U---c-l 6 1:3,263 500 315 63.00
0ced8b9812 A------0 2:37,553 7500 0 0.00
0ced8b5811 A------0 2:30,053 7500 0 0.00
0ced8b1810 A------0 2:22,553 7500 0 0.00
0ced8ad89 A------0 2:15,053 7500 0 0.00
0ced8a988 A------0 2:7,553 7500 0 0.00
0ced8a587 A------0 2:53 7500 0 0.00
12active,12total