exam questions

Exam 1z0-071 All Questions

View all questions & answers for the 1z0-071 exam

Exam 1z0-071 topic 1 question 194 discussion

Actual exam question from Oracle's 1z0-071
Question #: 194
Topic #: 1
[All 1z0-071 Questions]

Table HR.EMPLOYEES contains a row where the EMPLOYEE_ID is 109.

User ALICE has no privileges to access HR.EMPLOYEES.

User ALICE starts a session.

User HR starts a session and successfully executes these statements:

GRANT DELETE ON employees TO alice;

UPDATE employees SET salary = 24000 WHERE employee_id = 109;

In her existing session ALICE then executes:

DELETE FROM hr.employees WHERE employee_id = 109;

What is the result?

  • A. The DELETE command will wait for HR’s transaction to end then return an error.
  • B. The DELETE command will immediately delete the row.
  • C. The DELETE command will wait for HR’s transaction to end then delete the row.
  • D. The DELETE command will immediately return an error.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Thameur01
2 months, 3 weeks ago
Selected Answer: C
UPDATE is DML and not a DDL, it does not implicitly commit the transaction. C. The DELETE command will wait for HR’s transaction to end then delete the row. ALICE’s DELETE command will wait for HR’s transaction to complete (either commit or rollback) and then delete the row.
upvoted 1 times
...
Thameur01
3 months ago
Selected Answer: A
- When HR executes the UPDATE statement, Oracle places a row-level lock (also known as a TM lock) on the row with employee_id = 109. This lock prevents other sessions, including ALICE's, from modifying or deleting the same row until HR's transaction is either committed or rolled back. - ALICE’s DELETE command will detect the lock on the row with employee_id = 109 and wait for HR’s transaction to complete. - Once HR commits the update, the row is no longer locked. However: -Oracle’s Read Consistency Rule ensures that ALICE's session operates under the "view" of the data at the point in time when ALICE started her session (or query). -Since the row has been modified after ALICE’s session began, ALICE's DELETE will fail with an ORA-08177: Cannot serialize access for this transaction error, because the row has been changed by another committed transaction.
upvoted 1 times
...
kay000001
5 months, 1 week ago
Selected Answer: D
D is correct. Alice needs Session previlages (not just Select).
upvoted 1 times
...
yanoolthecool
1 year, 3 months ago
Selected Answer: D
I'm seeing a lot of debate here about the security, but what about data lock? nothing indicates that the HR committed the update, thus; shouldn't the row be locked?
upvoted 2 times
...
jm9999
1 year, 6 months ago
Selected Answer: D
C gives ORA-41900
upvoted 1 times
jm9999
1 year, 6 months ago
If you are finding C works, check to see if 'Alice' has the select any table privilege. That was an issue for me.
upvoted 2 times
...
AlCoholic69
1 year, 5 months ago
This depends on SQL92_SECURITY parameter and the default varies with database version. https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/SQL92_SECURITY.html#GUID-E41087C2-250E-4201-908B-79E659B22A4B
upvoted 1 times
...
...
XTIMON
1 year, 7 months ago
Selected Answer: D
D is correct. ALICE needs SELECT privileges also
upvoted 2 times
AlCoholic69
1 year, 5 months ago
It depends on parameter. Both C and D might be correct. I would vote D because i think it's the default setting on Oracle 19. https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/SQL92_SECURITY.html#GUID-E41087C2-250E-4201-908B-79E659B22A4B
upvoted 1 times
...
...
AlexAFJ
1 year, 7 months ago
Selected Answer: C
Tested, C is correct, i updated row as sys user and deleted as test user, it was stuck in scrip runner, as soon as I commited in sys session delete did happen in test user session
upvoted 2 times
...
CMjer
1 year, 10 months ago
Selected Answer: D
https://www.examtopics.com/discussions/oracle/view/22160-exam-1z0-071-topic-2-question-65-discussion/
upvoted 1 times
CyberP
1 year, 10 months ago
But in the link that you provide, half of them choose C as correct answer
upvoted 2 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago