一、db2look 语法如下:二、例子 其中 数据库名:sample 用户:db2admin模式名:db2admin1.db2look -d sample -u db2admin -e -o db2look.sql -- 这将生成由用户db2admin 创建的所有表和联合对象的 DDL 语句-- db2look 输出被发送到名为 db2look.sq_db2look IC87893: FILENAME IN DB2LOOK -O PARAMETER IS CONVERTED INTO LOWER-CASE AND IT MAY INDUCE 'DB2LOOK UTILITY COULD NOT OPEN FILE' ERROR. Sometimes backups may not be transportable to another operating system, or you may have to copy only a subset of a database, or perhaps just a schema.
In diesem Beispiel wird von einem Unix/AIX das DB2LOOK Utility über Secondary AuthID an ein DB2 for z/OS Subsystem gebunden. $ db2look -m -d sample -z db2inst1 -o stat.ddl 上記を本番環境で実行すると、統計情報を更新するDDLがstat.ddlというファイルで作成されるので、このファイルを開発環境で $ db2 connect to sample $ db2 -tvf stat.ddl と実行すると本番環境と同じ統計情報になります。 # 21.05.2013/GR - Adapted from BindDB2ConnectSecondary to bind DB2LOOK to DB2 z/OS # 16.09.2015/GR - db2look.bnd, db2lkfun.bnd, db2lksp.bnd not needed for DB2 z/OS clear
This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or reliability of the article or any translations thereof. Fixes are available. Since the backup command does not support these operations, we can still use db2move and db2look for alternate backups.. db2look is useful with extracting DDL, or data definition language, so we can recreate database objects, if need be. db2look -d