系统集成数据库

使用db2cfexp/db2cfimp导出导入实例配置和编目信息

可以用 db2cfexp 以及 db2cfimp 命令来导出和导入实例配置文件及编目信息C:>db2cfexp db2cfexp exports configuration information.   db2cfexp fname [ template | backup | maintain ]               &n...显示全部
可以用 db2cfexp 以及 db2cfimp 命令来导出和导入实例配置文件及编目信息

C:>db2cfexp
db2cfexp exports configuration information.
   db2cfexp fname [ template | backup | maintain ]
                    -          -        -
     fname - path/filename of the export profile.
Options:
   template - create a generic export profile to
              transfer this configuration to another
              workstation. (incl. configuration info,
              catalog info, ODBC info ).
   maintain - create a Database export profile to
              transfer the Database catalog information
              to another workstation.
   backup   - create a backup configuration profile for
              backup purposes at this workstation only.

C:>db2 list node directory
节点目录
目录中的条目数 = 1
节点 1 条目:
节点名                            = NODE44
注释                            =
目录条目类型                    = LOCAL
协议                            = TCPIP
主机名                          = 130.30.15.44
服务名称             = 50000

C:>db2cfexp nodecatalog maintain
C:>type nodecatalog
;Use BINARY file transfer
[FILE_DESCRIPTION]
APPLICATION=DB2/NT 9.1.0
FILE_CONTENT=DB2 CCA Exported Data Sources
FILE_TYPE=CommonServer
FILE_FORMAT_VERSION=2.0
Platform=5
DB2SYSTEM=FENG
Instance=DB2
[INST>DB2]
instance_name=DB2
NodeType=4
ServerType=DB2NT
Authentication=SERVER
DB2COMM=TCPIP
[NODE>NODE44]
ServerType=DB2UNKNOWN
Nodetype=U
Protocol=TCPIP
Hostname=130.30.15.44
Portnumber=50000
Security=0
[DB>NODE44:SAMPLE44]
Dir_entry_type=REMOTE
Authentication=NOTSPEC
DBName=SAMPLE
[DB>!LOCAL:SAMPLE]
Dir_entry_type=INDIRECT
Drive=D:
DBName=SAMPLE
C:>db2 uncatalog node node44
DB20000I  UNCATALOG NODE命令成功完成。
DB21056W  只有在刷新目录高速缓存以后,目录更改才会生效。
C:>db2 list node directory
SQL1037W  节点目录为空。  SQLSTATE=01606

C:>db2cfimp
db2cfimp imports configuration information.
   db2cfimp fname
     fname - path/filename of the profile to be imported

C:>db2cfimp nodecatalog
C:>db2 list node directory
节点目录
目录中的条目数 = 1
节点 1 条目:
节点名                            = NODE44
注释                            =
目录条目类型                    = LOCAL
协议                            = TCPIP
主机名                          = 130.30.15.44
服务名称             = 50000

---导出实例配置文件和编目
C:>db2cfexp test.cfg template收起
参与3

查看其它 2 个回答UniverseSae的回答

UniverseSaeUniverseSae数据库管理员待业
实用的命令~
互联网服务 · 2013-05-13
浏览1312

回答者

UniverseSae
数据库管理员待业

UniverseSae 最近回答过的问题

回答状态

  • 发布时间:2013-05-13
  • 关注会员:0 人
  • 回答浏览:1312
  • X社区推广