Slide 1

Slide 1 text

2017年12月15日 中野 晴幸 Twitter: @harunakano

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

フィールド C_day を日付で検索

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

DB内部の UNKテーブルという、フィールド 情報を格納するテーブルが不正な状態となってし まった事により発生した可能性があります。

Slide 6

Slide 6 text

“Text” だとぉ? Unique Key Table : データベース内で使われているアイテムの名前と その型の情報を格納している

Slide 7

Slide 7 text

次の手順でUNKテーブルを更新し、解消するか確 認してほしい ◆ 全文索引を削除する ◆ キャッシュを削除する ◆ dbcache flush ◆ コピー圧縮する ◆ Load compact –c xxx.nsf ◆ 全文索引を作成する

Slide 8

Slide 8 text

効果なし!!

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

Definition of UNK and ‘Database has too many unique field names’ message http://www-01.ibm.com/support/docview.wss?rs=463&uid=swg21100238 一部抜粋 英語 日本語 The compact process deletes the UNK, and scans all notes in the database for the existence of unique fields. If the field exists anywhere (design element or live document), it will be added to the newly built UNK. コンパクトプロセスはUNKを削除し、データ ベース内のすべてのノートをスキャンして一意 のフィールドが存在するかどうかを調べます。 フィールドがどこかに存在する場合(設計 要素または生の文書)、新しく作成 されたUNKに追加されます。

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

@Created が古い順ではなく… NoteID が小さい順に並ぶ!

Slide 13

Slide 13 text

文字!!

Slide 14

Slide 14 text

フォーム上の日付/時刻のフィールドへ値を入力せ ず保存すると、アイテムの「データ形式の種類」は文 字に。

Slide 15

Slide 15 text

【サンプル】値のない日付/時刻フィールドに置換する: Dim ss As New NotesSession Dim doc As NotesDocument Dim item As NotesItem Dim ndt As New NotesDateTime(“”) ‘ワイルドカードの日付 Const FLD = "C_day" Set doc = ss.Currentdatabase.Unprocesseddocuments.Getfirstdocument() If doc.Hasitem( FLD ) Then doc.Removeitem FLD Set item = New NotesItem(doc, FLD, ndt) doc.save True, False

Slide 16

Slide 16 text

「Time」になった! 検索もバッチリ!!

Slide 17

Slide 17 text

◆ フォームを作り直したDBは検索に気を付けろ!! ◆ ソートしないビューは NoteID の小さい順に文書 が並ぶ ◆ “notes 鬼”でNotes検索の記事を探せる