DB2数据库执行SQL语句报错

Randall420 2017-05-15 12:34:30
[DB2/AIX64] SQL1224N 由于数据库管理器发生了错误或者被强制中断,从而无法接受新的请求,已终止正在处理的所有请求或者已终止所指定的请求。 LINE NUMBER=2. SQLSTATE=55032
...全文
1168 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
pageyehl 2017-05-17
  • 打赏
  • 举报
回复
不了解具体情况, 这里是这个error 的 解释。 C:\Users\IBM_ADMIN>db2 ? sql1224N SQL1224N The database manager is not able to accept new requests, has terminated all requests in progress, or has terminated the specified request because of an error or a forced interrupt. Explanation: The message might be due to any of the following causes. 1 * The database manager has not been started on the database server. * The database manager was stopped. * The database agent was forced off by the system administrator. * The database agent was forced off by the DB2 Governor tool. * The database agent was terminated due to an abnormal termination of a key database manager process. 2 A user with SYSADM authority issued a FORCE QUIESCE command while your user ID was connected. Because the user ID does not have CONNECT QUIESCE authority for the database or instance or belong to a group that has CONNECT QUIESCE authority, the user ID was disconnected from the database or instance. 3 The application was forced off because it was using more transaction log space than allowed by the database configuration parameter max_log or num_log_span. 4 The application is using multiple contexts with local protocol. A context is the environment from which an application runs all SQL statements and API calls. All connections, units of work, and other database resources are associated with a specific context. Each context is associated with one or more threads within an application. In this case, the number of connections is limited by the number of shared memory segments to which a single process can be attached. For example, on AIX operating systems, the limit is 10 shared memory segments per process. 5 On the Windows operating system with Extended Security enabled, a request was submitted to the database under a user ID that was not a member of the DB2USERS or DBADMINS group. Extended Security prevents unauthorized access to the DB2 product by locking DB2 system files and is enabled by default. 6 A query is being timed out because SQL_ATTR_QUERY_TIMEOUT is set to a value that is too low, and the query should not be timed out. SQL_ATTR_QUERY_TIMEOUT indicates the number of seconds to wait for an SQL statement to complete executing before attempting to cancel the execution. 7 The application was forced off after waiting for a lock held by an application using WITH HOLD cursors and queued for execution in concentrator mode. 8 The database connection was closed because the total time that it remained idle exceeded the value allowed by a defined CONNECTIONIDLETIME threshold. 9 The database connection was closed because it had submitted a unit of work whose total time had exceeded the value allowed by a defined UOWTOTALTIME threshold. Additional federated server cases are as follows: * The maximum number of processes per user (specified by maxuproc on AIX operating systems) at the operating system level has been exceeded. * In a client/server environment using the TCP/IP protocol, the port number assigned to the TCP/IP service name on the client is not the same as the port number on the server. The error condition can be detected by the federated server or by the data source. User response: The numbered user responses correspond to the problem causes in the previous list: 1 Reissue the database request. If a connection cannot be established, then ensure that the database manager has been started successfully. The database administrator should check the DB2 server's administration notification log file for information regarding abnormal termination and potential automatic DB2 recovery from this abnormal termination. If necessary, contact IBM Software Support about this issue. 2 Have the administrator unquiesce the database or instance or add the user ID to the group that has CONNECT QUIESCE authority. A quiesce can be executed at the instance, table space, or database level. 3 Modify the application to issue more frequent commit statements. The max_log configuration parameter prevents individual transactions from using too much log space. The num_log_span configuration parameter prevents individual transactions from holding up the reuse of transaction log space. When designing an application, consider when to commit transactions to prevent excessive log space use. Also consider having the administrator modify the transaction log parameters. 4 Either catalog the database as a loopback data source using TCP/IP, or set the EXTSHM parameter if the application supports this and sufficient memory resources exist to use it. 5 Add the appropriate user ID to the local Windows security group DB2USERS or DB2ADMNS by using the Windows Computer Management tool. A workaround is to disable Extended Security but this might not be desirable because it reduces the level of security on your system. 6 Change the setting of SQL_ATTR_QUERY_TIMEOUT in the application. An application can use the SQLSetStmtAttr() function to set the statement attribute. If you cannot modify the application (that is, because it is a third-party ODBC application), you can set QueryTimeoutInterval to 0. The QueryTimeoutInterval value specifies how long the query timeout thread waits between checks for expired queries. If the value is 0, the CLI driver ignores the SQL_ATTR_QUERY_TIMEOUT setting and therefore waits for SQL statements to complete execution before returning to the application. Note: If you set QueryTimeoutInterval to 0, any attempt by the application to set SQL_ATTR_QUERY_TIMEOUT results in SQLSTATE 01S02. 7 Increase the value of max_coordagents relative to the value of max_connections. Applications that hold locks in WITH HOLD cursors and are queued for execution in concentrator mode might cause active agents to be held up waiting for those locks. This scenario in conjunction with the value of max_coordagents being reached renders the system unable to service the queued application so that it can release the lock and resolve the situation. To reduce the chances of this scenario occurring, configure more coordinator agents on the system, or reduce the use of WITH HOLD cursors. 8 Use the CONNECTIONIDLETIME threshold to increase the maximum time that the connection can remain idle. 9 Use the UOWTOTALTIME threshold to increase the maximum time that the unit of work can execute. If you are a federated system user, you might also need to take the following actions: * Isolate the problem to the data source that rejected the request (see the Troubleshooting Guide for procedures to follow to identify the failing data source). Also, ensure that the communication subsystem is active and that the database manager and required communication protocol server processes have been started on the database server. * For AIX operating systems, check the setting of maxuproc, and change it if needed. The maxuproc device attribute restricts the number of processes that can run on a given federated server. The default setting is 40. You can check the current setting of maxuproc by using the following command: lsattr -E -l sys0 To view the number of processes currently running on a given federated server, use the following command: ps -ef | grep instdj1 | wc -l where instdj1 is the instance name of the federated server. To change maxuproc, use the following command: chdev -l sys0 -a maxuproc='nn' where nn is the new integer value of maxuproc. If the application is using multiple contexts with local protocol, then either reduce the number of connections in the application, or switch to another protocol (for example, TCP/IP). If you are using AIX Version 4.2.1 or later, you can set the environment variable EXTSHM to ON to increase the number of shared memory segments to which a single process can be attached. sqlcode: -1224 sqlstate: 55032 Related information Updating environment settings for a partitioned DB2 installation (AIX) STOP DATABASE MANAGER command C:\Users\IBM_ADMIN>

5,889

社区成员

发帖
与我相关
我的任务
社区描述
IBM DB2 是美国IBM公司开发的一套关系型数据库管理系统,它主要的运行环境为UNIX(包括IBM自家的AIX)、Linux、IBM i(旧称OS/400)、z/OS,以及Windows服务器版本
社区管理员
  • DB2
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