iis服务器助手广告广告
返回顶部
首页 > 资讯 > 数据库 >admin_move_table在新添加删除字段
  • 790
分享到

admin_move_table在新添加删除字段

2024-04-02 19:04:59 790人浏览 薄情痞子
摘要

admin_move_table在线添加删除字段.txt IBM Knowledge Center - 通过使用 ADMIN_MOVE_TABLE 过程来以联机方式移动表.pdf https://ww


admin_move_table在新添加删除字段admin_move_table在线添加删除字段.txt

admin_move_table在新添加删除字段IBM Knowledge Center - 通过使用 ADMIN_MOVE_TABLE 过程来以联机方式移动表.pdf

https://www.ibm.com/support/knowledgecenter/zh/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dm.doc/doc/t0054864.html


[db2inst1@dbmon ~]$ db2 connect to ibm


   Database Connection InfORMation


 Database server        = DB2/linuxX8664 10.5.8
 sql authorization ID   = DB2INST1
 Local database alias   = IBM


[db2inst1@dbmon ~]$ db2 "create table xpf(id int,name char(10))"
DB20000I  The SQL command completed successfully.
[db2inst1@dbmon ~]$ db2 "insert into xpf values(1,'james'),(2,'kobe')"
DB20000I  The SQL command completed successfully.
[db2inst1@dbmon ~]$ db2 "call sysproc.admin_move_table(
> 'DB2INST1',
> 'XPF',
> '',
> '',
> '',
> '',
> '',
> '',
> 'ID INT,ADDRESS CHAR(20),NAME CHAR(10)',
> '',
> 'MOVE')"




  Result set 1
  --------------


  KEY                              VALUE                                                                                                                           
  -------------------------------- --------------------------------------------------------------------------------------------------------------------------------
  AUTHID                           DB2INST1                                                                                                                        
  CLEANUP_END                      2018-04-23-10.35.58.611108                                                                                                      
  CLEANUP_START                    2018-04-23-10.35.58.517979                                                                                                      
  COPY_END                         2018-04-23-10.35.57.966628                                                                                                      
  COPY_OPTS                        ARRAY_INSERT,NON_CLUSTER                                                                                                        
  COPY_START                       2018-04-23-10.35.57.939488                                                                                                      
  COPY_TOTAL_ROWS                  2                                                                                                                               
  INDEXNAME                                                                                                                                                        
  INDEXSCHEMA                                                                                                                                                      
  INIT_END                         2018-04-23-10.35.57.890671                                                                                                      
  INIT_START                       2018-04-23-10.35.57.474514                                                                                                      
  ORIGINAL_TBLSIZE                 1024                                                                                                                            
  PAR_COLDEF                       ID INT,ADDRESS CHAR(20),NAME CHAR(10)                                                                                           
  REPLAY_END                       2018-04-23-10.35.58.454841                                                                                                      
  REPLAY_START                     2018-04-23-10.35.57.967075                                                                                                      
  REPLAY_TOTAL_ROWS                0                                                                                                                               
  REPLAY_TOTAL_TIME                0                                                                                                                               
  STATUS                           COMPLETE                                                                                                                        
  SWAP_END                         2018-04-23-10.35.58.503173                                                                                                      
  SWAP_RETRIES                     0                                                                                                                               
  SWAP_START                       2018-04-23-10.35.58.456034                                                                                                      
  UTILITY_INVOCATION_ID            01000000B8000000080000000000000000002018042310355789175100000000                                                                
  VERSION                          10.05.0008                                                                                                                      


  23 record(s) selected.


  Return Status = 0
[db2inst1@dbmon ~]$ db2 describe table xpf


                                Data type                     Column
Column name                     schema    Data type name      Length     Scale Nulls
------------------------------- --------- ------------------- ---------- ----- ------
ID                              SYSIBM    INTEGER                      4     0 Yes   
ADDRESS                         SYSIBM    CHARACTER                   20     0 Yes   
NAME                            SYSIBM    CHARACTER                   10     0 Yes   


  3 record(s) selected.


[db2inst1@dbmon ~]$ db2 "select * from xpf"


ID          ADDRESS              NAME      
----------- -------------------- ----------
          1 -                    james     
          2 -                    kobe      


  2 record(s) selected.


