Unlock a table of a ingres database

386 Views Asked by At

I have the problem that I runned an sql statement but haven't comitted it. Now the table is locked and I don't know how to unlock an Ingres database table.

I have searched for some information but I can't find anything.

Can anyone help me? Thanks in advance!

1

There are 1 best solutions below

0
On

The obvious solution would be to COMMIT your statement, assuming you are happy with what it has done. Or ROLLBACK if you aren't.

From the Ingres documentation:

Database changes made by a transaction are invisible to other users until the transaction is committed. In a multi-user environment, where more than one transaction is open concurrently, this behavior maintains database consistency. If two transactions are writing to the same database tables, the DBMS lock manager makes one transaction wait until the other is finished. A transaction that writes to the database locks pages in the tables that are affected, thus enforcing database consistency.

This assumes that you are using more than one session of course, as a table you are modifying shouldn't appear locked to the session modifying it. Just to other sessions until you have committed or rolled back your transaction.