做DB2的插入操作报错
db2 => insert into atmjobsts values ('20090805','2')
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0964C The transaction log for the database is full. SQLSTATE=57011
原因:
缓冲池扩展失败,由于可用的虚拟内存的大小不足
-----------------------------------------------------------------------------------------------
解决:
1. 查看
db2 => get db cfg
Database Configuration for Database
...
Log file size (4KB) (LOGFILSIZ) = 10240
Number of primary log files (LOGPRIMARY) = 13
Number of secondary log files (LOGSECOND) = 4
Changed path to log files (NEWLOGPATH) =
Path to log files = /db2data/db2shjh/db2inst1/NODE0000/SQL00001/SQLOGDIR/
Overflow log path (OVERFLOWLOGPATH) =
Mirror log path (MIRRORLOGPATH) =
First active log file =
Block log on disk full (BLK_LOG_DSK_FUL) = NO
Percent max primary log space by transaction (MAX_LOG) = 0
Num. of active log files for 1 active UOW(NUM_LOG_SPAN) = 0
...
2. 修改
后来把这个参数的大小相应调整了一下,调整后如下:
Log file size (4KB) (LOGFILSIZ) = 61440
调整方法为
update db cfg using LOGFILSIZ 61440
3. 调整后重启数据库
执行 db2stop 来停止DB2服务,如果停止不掉可以考虑执行 db2stop force 强制停止。
执行 db2start 启动DB2服务。
4. 查看
Log file size (4KB) (LOGFILSIZ) = 61440
Number of primary log files (LOGPRIMARY) = 13
Number of secondary log files (LOGSECOND) = 4
Changed path to log files (NEWLOGPATH) =
Path to log files = /db2data/db2shjh/db2inst1/NODE0000/SQL00001/SQLOGDIR/
Overflow log path (OVERFLOWLOGPATH) =
Mirror log path (MIRRORLOGPATH) =
First active log file =
Block log on disk full (BLK_LOG_DSK_FUL) = NO
Percent max primary log space by transaction (MAX_LOG) = 0
Num. of active log files for 1 active UOW(NUM_LOG_SPAN) = 0
5. 再执行 插入操作 OK 解决
db2 => insert into atmjobsts values('20090805','3')
DB20000I The SQL command completed successfully.
------------------------
over. haha!
分享到:
相关推荐
基于.net sql server的连接池管理(支持事务管理)类库 轻松实现事务, 示例: public SqlTransaction Transaction { get { return this._transaction; } set { this._transaction = value; userdal....
* When updating blob fields in a TClientDataset with the LogChanges property set to False, blob data is lost from other unrelated records (Quality Central 6591). * Using a Filter or Locate with a ...
在企业级应用开发过程中,经常需要处理来自不同数据库的数据集成问题。PowerBuilder作为一款强大的快速应用开发工具,支持多种数据库的连接与操作,能够实现跨数据库的操作,这对于构建复杂的企业级应用至关重要。...
### LogExplorer4.2 For SQL Server使用教程 #### 一、LogExplorer4.2简介与功能 **Log Explorer**是一款专用于Microsoft SQL Server事务分析和数据恢复的强大工具。这款工具可以帮助用户浏览数据库日志文件、导出...
恢复完后,再打开log explorer 提示No log recorders found that match the filter,would you like to view unfiltered data 选择yes 就看不到刚才在2中修改的日志记录,所以无法做恢复. 3) 不要用SQL的备份...
java.sql.SQLInvalidAuthorizationSpecException异常是Java应用程序在尝试连接数据库时可能遇到的一个异常,它表明授权信息不正确或授权规范无效。这个异常通常是由于数据库连接字符串、用户名、密码配置错误;...
### Attach a SQL Server Database with a Missing Transaction Log File 在日常的数据库管理与维护工作中,遇到丢失事务日志文件的情况并不少见。这类问题通常会给数据库的正常运行带来一定困扰,尤其是当试图附加...
支持 MS SQL 2005 之前的版本 不支持 sql 2008 介绍 Log Explorer主要用于对MSSQLServer的事物分析和数据恢复。你可以浏览日志、导出数据、恢复被修改或者删除的数据(包括执行过update,delete,drop和truncate语句的...
For example, if you defer constraint checking, it is your responsibility to ensure that the database is consistent. Isolation Concurrent transactions are isolated from the updates of other incomplete...
1. The Evolution of Microsoft SQL Server: 1989 to 2000 [加入我的離線書架] . SQL Server: The Early Years . Ron's Story . Kalen's Story . Microsoft SQL Server Ships . Development Roles Evolve . OS...
《DB2 SQL精粹》是一本深入探讨DB2数据库管理系统中SQL语言的专著,旨在帮助读者全面理解和熟练运用DB2 SQL进行数据管理和分析。DB2是IBM公司开发的一款关系型数据库管理系统,广泛应用于企业级的数据存储和处理,其...
C# oracle 类 事务处理 #region 公有方法 public void JoinTransaction(Transaction transaction) { if (this._transaction != null) { throw new Exception("对象已经在另一个事务中"); } else { this._...
SqlTransaction st = conn.BeginTransaction(); SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; try { cmd.CommandText = sql1; cmd.ExecuteNonQuery(); cmd.CommandText = sql2; cmd....
【javax.transaction.jar】是Java平台上的一个核心组件,主要用于处理分布式环境中的事务管理。这个库包含了一组接口和类,这些接口和类定义了事务管理的API,使得开发者能够在Java应用程序中实现事务处理的规范。在...
日志文件(Transaction Log)是SQL Server数据库的重要组成部分,它记录了所有事务的详细信息,包括开始、提交和回滚等操作。在发生错误或系统崩溃时,这些日志可以用于执行检查点操作,恢复未完成的事务,从而确保...
ls_style = "BACKUP DATABASE " + as_databasename + " TO disk='" + as_path + "' WITH FORMAT, NAME='FullBackup'" EXECUTE IMMEDIATE :ls_style; ``` 这里定义了具体的备份命令,其中`as_databasename`是需要...
### Oracle Database 10g: The Top 20 Features for DBAs #### 1. Flashback Versions Query **Description:** This feature allows database administrators (DBAs) to query the history of data changes within ...
The difference is that it doesn't translate object manipulations into SQL requests because it speaks directly to the database layer. I would love to write a proper Dbf to Linq interface, if you want ...
3.1.2 Role of the Database for the ABAP Application Server ............................................. 109 3.1.3 Data Types ........................................................ 110 3.2 ABAP ...