1. 程式人生 > >Informix之onspaces語法及例項(磁碟空間管理)

Informix之onspaces語法及例項(磁碟空間管理)

(其中紅色字型為手工輸入,藍色字型為主要變化關注點。)

1、基本用法:

-bash-3.1$ onspaces --

Usage:

 onspaces { -a <spacename> -p <path> -o <offset> -s <size> [-m <path> <offset>]

               { { [-Mo <mdoffset>] [-Ms <mdsize>] } | -U }

               } |

          { -c { -d <DBspace> [-k <pagesize>] [-t]

                    -p <path> -o <offset> -s <size> [-m <path> <offset>] } |

               { -d <DBspace> [-k <pagesize>]

                    -p <path> -o <offset> -s <size> [-m <path> <offset>]

                    [-ef <first_extent_size>] [-en <next_extent_size>] } |

               { -b <BLOBspace> -g <pagesize>

                    -p <path> -o <offset> -s <size> [-m <path> <offset>] } |

               { -S <SBLOBspace> [-t]

                    -p <path> -o <offset> -s <size> [-m <path> <offset>]

                    [-Mo <mdoffset>] [-Ms <mdsize>] [-Df <default-list>] } |

               { -x <Extspace> -l <Location> } } |

          { -d <spacename> [-p <path> -o <offset>] [-f] [-y] } |

          { -f[y] off [<DBspace-list>] | on [<DBspace-list>] } |

          { -m <spacename> {-p <path> -o <offset> -m <path> <offset> [-y] |

                            -f <filename>} } |

          { -r <spacename> [-y] } |

          { -s <spacename> -p <path> -o <offset> {-O | -D} [-y] } |

          { -ch <sbspacename> -Df <default-list> } |

          { -cl <sbspacename> } |

          { -ren <spacename> -n <newname> }

    -a  - Add a chunk to a DBspace, BLOBspace or SBLOBspace

    -c  - Create a DBspace, BLOBspace, SBLOBspace or Extspace

    -d  - Drop a DBspace, BLOBspace, SBLOBspace, Extspace, or chunk

    -f  - Change dataskip default for specified DBspaces

    -m  - Add mirroring to an existing DBspace, BLOBspace or SBLOBspace

    -r  - Turn mirroring off for a DBspace, BLOBspace or SBLOBspace

    -s  - Change the status of a chunk

    -ch - Change default list for smart large object space

    -cl - garbage collect smart large objects that are not referenced

    default-list = {[LOGGING = {ON|OFF}]  [,ACCESSTIME = {ON|OFF}]

            [,AVG_LO_SIZE = {1 - 2097152}] }

    -ren - Rename a DBspace, BLOBspace, SBLOBspace or Extspace

2、例項:

(1)(建立dbspace)

-bash-3.1$ onstat -d

IBM Informix Dynamic Server Version 11.50.UC1DE -- On-Line -- Up 04:03:45 -- 93844 Kbytes

Dbspaces

address  number   flags      fchunk   nchunks  pgsize   flags    owner    name

44d4a7f8 1        0x70001    1        1        2048     N  B     informix rootdbs

44e107e8 2        0x60001    2        1        2048     N  B     informix dbs1

 2 active, 2047 maximum

Chunks

address  chunk/dbs     offset     size       free       bpages     flags pathname

44d4a958 1      1      0          450000     340077                PO-B  /home/informix/ids11uc1/dbs/rootdbs

44e10948 2      2      0          250000     161794                PO-B  /dbs/dbs1

 2 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

-bash-3.1$ touch /dbs/dbstest1

-bash-3.1$ chmod 660 /dbs/dbstest1

-bash-3.1$ onspaces -c -d dbspacetest1 -p /dbs/dbstest1  -o 20000 -s 1000000

Verifying physical disk space, please wait ...

/dbs: write failed, file system is full.

-bash-3.1$ onspaces -c -d dbspacetest1 -p /dbs/dbstest1  -o 20000 -s 1000

Verifying physical disk space, please wait ...

Space successfully added.

** WARNING **  A level 0 archive of Root DBSpace will need to be done.

-bash-3.1$ onstat -d

IBM Informix Dynamic Server Version 11.50.UC1DE -- On-Line -- Up 04:08:39 -- 93844 Kbytes