[db2inst1@dbmon ~]$ db2 "call sysproc.admin_move_table(
'DB2INST1',
'XPF',
'',
'',
'',
'',
'',
'',
'GUOMIN CHAR(10),ID INT,ADDRESS CHAR(20),NAME CHAR(10),CHANG ID',
'',
'MOVE')"
SQL0204N  "ID" is an undefined name.  SQLSTATE=42704
[db2inst1@dbmon ~]$ db2 "call sysproc.admin_move_table(
'DB2INST1',
'XPF',
'',
'',
'',
'',
'',
'',
'GUOMIN CHAR(10),ID INT,ADDRESS CHAR(20),NAME CHAR(10),CHANG INT',
'',
'MOVE')"




  Result set 1
  --------------


  KEY                              VALUE                                                                                                                           
  -------------------------------- --------------------------------------------------------------------------------------------------------------------------------
  AUTHID                           DB2INST1                                                                                                                        
  CLEANUP_END                      2018-04-23-10.37.37.555312                                                                                                      
  CLEANUP_START                    2018-04-23-10.37.37.449049                                                                                                      
  COPY_END                         2018-04-23-10.37.37.151351                                                                                                      
  COPY_OPTS                        ARRAY_INSERT,NON_CLUSTER                                                                                                        
  COPY_START                       2018-04-23-10.37.37.136013                                                                                                      
  COPY_TOTAL_ROWS                  2                                                                                                                               
  INDEXNAME                                                                                                                                                        
  INDEXSCHEMA                                                                                                                                                      
  INIT_END                         2018-04-23-10.37.37.052532                                                                                                      
  INIT_START                       2018-04-23-10.37.36.791936                                                                                                      
  ORIGINAL_TBLSIZE                 1024                                                                                                                            
  PAR_COLDEF                       GUOMIN CHAR(10),ID INT,ADDRESS CHAR(20),NAME CHAR(10),CHANG INT                                                                 
  REPLAY_END                       2018-04-23-10.37.37.433045                                                                                                      
  REPLAY_START                     2018-04-23-10.37.37.151726                                                                                                      
  REPLAY_TOTAL_ROWS                0                                                                                                                               
  REPLAY_TOTAL_TIME                0                                                                                                                               
  STATUS                           COMPLETE                                                                                                                        
  SWAP_END                         2018-04-23-10.37.37.437124                                                                                                      
  SWAP_RETRIES                     0                                                                                                                               
  SWAP_START                       2018-04-23-10.37.37.433898                                                                                                      
  UTILITY_INVOCATION_ID            01000000B9000000080000000000000000002018042310373705312000000000                                                                
  VERSION                          10.05.0008                                                                                                                      


  23 record(s) selected.


  Return Status = 0
[db2inst1@dbmon ~]$ db2 "select * from xpf"


GUOMIN     ID          ADDRESS              NAME       CHANG      
---------- ----------- -------------------- ---------- -----------
-                    1 -                    james                -
-                    2 -                    kobe                 -


  2 record(s) selected.


[db2inst1@dbmon ~]$ db2 "call sysproc.admin_move_table(
'DB2INST1',
'XPF',
'',
'',
'',
'',
'',
'',
'GUOMIN CHAR(10),ID INT,ADDRESS CHAR(20),NAME CHAR(10),CHANG INT,GoOD INT DEFAULT 0',
'',
'MOVE')"




  Result set 1
  --------------


  KEY                              VALUE                                                                                                                           
  -------------------------------- --------------------------------------------------------------------------------------------------------------------------------
  AUTHID                           DB2INST1                                                                                                                        
  CLEANUP_END                      2018-04-23-10.38.02.334491                                                                                                      
  CLEANUP_START                    2018-04-23-10.38.02.229604                                                                                                      
  COPY_END                         2018-04-23-10.38.01.964369                                                                                                      
  COPY_OPTS                        ARRAY_INSERT,NON_CLUSTER                                                                                                        
  COPY_START                       2018-04-23-10.38.01.954613                                                                                                      
  COPY_TOTAL_ROWS                  2                                                                                                                               
  INDEXNAME                                                                                                                                                        
  INDEXSCHEMA                                                                                                                                                      
  INIT_END                         2018-04-23-10.38.01.902304                                                                                                      
  INIT_START                       2018-04-23-10.38.01.590889                                                                                                      
  ORIGINAL_TBLSIZE                 1024                                                                                                                            
  PAR_COLDEF                       GUOMIN CHAR(10),ID INT,ADDRESS CHAR(20),NAME CHAR(10),CHANG INT,GOOD INT DEFAULT 0                                              
  REPLAY_END                       2018-04-23-10.38.02.209146                                                                                                      
  REPLAY_START                     2018-04-23-10.38.01.964878                                                                                                      
  REPLAY_TOTAL_ROWS                0                                                                                                                               
  REPLAY_TOTAL_TIME                0                                                                                                                               
  STATUS                           COMPLETE                                                                                                                        
  SWAP_END                         2018-04-23-10.38.02.213404                                                                                                      
  SWAP_RETRIES                     0                                                                                                                               
  SWAP_START                       2018-04-23-10.38.02.210102                                                                                                      
  UTILITY_INVOCATION_ID            01000000BA000000080000000000000000002018042310380190273200000000                                                                
  VERSION                          10.05.0008                                                                                                                      


  23 record(s) selected.


  Return Status = 0
