An Oracle Database session has an uncommitted transaction in progress which updated 5000 rows in a table. In which three situations does the transaction complete thereby committing the updates? (Choose three.)
A.
when a CREATE TABLE AS SELECT statement is issued in the same session but fails with a syntax error
B.
when a DBA issues a successful SHUTDOWN TRANSACTIONAL statement and the user then issues a COMMIT
C.
when the session logs out successfully
D.
when a CREATE INDEX statement is executed successfully in the same session
E.
when a DBA issues a successful SHUTDOWN IMMEDIATE statement and the user then issues a COMMIT
F.
when a COMMIT statement is issued by the same user from another session in the same database instance
Should be BCD:
A - FALSE
- it is syntax error therefore does not implicitly commit: Oracle Database issues an implicit COMMIT under the following circumstances:
Before any syntactically valid data definition language (DDL) statement, even if the statement results in an error
After any data definition language (DDL) statement that completes without an errorhttps://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/COMMIT.html#GUID-6CD5C9A7-54B9-4FA2-BA3C-D6B4492B9EE2
A - false since it is syntax error (checked ) if it is run time error then it commits the transaction.
B is true The SHUTDOWN TRANSACTIONAL waits for all uncommitted transactions to complete before shutting down the database instance. This saves the work for all users without requesting them to log off.
BCD would be the right answer
Chat GPT says A is correct and B is wrong.
as SHUTDOWN TRANSACTIONAL functionality is that it waits all transactions to end then it shuts down the database, but he says since it was 'successful' then that means that the database already was shut down before the user committed.
I think there is some logical problem with the answer.. its confusing, how is it successful but there was still a transaction in progress?
ALTER TABLE and CREATE INDEX , which do cause a commit.
Oracle performs an implicit commit after any SQL DDL (Data Definition Language) statement (even if this DDL statement fails).
This includes table / index creation. So no open transaction should exist.
I CHECKED making an experiment and A IS CORRECT answer.
Looks like just CREATE TABLE AS creates a COMMIT (error was placed later - I used unexisting table as a source)
B should be correct, because the session will be killed after the last transaction will be committed or the user will use rollback... A is incorrect because the statement failed with a syntax error
why is not B?
C used SQLPLUS is right but use sql developer ....Maybe not
upvoted 3 times
...
Log in to ExamTopics
Sign in:
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.
HassanMkhlalati
2 months, 1 week agojm9999
3 months agoramonciks
3 months, 2 weeks agoHassanMkhlalati
3 months, 4 weeks agoShrimathi
5 months, 1 week agoTheOracleWasTaken
5 months, 1 week agoyanoolthecool
7 months, 3 weeks agoOratns
10 months, 1 week agoBARNABA23
11 months, 2 weeks agodexdinh91
1 year agojr_C
10 months, 1 week agoheoj10272
1 year, 2 months agoiuliana23
1 year, 2 months agoPeter_Chen
1 year, 3 months ago