IBM Data Studio Connection error SQL1035N

3.4k views Asked by At

I have been searching in IBM forums/documentation, Google, and StackOverflow topics about this error, but I can't manage to find the solution.

Situation

Installed DB2 for test and education purposes, since I'm a student and I have to do a manual about the usage of this DB. Installation of DB2 and graphical administration through Data Studio.

OS: Debian 7.7 Wheezy

DB2 Version: 10.5 FixPack 4 (Cancuun Release)

IBM Data Studio Version: 4.1.1

Installed DB2 and Data Studio as root.

I can execute commands in terminal like:

db2start
db2stop
db2_kill
db2

Also I can execute commands in db2 Command Line Processor like: I can create a database: db2 => CREATE DATABASE SAMPLE also it connects correctly: db2 => CONNECT TO SAMPLE and I can query to connected database: db2=> SELECT COUNT(COL) FROM TABLE

DB2 is working good, sometimes it hangs and I have to command db2_kill and restart with db2start It's weird that it hangs everytime I create a new DB. But anyways, it's able to connect and execute commands like above.

Data Studio installation is correct. The application is opened without problem.

I created a new database named example through:

db2inst1@debian:$ db2 CREATE DATABASE EXAMPLE

I installed both products twice, and in two different machines. And the problem still exists.

I also have to add that I tried running Data Studio as Debian user and root, returning the same error.

Problem

In Data Studio when I open the window/dialog of creating a new Connection, I configure the database connection settings:

Database Name: EXAMPLE Server: localhost Port: 50000 Username: db2inst1 Password: password

And when I click Next or Test Connection, the problem appears:

Hand-translated Spanish to English translation:

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

Error is SQL1035N

IBM documents that SQL1035N is caused because:

  1. There are remaining open connections to the database. It is not this one because I have command db2_kill and db2start and command: db2 list active databases returns no data.

  2. The database has been activated explicitly I have tried ACTIVATE and DEACTIVATE commands, and still not working it returns the same error as 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. The database is in WRITE SUSPEND mode. I tried fixing this by commanding SET WRITE RESUME FOR DATABASE, and it returns:

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

This is not the problem because there are no connections to the database

Now, if I click the copy to clipboard it copies the complete error trace, or stack trace. Here it is, but written in spanish. Anyways, it shouldn't be a problem to understand it, since most information is technical, and there is not many spanish words.

Thanks for your help.

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)

I will also copy and paste this topic to IBM forum, just to address them this error directly.

Thanks again.

1

There are 1 answers

0
Jesus Gonzalez On BEST ANSWER

The problem is solved.

I will answer my own question:

How did I solve it?

I downgraded from V10.5 to V9.7 FixPack 6

Also, I checked Linux platforms supported by DB2, and I chose to install 9.7 Express FP6 in Ubuntu 12.04.5, and right now, after installing the overall system, Ubuntu and DB2, I am using the Control Center, allowing me to create DB and query the DB successfully.

Classic works

Thank you

Edit at 18 January 2015

I reinstalled DB2 V10.5 and this time the DB creation worked. And I'm remarking time, because I had to wait 5 minutes for the DB to be created. This is the main issue I think I had previously, as it was answered in IBM official forum, since I was trying to create it in a VM and the proccess takes a bit longer.