修改表字段语句: alter table 表名 alter column 字段名 set data type varchar(7700) 如: ALTER TABLE JV_BI_BACK_OPER_LOG alter column OPERATION_DESC set DATA TYPE varchar(7700) 查看表字段语句:select *from syscat.columns where tabname = '表名' and colname = '表列名',如: select *
解决DB2事物日志满.扩充表字段长度和表空间的命令 转:http://blog.sina.com.cn/s/blog_4c0137d10100bb5r.html 一.通常我们在使用db2导入数据或进行别的操作时会遇到事物日志已满的情况,导致操作无法继续. 在windows系统中,我们可先db2 get db cfg for dbname(要修改的数据库名) 来查看数据的配置情况. 这时根据你的需要来修改日志文件的大小.主日志文件数目和辅助日志文件的数目.命令如下: .db2 "update db
方案一: change ALTER TABLE t1 CHANGE a a VARCHAR(); change 可以用来更改字段名称和类型 ALTER TABLE table_name CHANGE old_name new_name column_definition; 方案二: modify ALTER TABLE t1 MODIFY a VARCHAR(); 可以使用modify来改变列的类型 ALTER TABLE table_name MODIFY column_name column
获取存储过程的修改时间和创建时间查询建立时间 --表 select * from sysobjects where id=object_id(N'表名') and xtype='U' --表的结构 select * from syscolumns where id=object_id(N'表名') --存储过程 select * from sysobjects where id=object_id(N'存储过程名') and xtype='P' 查询最后修改时间 --存储过程 select na
环境: Mysql数据库 库名:db_name 表名: table_name1 table_name2 查询一个里面所有表的信息: use information_scheam; select * from tables where table_schema = "db_name"; 查询单个表的信息: use information_scheam; select * from tables where table_schema = "db_name" and ta
DB2数据库备份与恢复 1. 备份 1.1离线备份(必须在数据库所在PC机进行操作) STEP 1 连接到要备份的数据库 C:\Documents and Settings\Administrator>db2 connect to ncc user nccwykpi using nccwykpi STEP 2 显示数据库应用状态 C:\Documents and Settings\Administrator>db2 list applications STEP 3 停掉数据库应用 C:\
作者:gnuhpc 出处:http://www.cnblogs.com/gnuhpc/ 1.级别对应 • Environment variables at the operating system level • The DB2 profile registry variables at the operating system and instance levels • The Database Manager (DBM) Configuration file at the instance
1.1查看表空间 db2 list tablespaces show detail 1.2查看数据库的表死锁 方法一: 打开监控 db2 update monitor switches using lock on 查看锁表 db2 get snapshot for locks on 数据库名称 db2 "force application (handle id)" 停止锁的进程 List Of Locks #在application handle紧跟后面出现list of l