[db2inst1@dbmon ~]$ db2 "select * from xpf"


GUOMIN     ID          ADDRESS              NAME       CHANG       GOOD       
---------- ----------- -------------------- ---------- ----------- -----------
-                    1 -                    james                -           0
-                    2 -                    kobe                 -           0


  2 record(s) selected.


[db2inst1@dbmon ~]$ db2 "call sysproc.admin_move_table(
'DB2INST1',
'XPF',
'',
'',
'',
'',
'',
'',
'ID INT',                                                                            
'',
'MOVE')"
SQL2105N  The ADMIN_MOVE_TABLE procedure could not be completed because a 
prerequisite for running the procedure was not satisfied.  Reason code: "23".  
SQLSTATE=5UA0M
[db2inst1@dbmon ~]$ db2 ? sql2105
DB21034E  The command was processed as an SQL statement because it was not a 
valid Command Line Processor command.  During SQL processing it returned:
SQL0104N  An unexpected token "b" was found following "a ".  Expected tokens 
may include:  "JOIN ".  SQLSTATE=42601
[db2inst1@dbmon ~]$ db2 ? sql2105n
DB21034E  The command was processed as an SQL statement because it was not a 
valid Command Line Processor command.  During SQL processing it returned:
SQL0104N  An unexpected token "b" was found following "a ".  Expected tokens 
may include:  "JOIN ".  SQLSTATE=42601
[db2inst1@dbmon ~]$ db2
(c) Copyright IBM Corporation 1993,2007
Command Line Processor for DB2 Client 10.5.8


You can issue database manager commands and SQL statements from the command 
prompt. For example:
    db2 => connect to sample
    db2 => bind sample.bnd


For general help, type: ?.
For command help, type: ? command, where command can be
the first few keyWords of a database manager command. For example:
 ? CATALOG DATABASE for help on the CATALOG DATABASE command
 ? CATALOG          for help on all of the CATALOG commands.


To exit db2 interactive mode, type QUIT at the command prompt. Outside 
interactive mode, all commands must be prefixed with 'db2'.
To list the current command option settings, type LIST COMMAND OPTIONS.


For more detailed help, refer to the Online Reference Manual.


db2 => ? SQL2105N




SQL2105N  The ADMIN_MOVE_TABLE procedure could not be completed because
      a prerequisite for running the procedure was not satisfied. Reason
      code: "".


Explanation: 


You can use the SYSPROC.ADMIN_MOVE_TABLE procedure to move data from one
table space to a another table space. For example, you can migrate that
data to a new automatic storage table space using this procedure. The
ADMIN_MOVE_TABLE procedure requires certain information or objects to
exist before it can run successfully. The reason code indicates what was
not satisfied:


10


         Index information cannot be found in the protocol table.


11


         Expected data cannot be found in the protocol table.


23


         The column could not be dropped as specified because a unique
         index must exist before a column can be dropped. The column
         that is to be dropped cannot exist in that unique index.


24


         A table space for regular data, large object (LOB) data, or
         indexes was specified but not all three of these table spaces
         were specified.


25


         A table with a LONG, LOB, structured type, or XML column was
         specified to be moved but a unique index (excluding unique
         indexes that include an XML column) is not defined on that
         table.


30


         The column could not be added as specified because any column
         that is being added and defined as NOT NULL must have a DEFAULT
         value specified.


User response: 


Respond according to the given reason code:


10


         Start the online move table operation again, which should fix
         the error in the protocol table.


11


         Start the online move table operation again, which should fix
         the error in the protocol table.


