DB2 LOAD命令中COPY NO/COPY的说明
【IT168技术文档】
5. 关于注册表变量 DB2_LOAD_COPY_NO_OVERRIDE 的介绍:
另外 DB2 还提供了一个注册表变量:DB2_LOAD_COPY_NO_OVERRIDE,可将 LOAD 的缺省选项 COPY NO 设置为 NONRECOVERABLE 或 COPY YES。具体使用方法举例为:
设置为 COPY YES 的方法:
E:\TEST>db2set DB2_LOAD_COPY_NO_OVERRIDE="COPY YES TO E:\TEST"
E:\TEST>db2 terminate
E:\TEST>db2set
DB2_LOAD_COPY_NO_OVERRIDE=COPY YES TO E:\TEST
:
E:\TEST>db2 load from staff.del of del insert into staff
SQL27966W DB2_LOAD_COPY_NO_OVERRIDE 注册表变量值 "COPY YES TO E:\TEST" 将覆盖在 Load 中指定的 COPY NO 参数。
:
:
设置为 NONRECOVERABLE 的方法:
E:\TEST>db2set DB2_LOAD_COPY_NO_OVERRIDE=NONRECOVERABLE
E:\TEST>db2 terminate
E:\TEST>db2set
DB2_LOAD_COPY_NO_OVERRIDE=NONRECOVERABLE
:
E:\TEST>db2 load from staff.del of del insert into staff
SQL27966W DB2_LOAD_COPY_NO_OVERRIDE 注册表变量值 "NONRECOVERABLE" 将覆盖在Load 中指定的 COPY NO 参数。
:
:
通过上述对 LOAD 的 COPY NO,COPY YES 和 NONRECOVERABLE 参数,以及 DB2 注册表变量 DB2_LOAD_COPY_NO_OVERRIDE 的详细和举例说明,到此我们已经掌握了它们的功能和使用方法。由于 LOAD 操作几乎不记日志的特性,在对启用了前滚恢复的数据库实现 LOAD 操作时应注意从中选择适当的选项,以保证执行了 LOAD 操作的表的可用性。
0
相关文章