0

I know the process to unlock a table through IBM DB2 Control Center using activity monitor, but I am completely new to IBM DB2 Data Studio 3.1 Administrative Tool. Whenever i am right clicking on that particular table only, and clicking on edit data*(to update the records in the table)*, i get the error com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-668, SQLSTATE=-57016,SQLERMC=-7; How do i unlock it using IBM DB2 Datastudio 3.1?

  • Can you explain the process of what you are trying to do? Are you asking how to create an event monitor through Data Studio 3.1? – Chris Aldrich Nov 12 '13 at 17:16
  • Chris: I have updated the question with the errors that i got during execution. – sTg Nov 13 '13 at 5:14
  • Interestingly enough, when I look up that error it appears that it is because of a DDL statement that places the table in a state that requires a REORG. Try that first. – Chris Aldrich Nov 13 '13 at 12:37
  • 1
    Is there any reference for how to use the REORG Command in IBM DB2 Data Studio 3.1? – sTg Nov 13 '13 at 12:41
  • You can either type it in the Command Editor. Or you can right-click on the table and select Manage | Reorg Table.... Then follow the editor to run it. – Chris Aldrich Nov 13 '13 at 13:50
2

There is no UNLOCK TABLE statement in DB2. Locks are released automatically upon commit or rollback.

  • 1
    Have you noticed that you linked to the Informix manual? There is no UNLOCK TABLE statement in DB2. Locks are released automatically upon commit or rollback. – mustaccio Nov 11 '13 at 17:08
  • 1
    How embarrassing. (looking down) – Peter Schuetze Nov 11 '13 at 17:26
2

Three unlock table commands are

    COMMIT
    ROLLBACK
    DISCONNECT

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.