23


         Create a new unique index for the table, remove the column that
         is to be dropped from the unique index, or do not attempt to
         drop the column and retry the online move table operation.


24


         Specify all three table space parameters (regular data, large
         object data, and index) or none of these parameters.


25


         Create a unique index on the table, or do not attempt to move
         the table.


30


         Specify a DEFAULT value for any added column that is defined as
         NOT NULL.


sqlcode: -2105


sqlstate: 5UA0M




      Related information:
      Authorization


db2 => quit
DB20000I  The QUIT command completed successfully.
[db2inst1@dbmon ~]$ db2 "create unique index id_un on xpf(id):
> ^C
[db2inst1@dbmon ~]$ db2 "create unique index id_un on xpf(id)"
DB20000I  The SQL command completed successfully.
[db2inst1@dbmon ~]$ db2 "call sysproc.admin_move_table(
'DB2INST1',
'XPF',
'',
'',
'',
'',
'',
'',
'ID INT',
'',
'MOVE')"




  Result set 1
  --------------


  KEY                              VALUE                                                                                                                           
  -------------------------------- --------------------------------------------------------------------------------------------------------------------------------
  AUTHID                           DB2INST1                                                                                                                        
  CLEANUP_END                      2018-04-23-10.40.32.223403                                                                                                      
  CLEANUP_START                    2018-04-23-10.40.32.107334                                                                                                      
  COPY_END                         2018-04-23-10.40.31.981538                                                                                                      
  COPY_OPTS                        OVER_INDEX,ARRAY_INSERT,NON_CLUSTER                                                                                             
  COPY_START                       2018-04-23-10.40.31.803785                                                                                                      
  COPY_TOTAL_ROWS                  2                                                                                                                               
  INDEX_CREATION_TOTAL_TIME        0                                                                                                                               
  INDEXNAME                        ID_UN                                                                                                                           
  INDEXSCHEMA                      DB2INST1                                                                                                                        
  INIT_END                         2018-04-23-10.40.31.770811                                                                                                      
  INIT_START                       2018-04-23-10.40.31.477718                                                                                                      
  ORIGINAL_TBLSIZE                 1024                                                                                                                            
  PAR_COLDEF                       ID INT                                                                                                                          
  REPLAY_END                       2018-04-23-10.40.32.070045                                                                                                      
  REPLAY_START                     2018-04-23-10.40.31.982500                                                                                                      
  REPLAY_TOTAL_ROWS                0                                                                                                                               
  REPLAY_TOTAL_TIME                0                                                                                                                               
  STATUS                           COMPLETE                                                                                                                        
  SWAP_END                         2018-04-23-10.40.32.099560                                                                                                      
  SWAP_RETRIES                     0                                                                                                                               
  SWAP_START                       2018-04-23-10.40.32.076474                                                                                                      
  UTILITY_INVOCATION_ID            01000000BD000000080000000000000000002018042310403177121800000000                                                                
  VERSION                          10.05.0008                                                                                                                      


  24 record(s) selected.


  Return Status = 0
[db2inst1@dbmon ~]$ db2 "select * from xpf"


ID         
-----------
          1
          2


  2 record(s) selected.

您可能感兴趣的文档:

--结束END--

本文标题: admin_move_table在新添加删除字段

