We need to test how an application will fail when the DB2 database cannot be written to.
What is the easiest way to make a DB2 table read-only? Is this considered locking?
Thanks in advance, Bert
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 only takes a minute to sign up.
Sign up to join this communityWe need to test how an application will fail when the DB2 database cannot be written to.
What is the easiest way to make a DB2 table read-only? Is this considered locking?
Thanks in advance, Bert
There are a couple of ways to test it:
LOCK TABLE
and put it in "exclusive" modeThere are many testing scenarios and most of them will result in a different error message.
You can create a trigger on insert, delete or update on the table that will raise asignal automatically for these operations. This will make the tBle as read only and the security remain the same