Dbspaces

address  number   flags      fchunk   nchunks  pgsize   flags    owner    name

44d4a7f8 1        0x70001    1        1        2048     N  B     informix rootdbs

44e107e8 2        0x60001    2        1        2048     N  B     informix dbs1

472abd88 3        0x60001    3        1        2048     N  B     informix dbspacetest1

 3 active, 2047 maximum

Chunks

address  chunk/dbs     offset     size       free       bpages     flags pathname

44d4a958 1      1      0          450000     340077                PO-B  /home/informix/ids11uc1/dbs/rootdbs

44e10948 2      2      0          250000     161794                PO-B  /dbs/dbs1

472ead50 3      3      10000      500        447                   PO-B  /dbs/dbstest1

 3 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

(2)(建立blobspace)

-bash-3.1$ touch dbtest2

-bash-3.1$ chmod 660 dbtest2

-bash-3.1$ onspaces -c -b blobsptest1 -g 50 -p /home/share/dbtest2 -o 200000 -s 1000

Verifying physical disk space, please wait ...

Space successfully added.

** WARNING **  A level 0 archive of Root DBSpace will need to be done.

-bash-3.1$ onstat -d

IBM Informix Dynamic Server Version 11.50.UC1DE -- On-Line -- Up 04:29:15 -- 93844 Kbytes

Dbspaces

address  number   flags      fchunk   nchunks  pgsize   flags    owner    name

44d4a7f8 1        0x70001    1        1        2048     N  B     informix rootdbs

44e107e8 2        0x60001    2        1        2048     N  B     informix dbs1

472abd88 3        0x60001    3        1        2048     N  B     informix dbspacetest1

4732ae68 4        0x60011    4        1        102400   N BB     informix blobsptest1

 4 active, 2047 maximum

Note: For BLOB chunks, the number of free pages shown is out of date.

      Run 'onstat -d update' for current stats.

Chunks

address  chunk/dbs     offset     size       free       bpages     flags pathname

44d4a958 1      1      0          450000     340077                PO-B  /home/informix/ids11uc1/dbs/rootdbs

44e10948 2      2      0          250000     161794                PO-B  /dbs/dbs1

472ead50 3      3      10000      500        447                   PO-B  /dbs/dbstest1

472edd50 4      4      100000     500       ~10         10         POBB  /home/share/dbtest2

 4 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

(3)(建立sbspaces)

-bash-3.1$ touch /home/share/dbtest3

-bash-3.1$ chmod 660 dbtest3

-bash-3.1$ onspaces -c -S sbspacetest1 -p /home/share/dbtest3 -o 200000 -s 10000

Verifying physical disk space, please wait ...

Space successfully added.

** WARNING **  A level 0 archive of Root DBSpace will need to be done.

-bash-3.1$ onstat –d

(略)

(4)(刪除dbspace or sbspace)

-bash-3.1$ onspaces -d dbspacetest1    

WARNING: Dropping a DBspace.

Do you really want to continue? (y/n)y

Space successfully dropped.

** WARNING **  A level 0 archive will need to be done before any chunks from