本文链接: https://www.lsjlt.com/news/49804.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • admin_move_table在新添加删除字段
    admin_move_table在线添加删除字段.txt IBM Knowledge Center - 通过使用 ADMIN_MOVE_TABLE 过程来以联机方式移动表.pdf https://ww...
    99+
    2024-04-02
  • MySQL中添加新字段
    © Ptw-cwl 要在MySQL中添加新字段,您可以使用ALTER TABLE语句。 以下是添加新字段的基本语法: ALTER TABLE table_name ADD column_name datatype; 其中: t...
    99+
    2023-08-17
    mysql 数据库 sql mysql添加字段 java
  • 如何在织梦CMS中添加新字段?
    如何在织梦CMS中添加新字段? 织梦CMS是一个功能强大且灵活的内容管理系统,它可以帮助网站管理员快速搭建和管理网站。在使用织梦CMS的过程中,有时候我们需要为特定模块或内容类型添加新...
    99+
    2024-03-13
    新字段添加 织梦cms修改 cms字段扩展
  • mysql怎么在某个字段后添加字段
    要在MySQL数据库中的某个字段后添加一个新字段,可以使用ALTER TABLE语句。以下是一个示例: 假设有一个名为users的表...
    99+
    2024-04-09
    mysql
  • mysql添加字段
    MySQL添加字段有两种方式:使用 ALTER TABLE 语句或使用 MySQL Workbench 工具。下面分别介绍这两种方法: 使用 ALTER TABLE 语句添加字段 ALTER TABL...
    99+
    2023-09-01
    mysql 数据库 sql
  • html如何添加字体删除线
    这篇文章主要讲解了“html如何添加字体删除线”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“html如何添加字体删除线”吧! h...
    99+
    2024-04-02
  • mysql中添加字段
    一、mysql中不同位置增加字段 增加字段(在特定的字段后增加) alter table 表名 add 需要修改/增加的信息 afer 字段名(在哪个字段后增加) alter table dept Add column name varch...
    99+
    2023-08-22
    mysql 数据库 java
  • java 动态添加字段 以及 动态新增字段注解
    本文是从别的文章作为基础进行创建的,方便自己进行相关操作。 引入依赖 javassist javassist 3.12.1.GA 我这里创建了一个空的对象 public class CitiesVo {} 创建...
    99+
    2023-08-22
    java 开发语言 spring
  • SQL Server数据库中怎么添加修改删除字段说明的
    SQL Server数据库中怎么添加修改删除字段说明的,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。  SQLServer数据...
    99+
    2024-04-02
  • Mysql修改字段类型、长度及添加删除列实例代码
    目录1、mysql中修改字段长度:2、mysql修改字段类型:3、mysql中增加列:4、mysql中修改列:5、mysql中删除列6、mysql 修改字段长度更多实例总结1、mysql中修改字段长度: ALTER TA...
    99+
    2023-04-20
    mysql修改字段长度命令 MySQL修改字段长度 数据库修改数据类型长度
  • word2010怎么给文字添加双删除线
    在Word 2010中给文字添加双删除线,可以按照以下步骤进行操作:1. 打开Word文档,选中要添加双删除线的文字。2. 在顶部功...
    99+
    2023-09-16
    Word
  • navicat如何添加字段
    在 navicat 中添加字段的操作步骤如下:选择表并进入表设计器。单击 "+字段" 按钮添加新字段。定义字段属性,包括字段名、数据类型、长度、默认值等。根据需要设置主键或外键约束。单击...
    99+
    2024-04-23
    navicat
  • c#怎么添加字段
    非常抱歉,由于您没有提供文章标题,我无法为您生成一篇高质量的文章。请您提供文章标题,我将尽快为您生成一篇优质的文章。...
    99+
    2024-05-14
  • Dreamweaver cs5字体家族如何添加删除字体
    这篇文章将为大家详细讲解有关Dreamweaver cs5字体家族如何添加删除字体,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。Dreamweaver想要打开字体家族,添加删除字体,方法如下在修改菜单下,...
    99+
    2023-06-08
  • PHP删除由addslashes添加的转义字符
    ...
    99+
    2024-04-02
  • word如何给文字添加双删除线
    在Word中,可以通过以下步骤给文字添加双删除线:1. 选中需要添加双删除线的文字。2. 在顶部菜单栏中选择“字体”选项卡。3. 在...
    99+
    2023-10-07
    word
  • sqlserver怎么添加字段
    在 SQL Server 中添加字段可以使用 ALTER TABLE 语句来实现。以下是一个简单的示例: ALTER TABLE 表...
    99+
    2024-04-09
    sqlserver
  • MySQL如何修改表结构及其添加删除修改字段功能
    这篇文章给大家分享的是有关MySQL如何修改表结构及其添加删除修改字段功能的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。MySQL修改表结构添加删除修改字段创建数据库CREATE...
    99+
    2024-04-02
  • mongodb如何删除字段
    mongodb中删除字段的方法:1、打开终端进入mongdb目录中的bin文件夹;2、启动mongodb服务;3、使用“show dbs”命令查看数据库;4、使用“use 数据库名字”命令进入需要使用的数据库;5、使用“show colle...
    99+
    2024-04-02
  • 在电脑上添加或删除帐户
    要在电脑上添加或删除帐户,您需要具有管理员权限。以下是在Windows和Mac操作系统上添加或删除帐户的步骤:在Windows上添加...
    99+
    2023-09-13
    电脑
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作