Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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?

share|improve this question
    
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. –  Shirish 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
    
Is there any reference for how to use the REORG Command in IBM DB2 Data Studio 3.1? –  Shirish 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
show 1 more comment

2 Answers 2

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

share|improve this answer
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
add comment

Three unlock table commands are

    COMMIT
    ROLLBACK
    DISCONNECT
share|improve this answer
    
WarrenT : Can you please guide how to use this commands for what i am trying is ROLLBACK TABLE_NAME which gives an error. –  Shirish Nov 13 '13 at 7:16
    
ROLLBACK pic.dhe.ibm.com/infocenter/db2luw/v10r1/topic/… –  WarrenT Nov 13 '13 at 17:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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