DBspace dbspacetest1 can be reused (see Dynamic Server Administrator's manual).

-bash-3.1$ onspaces -d sbspacetest1

WARNING: Dropping a sbspace.

Do you really want to continue? (y/n)y

Space successfully dropped.

** WARNING **  A level 0 archive will need to be done before any chunks from

sbspace sbspacetest1 can be reused (see Dynamic Server Administrator's manual).

(5)(增加chunk到dbspace or blobspace or subspace)

-bash-3.1$ touch /home/share/dbchunk

-bash-3.1$ chmod 660 dbchunk

-bash-3.1$ onspaces -a blobsptest1 -p /home/share/dbchunk -o 200000 -s 1500

Verifying physical disk space, please wait ...

Chunk successfully added.

-bash-3.1$ onstat -d

IBM Informix Dynamic Server Version 11.50.UC1DE -- On-Line -- Up 04:52:13 -- 93844 Kbytes

Dbspaces

address  number   flags      fchunk   nchunks  pgsize   flags    owner    name

44d4a7f8 1        0x70001    1        1        2048     N  B     informix rootdbs

44e107e8 2        0x60001    2        1        2048     N  B     informix dbs1

4732ae68 4        0x60011    4        2        102400   N BB     informix blobsptest1

 3 active, 2047 maximum

Note: For BLOB chunks, the number of free pages shown is out of date.

      Run 'onstat -d update' for current stats.

Chunks

address  chunk/dbs     offset     size       free       bpages     flags pathname

44d4a958 1      1      0          450000     340077                PO-B  /home/informix/ids11uc1/dbs/rootdbs

44e10948 2      2      0          250000     161794                PO-B  /dbs/dbs1

472ead50 3      4      100000     750       ~15         15         POBB  /home/share/dbchunk

472edd50 4      4      100000     500       ~10         10         POBB  /home/share/dbtest2

 4 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

(6)(刪除chunk)

-bash-3.1$ onspaces -d blobsptest1 -p /home/share/dbchunk -o 50000

IBM Informix Dynamic Server must be in quiescent mode.

Chunk not dropped.

-bash-3.1$ onmode -s

This will perform a GRACEFUL SHUTDOWN -

Do you wish to continue (y/n)? y

-bash-3.1$ onstat -

IBM Informix Dynamic Server Version 11.50.UC1DE -- Quiescent -- Up 04:59:43 -- 93844 Kbytes

-bash-3.1$ onspaces -d blobsptest1 -p /home/share/dbchunk -o 50000

WARNING:  Dropping a chunk.

Do you really want to continue? (y/n)y

Chunk not dropped.

ISAM error:  No such chunk

-bash-3.1$ onspaces -d blobsptest1 -p /home/share/dbchunk -o 200000

WARNING:  Dropping a chunk.

Do you really want to continue? (y/n)y

Chunk successfully dropped.

** WARNING **  A level 0 archive for BLOBspace blobsptest1 will need to be done

before '/home/share/dbchunk' can be reused (see Dynamic Server Administrator's manual).

相關推薦

Informixonspaces語法例項磁碟空間管理

(其中紅色字型為手工輸入,藍色字型為主要變化關注點。) 1、基本用法: -bash-3.1$ onspaces -- Usage:  onspaces { -a <spacename> -p <path> -o <offset> -s <size> [-m &

monkeyrunner環境搭建例項

    Monkeyrunner工具提供了一個API,使用此API寫出的程式可以在Android程式碼之外控制Android裝置和模擬器。 一、Monkeyrunner簡介 1.MOnkeyrunner相對Monkey區別 1)Monkeyrunner工具在工作站上通過API定義的特定命令和事件控制裝置

Java開發後臺介面+Android開發客戶端的一個例項學生成績管理

本文主要是一個查詢學生成績的一整套系統,主要為功能實現,串聯起來後端和移動端的連線。UI後期可以根據自己的愛好再調整,這裡分為兩部分進行介紹: 1、使用Java開發後臺介面,使用現如今非常流行的SpringBoot框架,使用MySql資料庫,持久層框架使用MyBatis,後臺開發平臺為idea,

Windows 活動目錄AD服務器系統升級到2012環境介紹準備

AD 升級 activedirectory DHCP 1. AD服務器相關配置信息1 2 1.1 系統版本角色名稱操作系統版本語言數量ADWindows server 2003 sp2CN2ADWindows server 2012 R2CN21.2 主機名和IP地址服務器主機名IP地

我要學pythonpython語法規範

exc utf-8 數值 包括 興趣 相等 als 版本 算數 註釋 單行註釋: #多行註釋: """寫入註釋內容"""‘‘‘寫入多行註釋內容‘‘‘ 備註:python中單引號和雙引號作用是一致的。 變量 pyth

vue基礎模板語法指令

Vue的模板語法 1、Hello world body> <div id="box"> {{title}} <input type="text" v-model="title"> </div> <script src="vue

mysql儲存過程語法例項

儲存過程如同一門程式設計語言,同樣包含了資料型別、流程控制、輸入和輸出和它自己的函式庫。 --------------------基本語法-------------------- 一.建立儲存過程 create procedure sp_name() begin ...

Qt文件閱讀筆記-windowOpacity官方解析例項兩種方法使得程式漸變出現

目錄 官方解析 博主例子 官方解析 windowOpacity 這個屬性控制視窗的透明度。 他的取值範圍是1.0(不透明)至0.0(全透明)。 預設情況下,這個屬性的值是1.0。 這個屬性在L

Qt網路程式設計QNetworkRequest和QNetworkReply例項

設想有如下場景:輸入若干的url,然後依次的下載並存儲到檔案。本案例使用QNetworkRequest和QNetworkReply。原始碼如下: 案例原始碼 標頭檔案 #pragma once //////////////////////////////////

python入門與進階篇(六)高階語法用法

    高階知識針對包、類庫的開發者,函式只是一段可執行的程式碼 並不是物件,閉包、函數語言程式設計 閉包=函式+環境變數 a=10 def outer(): a=25 def inner(x): print(a*x*x) retu

spring cloud 學習服務註冊發現eureka

首先,spring cloud使用的基礎是spring boot ,建立在能熟悉spring boot的基礎之上。 開發工具使用IDEA ,jdk選用8。 一、搭建eureka註冊中心 1、建立spring boot工程,eureka-server,pom.xm

數碼相框_電子書程式碼閱讀編寫7

數碼相框_電子書之程式碼閱讀及編寫(7)   在LCD顯示任意編碼的文字檔案,類似電子書 怎樣在LCD上顯示檔案: 需要哪幾個檔案? 1、頂部檔案 通過main.c分析命令列的操作,然後初始化各個管理檔案下的結構體,比如DisplayInit(); 然後進

無業務不伸縮二,雲監控搭配SLBESS進階篇

雲端計算ESS彈性伸縮課程 無業務不伸縮之二,雲監控搭配SLB及ESS(進階篇) 連載雲端計算文章主題 後續的連載如下1、 無業務不伸縮之一,雲端計算有ESS2、 無業務不伸縮之二,雲監控搭配SLB及ESS3、無互動不加速,雲端計算有CDN4、無對像不儲存,雲端計算有OSS5、無檔案不儲存,雲端計算有”

Linux系統入門命令學習解析

Linux常用目錄 以下是系統的一級目錄,這些目錄在Linux系統中都有著不同的用處。 /  Linux系統根目錄(重要,常用) /home  包含使用者的檔案:引數設定、個性檔案、文件、資料、EMAIL、快取資料等,每增加一個使用者,系統就會在home目錄下

MFC總結CListCtrl用法技巧

        本篇重點介紹:禁止拖動表頭、讓第一列居中顯示、設定行高與字型、虛擬列表技術、點選表頭時進行歸類、向上與向下移動、動態調整大小問題、避免閃爍問題。  6、禁止拖動表頭        過載OnNotify訊息響應函式,遮蔽兩個訊息通知碼:HDN_BEGINT

Java記憶體資料庫-H2介紹例項SpringBoot

介紹 記憶體資料庫(Embedded database或in-momery database)具有配置簡單、啟動速度快、尤其是其可測試性等優點,使其成為開發過程中非常有用的輕量級資料庫。在spring中支援HSQL、H2和Derby三種資料庫。 總的感覺H2很厲害的樣子,既然是這樣的話,我們先介紹H2

多層感知機MLP演算法原理Spark MLlib呼叫例項Scala/Java/Python

多層感知機 演算法簡介:         多層感知機是基於反向人工神經網路(feedforwardartificial neural network)。多層感知機含有多層節點,每層節點與網路的下一層節點完全連線。輸入層的節點代表輸入資料,其他層的節點通過將輸入資料與層上節點

機器學習實戰例項手寫數字識別KNN、python3

from numpy import * from os import listdir import operator def img2Vector(filename): returnVecter = zeros((1,1024)) fr = open(fil

二十種特徵變換方法Spark MLlib呼叫例項Scala/Java/python

Tokenizer(分詞器) 演算法介紹:         Tokenization將文字劃分為獨立個體(通常為單詞)。下面的例子展示瞭如何把句子劃分為單詞。         RegexTokenizer基於正則表示式提供更多的劃分選項。預設情況下,引數“pattern”為

【matlab】MarkDown Letex 編碼 隨機過程應用

**Provement of Gaussian Distribution:** 設正態分佈概率密度函式是 $$f(x)=\frac{1}{\sqrt{2π}\sigma}*e^{\