因工作需要,informix的數據庫是初次接觸
且工作單位使用的版本比較老,現於2019年於官網下載的最早版本爲iif.12.10.FC9DE
現記錄一下關於informix的安裝,命令操作,以及信息解讀
安裝使用的是開頭提到的12版
操作的系統是win10
在win10 的安裝過程中,涉及的密碼都統一輸入
採用默認安裝模式
未新建單獨的informix用戶
數據庫服務啓動需要使用管理員權限打開 ol_informix1210
(C:\Windows\System32\cmd.exe /k "C:\Aprograms\Bsystem\informix12\ol_informix1210.cmd")
如果使用普通用戶從cmd打開,會提示
Message 71578 not found.
這是因爲沒有運行指定的cmd文件(缺少環境變量設置)
如果使用普通用戶打開-ol_informix1210-,會提示
Only members of IXDBSA group (Informix-Admin, by default) can start IBM
Informix Dynamic Server.
使用管理員啓動 ol_informix1210
C:\WINDOWS\system32>set INFORMIXDIR=C:\APROGR~1\Bsystem\informix12
C:\WINDOWS\system32>set REGMACHINE=\\DESKTOP-BB6551P
C:\WINDOWS\system32>set INFORMIXSERVER=ol_informix1210
C:\WINDOWS\system32>set ONCONFIG=onconfig.ol_informix1210
C:\WINDOWS\system32>set INFORMIXSQLHOSTS=C:\Aprograms\Bsystem\informix12\etc\sqlhosts.ol_informix1210
C:\WINDOWS\system32>set GL_USEGLU=1
C:\WINDOWS\system32>set PATH=C:\APROGR~1\Bsystem\informix12\bin;C:\Aprograms\Bsystem\informix12\bin;C:\Program Files\ibm\gsk8\lib64;C:\Program Files\ibm\gsk8\bin;C:\Aprograms\Bsystem\Rtools\bin;C:\Program Files\Dell\DW WLAN Card;C:\Aprograms\xmanager6\Xlpd 6\;C:\Aprograms\xmanager6\Xftp 6\;C:\Aprograms\xmanager6\Xshell 6\;C:\Aprograms\xmanager6\Xmanager 6\;C:\Aprograms\Bsystem\python3\Scripts\;C:\Aprograms\Bsystem\python3\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Aprograms\Bsystem\nodejs\;C:\Aprograms\Bsystem\Jdks\jdk8\8_152\bin;C:\Aprograms\Bsystem\Jdks\jdk8\8_152\jre\bin;C:\Aprograms\Agreen\lua;C:\Aprograms\apache-maven-3.6.1\bin;C:\Aprograms\apache-tomcat-9.0.19\lib;C:\Aprograms\apache-tomcat-9.0.19\bin;C:\Aprograms\gradle\bin;%ANDROID_SDK_HOME%\platform-tools;%ANDROID_SDK_HOME%\tools;C:\Aprograms\Bsystem\perl\c\bin;C:\Aprograms\Bsystem\perl\perl\site\bin;C:\Aprograms\Bsystem\perl\perl\bin;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Aprograms\Bsystem\Git\cmd;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Aprograms\Bsystem\gitext\;C:\Aprograms\Bsystem\nasm214;C:\Aprograms\Bsystem\phantomjs-2.1.1-windows\bin;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\IncrediBuild;C:\Aprograms\Bsystem\Asofts\openssl-1.1.1c-win64-mingw\openssl-1.1.1c-win64-mingw;C:\Aprograms\Bsystem\Asofts\Apache24\bin;C:\Aprograms\Bsystem\Asofts\php;C:\Aprograms\Bsystem\Asofts\apache-ant-1.9.14\bin;C:\Users\ender\AppData\Local\Google\Chrome\Application;C:\Aprograms\Bsystem\Ruby26-x64\bin;C:\Users\ender\AppData\Local\Microsoft\WindowsApps;C:\Aprograms\Bsystem\bdzip\;C:\Users\ender\AppData\Roaming\npm;C:\Aprograms\Microsoft VS Code\bin;C:\Aprograms\Bsystem\Nmap
輸入 oninit online啓動命令
C:\WINDOWS\system32>oninit
Previous instance of the Engine still running
提示實例正在運行
輸入 onmode -ky 停止服務
C:\WINDOWS\system32>onmode -ky
<EOM>
在停止服務情況下,分別輸入 onstat -p 或者 onstat -l 或者 onstat -d 三個查詢狀態的語句
C:\WINDOWS\system32>onstat -d
shared memory not initialized for INFORMIXSERVER 'ol_informix1210'
而輸入 onstat -m 則會在最後提示服務狀態
C:\WINDOWS\system32>onstat -m
shared memory not initialized for INFORMIXSERVER 'ol_informix1210'
Message Log File: C:\APROGR~1\Bsystem\informix12\ol_informix1210.log
13:32:05 Auto Registration is synced
13:32:05 SCHAPI: Started 2 dbWorker threads.
13:32:06 Performance Advisory: Based on the current workload, the physical log might be too small to
accommodate the time it takes to flush the buffer pool.
13:32:06 Results: The server might block transactions during checkpoints.
13:32:06 Action: If transactions are blocked during the checkpoint, increase the size of the
physical log to at least 737280 KB.
13:32:06 Performance Advisory: The physical log is too small for automatic checkpoints.
13:32:06 Results: Automatic checkpoints are disabled.
13:32:06 Action: To enable automatic checkpoints, increase the physical log to at least 737280 KB.
13:32:07 Defragmenter cleaner thread now running
13:32:07 Defragmenter cleaner thread cleaned:0 partitions
15:57:41 Checkpoint Completed: duration was 0 seconds.
15:57:41 Thu Sep 26 - loguniq 9, logpos 0x4c1018, timestamp: 0x32dd2 Interval: 36
15:57:41 Maximum server connections 0
15:57:41 Checkpoint Statistics - Avg. Txn Block Time 0.474, # Txns blocked 0, Plog used 55, Llog used 156
15:57:42 IBM Informix Dynamic Server Stopped.
輸入 oninit 啓動服務
C:\WINDOWS\system32>oninit
Reading configuration file 'C:\APROGR~1\Bsystem\informix12/etc/onconfig.ol_informix1210'...Warning: Parameter's user-configured value was adjusted. (DS_MAX_SCANS)
Warning: Parameter's user-configured value was adjusted. (ONLIDX_MAXMEM)
succeeded
Allocating and attaching to shared memory...succeeded
Creating resident pool 8332 kbytes...succeeded
Creating infos file "C:\APROGR~1\Bsystem\informix12/etc/.infos.ol_informix1210"...succeeded
Linking conf file "C:\APROGR~1\Bsystem\informix12/etc/.conf.ol_informix1210"...succeeded
Initializing rhead structure...rhlock_t 16384 (512K)... rlock_t (5312K)... Writing to infos file...succeeded
Previous instance of the Engine still running
Previous instance of the Engine still running
Initialization of Encryption...succeeded
Initializing ASF...succeeded
Initializing Dictionary Cache and SPL Routine Cache...succeeded
Initializing encryption-at-rest if necessary...succeeded
Bringing up ADM VP...succeeded
Creating VP classes...succeeded
Forking main_loop thread...succeeded
Initializing DR structures...succeeded
Forking 1 'soctcp' listener threads...succeeded
Forking 1 'soctcp' listener threads...succeeded
Forking 1 'soctcp' listener threads...succeeded
Starting tracing...succeeded
Initializing 2 flushers...succeeded
Initializing SDS Server network connections...succeeded
Initializing log/checkpoint information...succeeded
Initializing dbspaces...succeeded
Opening primary chunks...succeeded
Validating chunks...succeeded
Initialize Async Log Flusher...succeeded
Starting B-tree Scanner...succeeded
Init ReadAhead Daemon...succeeded
Init DB Util Daemon...succeeded
Initializing DBSPACETEMP list...succeeded
Init Auto Tuning Daemon...succeeded
Checking database partition index...succeeded
Initializing dataskip structure...succeeded
Checking for temporary tables to drop...succeeded
Updating Global Row Counter...succeeded
Forking onmode_mon thread...succeeded
Creating periodic thread...succeeded
Creating VP cache drain thread...succeeded
Creating limits manager thread...succeeded
Starting scheduling system...succeeded
Verbose output complete: mode = 5
當前cmd窗口不可輸入
重新使用管理員打開 ol_informix1210
以此輸入以下命令 onstat -p 或者 onstat -l 或者 onstat -d onstat -m
C:\WINDOWS\system32>onstat -p
IBM Informix Dynamic Server Version 12.10.FC9DE -- On-Line -- Up 00:05:16 -- 185088 Kbytes
Profile
dskreads pagreads bufreads %cached dskwrits pagwrits bufwrits %cached
711 1002 13745 94.83 69 91 1495 95.38
isamtot open start read write rewrite delete commit rollbk
15346 1122 1264 4602 518 95 2 45 0
gp_read gp_write gp_rewrt gp_del gp_alloc gp_free gp_curs
2 0 0 0 0 0 2
ovlock ovuserthread ovbuff usercpu syscpu numckpts flushes
0 0 0 0.18 0.27 1 1
bufwaits lokwaits lockreqs deadlks dltouts ckpwaits compress seqscans
31 0 7226 0 0 0 15 38
ixda-RA idx-RA da-RA logrec-RA RA-pgsused lchwaits
231 57 12 2 76 1
C:\WINDOWS\system32>onstat -l
IBM Informix Dynamic Server Version 12.10.FC9DE -- On-Line -- Up 00:06:13 -- 185088 Kbytes
Physical Logging
Buffer bufused bufsize numpages numwrits pages/io
P-2 45 128 7 1 7.00
phybegin physize phypos phyused %used
2:53 6400 533 45 0.70
Logical Logging
Buffer bufused bufsize numrecs numpages numwrits recs/pages pages/io
L-3 0 64 985 57 41 17.3 1.4
Subsystem numrecs Log Space used
OLDRSAM 984 109304
HA 1 44
address number flags uniqid begin size used %used
0000000080E06A80 9 U---C-L 9 3:53 14592 1276 8.74
0000000080E06AF0 10 A------ 0 3:14645 14592 0 0.00
0000000080E06B60 11 A------ 0 3:29237 14592 0 0.00
0000000080E06BD0 12 A------ 0 3:43829 14592 0 0.00
0000000080E06C40 13 A------ 0 3:58421 14592 0 0.00
0000000080E06CB0 14 A------ 0 3:73013 14592 0 0.00
0000000080E06D20 15 A------ 0 3:87605 14592 0 0.00
0000000080E06D90 16 A------ 0 3:102197 14592 0 0.00
8 active, 8 total
IBM Informix Dynamic Server Version 12.10.FC9DE -- On-Line -- Up 00:06:40 -- 185088 Kbytes
Dbspaces
address number flags fchunk nchunks pgsize flags owner name
0000000080CD6030 1 0x30001 1 1 4096 N BA informix rootdbs
0000000080CD6DE0 2 0x30001 2 1 4096 N BA informix physdbs
0000000080DEA860 3 0x20001 3 1 4096 N BA informix logdbs
0000000080DEAAB0 4 0x20001 4 1 4096 N BA informix datadbs
0000000080DEAD00 5 0x28001 5 1 4096 N SBA informix sbspace
0000000082579030 6 0x2001 6 1 4096 N TBA informix tempdbs
6 active, 2047 maximum
Chunks
address chunk/dbs offset size free bpages flags pathname
0000000080CD6280 1 1 0 147456 140594 PO-B-D C:\APROGR~1\Bsystem\informix12\storage\rootdbs.000
0000000082579280 2 2 0 6656 203 PO-B-D C:\APROGR~1\Bsystem\informix12\storage\plogdbs.000
000000008257A030 3 3 0 116992 203 PO-B-D C:\APROGR~1\Bsystem\informix12\storage\llogdbs.000
000000008257B030 4 4 0 55296 55243 PO-B-D C:\APROGR~1\Bsystem\informix12\storage\datadbs.000
000000008257C030 5 5 0 8192 7576 7576 POSB-D C:\APROGR~1\Bsystem\informix12\storage\sbspace.000
Metadata 563 358 563
000000008257D030 6 6 0 14336 14283 PO-B-D C:\APROGR~1\Bsystem\informix12\storage\tempdbs.000
6 active, 32766 maximum
NOTE: The values in the "size" and "free" columns for DBspace chunks are
displayed in terms of "pgsize" of the DBspace to which they belong.
Expanded chunk capacity mode: always
C:\WINDOWS\system32>onstat -m
IBM Informix Dynamic Server Version 12.10.FC9DE -- On-Line -- Up 00:07:08 -- 185088 Kbytes
Message Log File: C:\APROGR~1\Bsystem\informix12\ol_informix1210.log
16:02:03 Maximum server connections 0
16:02:03 Checkpoint Statistics - Avg. Txn Block Time 0.005, # Txns blocked 0, Plog used 19, Llog used 1
16:02:03 On-Line Mode
16:02:06 SCHAPI: Started dbScheduler thread.
16:02:06 Booting Language <spl> from module <>
16:02:06 Loading Module <SPLNULL>
16:02:06 Auto Registration is synced
16:02:06 SCHAPI: Started 2 dbWorker threads.
16:02:07 Performance Advisory: Based on the current workload, the physical log might be too small to
accommodate the time it takes to flush the buffer pool.
16:02:07 Results: The server might block transactions during checkpoints.
16:02:07 Action: If transactions are blocked during the checkpoint, increase the size of the
physical log to at least 737280 KB.
16:02:07 Performance Advisory: The physical log is too small for automatic checkpoints.
16:02:07 Results: Automatic checkpoints are disabled.
16:02:07 Action: To enable automatic checkpoints, increase the physical log to at least 737280 KB.
16:02:08 Defragmenter cleaner thread now running
16:02:08 Defragmenter cleaner thread cleaned:0 partitions