0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

db2の構成を取得する"db2 get dbm cfg"や"db2 get db cfg"の整形が面倒な場合

Posted at

db2 get db cfgすると構成情報が出力されるけれど、その形式がカンマ区切り、スペース区切り、タブ区切り...のようなものではない。
これを設計書に記載するのは目がチカチカする。


       Database Configuration for Database sample

 Database configuration release level                    = 0x1000
 Database release level                                  = 0x1000

 Database territory                                      = US
 Database code page                                      = 1208
 Database code set                                       = UTF-8
 Database country/region code                            = 1
 Database collating sequence                             = IDENTITY
 Alternate collating sequence              (ALT_COLLATE) = 
 Number compatibility                                    = OFF
 Varchar2 compatibility                                  = OFF
 Date compatibility                                      = OFF
 Database page size                                      = 8192

 Statement concentrator                      (STMT_CONC) = OFF

これをうまく整形する方法を知っている人は教えてほしい...。

解決策としては
dbmの方はSYSIBMADM.DBMCFG
dbの方はSYSIBMADM.DBCFG
をselectすればよい。

ただし上記例と左側が異なり、例えば"Database configuration release level"は"release"の値で取得できる。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?