2

我一直在 IBM 论坛/文档、Google 和 StackOverflow 主题中搜索有关此错误的信息,但我无法找到解决方案。

情况

安装 DB2 用于测试和教育目的,因为我是一名学生,并且我必须编写有关此 DB 使用的手册。通过 Data Studio 安装 DB2 和图形管理。

操作系统: Debian 7.7 Wheezy

DB2 版本: 10.5 FixPack 4(坎昆版本)

IBM Data Studio 版本: 4.1.1

以 root 身份安装 DB2 和 Data Studio。

我可以在终端中执行命令,例如:

db2start
db2stop
db2_kill
db2

我还可以在 db2 命令行处理器中执行命令,例如:我可以创建一个数据库:db2 => CREATE DATABASE SAMPLE 它也可以正确连接:db2 => CONNECT TO SAMPLE 并且我可以查询连接的数据库:db2=> SELECT COUNT(COL) FROM TABLE

DB2 运行良好,有时会挂起,我必须命令db2_kill并使用db2start重新启动 。每次创建新数据库时它都会挂起,这很奇怪。但无论如何,它能够连接和执行上述命令。

Data Studio 安装正确。应用程序打开没有问题。

我通过以下方式创建了一个名为 example 的新数据库:

db2inst1@debian:$ db2 CREATE DATABASE EXAMPLE

我在两台不同的机器上安装了这两种产品两次。而且问题依然存在。

我还必须补充一点,我尝试以 Debian 用户和 root 身份运行 Data Studio,返回相同的错误。

问题

在 Data Studio 中,当我打开创建新连接的窗口/对话框时,我配置了数据库连接设置:

数据库名称: EXAMPLE 服务器: localhost 端口: 50000 用户名: db2inst1 密码: password

当我单击下一步或测试连接时,出现问题:

手译西班牙语到英语翻译:

Not successful conecction attempt
Summary: SQL1035N A connection attempt has failed and a SQL exception has been generated.
Explanation: The connection attempt has generated a SQL Exception. The SQL Exception content is: null
Check the SQL code associated to the SQL Exception to determinate the cause of the problem.

SQLSTATE: 57019

错误是 SQL1035N

IBM 记录了导致 SQL1035N 的原因是:

  1. 数据库还有剩余的打开连接。不是这个,因为我有命令db2_killdb2start命令:db2 list active databases不返回数据。

  2. 数据库已被显式激活我已经尝试过ACTIVATE命令DEACTIVATE,但仍然无法正常工作它返回与 Data Studio 相同的错误,SQL1035N

    db2 => ACTIVATE DATABASE EJEMPLO SQL1035N La operación ha fallado porque la base de datos especificada no puede conectarse en la modalidad solicitada. SQLSTATE=57019 SQL1035N The operation has failed because the specified database cannot connect in the requested mode. SQLSTATE=57019

  3. 数据库处于 WRITE SUSPEND 模式。我尝试通过命令 SET WRITE RESUME FOR DATABASE 来解决这个问题,它返回:

    SQL1024 There are no connections to the database. SQL=08003

这不是问题,因为没有与数据库的连接

现在,如果我单击复制到剪贴板,它会复制完整的错误跟踪或堆栈跟踪。在这里,但是用西班牙语写的。无论如何,理解它应该不成问题,因为大多数信息都是技术性的,而且西班牙语单词并不多。

谢谢你的帮助。

Explicación

<b>Explicación:</b><br/><br/>el intento de conexión ha generado una excepción de SQL. El contenido de la excepción de SQL es:  null
<br/><b>Respuesta del usuario:</b><br/><br/>inspeccione el código SQL asociado a la excepción de SQL para determinar la causa del problema.
SQLSSTATE: 57019

Soporte

Propiedades de conexión

Base de datos: EJEMPLO
URL:  jdbc:db2://localhost:50000/EJEMPLO:retrieveMessagesFromServerOnGetMessage=true;
Nombre de usuario: db2inst1
Contraseña: (No se muestra)

Entorno

Nombre de clase de controlador = com.ibm.db2.jcc.DB2Driver
Versión de controlador = 4.18.60
Vía de acceso al archivo JAR del controlador = /opt/IBM/SDPShared/plugins/com.ibm.datatools.db2_2.2.100.v20140708_0755/driver/db2jcc4.jar:/opt/IBM/SDPShared/plugins/com.ibm.datatools.db2_2.2.100.v20140708_0755/driver/db2jcc_license_cisuz.jar
Nombre de sistema operativo = Linux
Arquitectura del sistema operativo = amd64
Versión del sistema operativo = 3.2.0-4-amd64
Proveedor de implementación de JVM = IBM Corporation
Tiempo de ejecución de JVM = Java(TM) SE Runtime Environment
Versión Java = JRE 1.7.0 IBM J9 2.7 Linux amd64-64 Compressed References 20140410_195893 (JIT enabled, AOT enabled)
J9VM - R27_Java727_SR1_20140410_1931_B195893
JIT  - tr.r13.java_20140410_61421
GC   - R27_Java727_SR1_20140410_1931_B195893_CMPRSS
J9CL - 20140410_195893
Lanzador = /opt/IBM/DS4.1.1/eclipse

