2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

DB2(9.7)DBリストア時に表スペースペンディング状態を解消する方法

Posted at

背景

DB2でエクスポートしたDBをリストアしようところ、上手くリストア出来ない事象が発生。
調査した結果表スペースが定義されておらずペンディング状態となっていたため、解消するための方法をメモします。

※ロールフォワードペンディングとストレージ定義待ち状態の解消方法となります。

テーブルスペースの状態を表示

まずは下記コマンドでテーブルスペースの状態を確認。ここで
「ロールフォワード・ペンディング」
「ストレージ未定義(定義待ち)」
の状態であれば以降の手順を行う。

db2 list tablespaces

ロールフォワード・ペンディングを解消

db2 rollforward db <database-alias> to end of logs and complete

未定義領域のストレージを定義

db2 set tablespace containers for <tablespace-id> using (PATH <storage-path>)

リストアを継続させる

db2 restore database <database-alias> continue

その他

私の環境ではHDDが足りずにリストア出来ない状況が起こったためHDDの空き容量は十分にあるとよいかと思います。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?