Which three statements are true about sequences in a single instance Oracle database? (Choose three.)
Which three statements are true about sequences in a single instance Oracle database? (Choose three.)
Sequences in an Oracle database are subject to specific behaviors. Firstly, a sequence’s unallocated cached values are lost if the instance shuts down because the cache is stored in memory. Secondly, a sequence can issue duplicate values if the CYCLE parameter is set, allowing the sequence to wrap around after reaching its maximum value. Lastly, sequences can always have gaps due to various factors like transaction rollbacks, failures, or manual adjustments.
Correct Answer: ADE
Believe ADE
ADE are correct: A - TRUE; cash values are lost if instance shuts down B - FALSE; Transaction can be rolled back if not COMMITed yet, but sequence number was already used and cannot be reused C - FALSE; user can create sequence and therefore has all privileges to this object, including DROP D - TRUE; CYCLE parameter can be set and values can be looped E - TRUE; there is a list of activities that can influence the gaps generation, like failed INSERT or DELETE; COMMIT or INSERT; ROLLBACK etc. F - FALSE; from ORACLE documentation "Sequence numbers are generated independently of tables, so the same sequence can be used for one or for multiple tables"
ADE are correct
ADE correct for me
ADE are the correct answers
The whole idea of SEQUANCE is to provide unique keys so D cannot be correct. About F - why not?! This is something called in the code. But even as default value, there is no check for unique value accross all tables into the database.
Apparently there are edge cases after using a rollback or incorrect usage of the sequence that can cause this. also the cycle setting will reuse sequence numbers, even though mose sequences are so large you most likely won't run into any problems. but most likely isn't a definitive no. It feel wrong, but if there is even a single edge case that can issue a duplicate, you should answer these questions as it being a possibility.
If a CYCLE clause is added the values can be duplicated. Tested on Oracle 19c
ADE ARE CORRECT