Rastreo de pila

com.ibm.db2.jcc.am.SqlExceptioncom.ibm.db2.jcc.am.kd.a(Unknown Source)
com.ibm.db2.jcc.am.kd.a(Unknown Source)
com.ibm.db2.jcc.am.kd.a(Unknown Source)
com.ibm.db2.jcc.am.Connection.completeSqlca(Unknown Source)
com.ibm.db2.jcc.t4.z.q(Unknown Source)
com.ibm.db2.jcc.t4.z.p(Unknown Source)
com.ibm.db2.jcc.t4.z.l(Unknown Source)
com.ibm.db2.jcc.t4.z.d(Unknown Source)
com.ibm.db2.jcc.t4.b.k(Unknown Source)
com.ibm.db2.jcc.t4.b.b(Unknown Source)
com.ibm.db2.jcc.t4.b.a(Unknown Source)
com.ibm.db2.jcc.t4.b.b(Unknown Source)
com.ibm.db2.jcc.t4.b.a(Unknown Source)
com.ibm.db2.jcc.t4.b.a(Unknown Source)
com.ibm.db2.jcc.t4.b.a(Unknown Source)
com.ibm.db2.jcc.t4.b.<init>(Unknown Source)
com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(Unknown Source)
com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(Unknown Source)
com.ibm.db2.jcc.DB2Driver.connect(Unknown Source)
com.ibm.db2.jcc.DB2Driver.connect(Unknown Source)
org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.createConnection(Unknown Source)
org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(Unknown Source)
org.eclipse.datatools.connectivity.DriverConnectionBase.open(Unknown Source)
org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open(Unknown Source)
org.eclipse.datatools.enablement.ibm.db2.internal.luw.JDBCLUWConnectionFactory.createConnection(Unknown Source)
org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(Unknown Source)
org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(Unknown Source)
com.ibm.datatools.connection.internal.ui.databases.NewDatabaseConnnectionWizardPage.handleTestConnection(Unknown Source)
com.ibm.datatools.connection.internal.ui.databases.NewDatabaseConnnectionWizardPage.access$6(Unknown Source)
com.ibm.datatools.connection.internal.ui.databases.NewDatabaseConnnectionWizardPage$10.handleEvent(Unknown Source)
org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
org.eclipse.jface.window.Window.runEventLoop(Unknown Source)
org.eclipse.jface.window.Window.open(Unknown Source)
com.ibm.datatools.connection.internal.ui.databases.actions.NewDBConnectionHandler.execute(Unknown Source)
org.eclipse.ui.internal.handlers.HandlerProxy.execute(Unknown Source)
org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.eclipse.e4.core.internal.di.MethodRequestor.execute(Unknown Source)
org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(Unknown Source)
org.eclipse.e4.core.internal.di.InjectorImpl.invoke(Unknown Source)
org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(Unknown Source)
org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(Unknown Source)
org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(Unknown Source)
org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(Unknown Source)
org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(Unknown Source)
org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(Unknown Source)
org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(Unknown Source)
org.eclipse.core.databinding.observable.Realm.runWithDefault(Unknown Source)
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(Unknown Source)
org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(Unknown Source)
org.eclipse.ui.internal.Workbench$5.run(Unknown Source)
org.eclipse.core.databinding.observable.Realm.runWithDefault(Unknown Source)
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown Source)
org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Source)
org.eclipse.ui.internal.ide.application.IDEApplication.start(Unknown Source)
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Unknown Source)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown Source)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown Source)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.eclipse.equinox.launcher.Main.invokeFramework(Unknown Source)
org.eclipse.equinox.launcher.Main.basicRun(Unknown Source)
org.eclipse.equinox.launcher.Main.run(Unknown Source)
org.eclipse.equinox.launcher.Main.main(Unknown Source)

我还将这个主题复制并粘贴到 IBM 论坛,只是为了直接解决这个错误。

再次感谢。

4

1 回答 1

1

问题解决了。

我将回答我自己的问题:

我是怎么解决的?

我从 V10.5 降级到 V9.7 FixPack 6

另外,我检查了 DB2 支持的 Linux 平台,我选择在 Ubuntu 12.04.5 中安装 9.7 Express FP6,现在,在安装了整个系统、Ubuntu 和 DB2 之后,我正在使用控制中心,允许我创建 DB并成功查询数据库。

经典作品

谢谢

2015 年 1 月 18 日编辑

我重新安装了 DB2 V10.5,这一次数据库创建工作正常了。我正在备注时间,因为我必须等待 5 分钟才能创建数据库。这是我认为我之前遇到的主要问题,因为它在 IBM 官方论坛中得到了回答,因为我试图在 VM 中创建它并且过程需要更长的时间。

于 2014-11-24T17:30:48.427 回答