Quiz

Because I’m off now for the next 4 days (I’m back on Monday) I decided to leave you a little Oracle quiz. You’ll get the answer then next week. So here we go:

You’ve two sessions: SessionA and SessionB. Both of them perform a insert on the same table (insert into data…) without a commit.
The question now is: Can one insert block the other one?

Just post your thoughts as comment!

Cheers!

Author: Gerald

Developer, Oracle expert, performance enthusiast and genuine technology geek.

5 thoughts on “Quiz”

  1. A lack of available ITL slots could cause a wait/block such that sessionB is waiting for sessionA (or some other session) to commit and release its ITL slot.

  2. Even easier. Two INSERTs trying the same primary key or unique key (constraint must be enabled and not deferred). The second waits until the first is committed before reporting the key violation (or it succeeds if the first is rolled back instead).

  3. To answer the question correctly I think we need more information.

    Assuming there are no constraints in place, my answer would be:

    “No way, both inserts will be successful.”

    If there are constraints like PK or UK then check out Gary’s reply (right above mine).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s