Restrict table access

Hi,
We on db9.5/aix i want to users to have no acess to tables when insert is going on after
insert they can have acess.

Thanks
sam2929Asked:
Who is Participating?
 
momi_sabagCommented:
so the process that performs the insert can issue this statement

lock table table_name in exclusive mode

once this statement is in effect, no other process will be able to access the table (unless it uses UR isolation)
note that this statement should be issued after every commit
0
 
momi_sabagCommented:
what do you mean by users have no access when insert is going on?
during the insert, the new data is not accessible to others until it is committed

what are you trying to achieve?
0
 
sam2929Author Commented:
i mean if they run selct they should get error like that table is loading
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
tliottaCommented:
So, while some INSERT process is running, you want it to have exclusive access? All other processes should be locked out until the INSERT process finishes?

Tom
0
 
momi_sabagCommented:
you can't have such an error returned
you can revoke permissions before the load start and return them once it ends, but that does not sound like a good idea to me.
which platform of db2 are you using and what is exactly the problem you are trying to solve?
0
 
sam2929Author Commented:
So, while some INSERT process is running, you want it to have exclusive access? All other processes should be locked out until the INSERT process finishes?

Yes
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.