Question
Work with Undo Tablespaces Simulate a problem with undo. You will need to be connected as user SYSTEM or some other user to whom you
Work with Undo Tablespaces Simulate a problem with undo. You will need to be connected as user SYSTEM or some other user to whom you have granted the DBA role. Create an undo tablespace with a single datafile of only 256KB. Do not set the file to autoextend. Set the database to use this small undo tablespace. Confirm that an undo segment has been created in this tablespace and that it is online by querying the views DBA_ROLLBACK_SEGS and V$ROLLSTAT. Why do you think that only one undo segment was created? Create an empty table based on the ALL OBJECTS view with this statement: create table undotest as select * from all_objects where 1=2; Populate this table with the contents of the ALL OBJECTS view: insert into undotest select * from all_objects ; The statement will fail with an error "ORA-30036: unable to extend segment by 8 in undo tablespace." Query the new table, and you will find that it is still empty. Why is this? Adjust the undo tablespace's datafile to autoextend, and attempt to insert the contents of the ALL_OBJECTS view into the new table. This time, the insertion will succeed. Find out how many blocks of undo are needed to support the transaction so far by querying V$TRANSACTION as well as how big the new datafile is by querying V$DATAFILE. Delete every row in the new table and then repeat the queries against V$TRANSACTION and V$DATAFILE. You will see that the deletion generated many more blocks of undo and required a much larger extension of the undo datafile than the insertion. Why is this? Tidy up by switching back to the original undo tablespace and then dropping the test table and tablespace. (3) Include in the assignments all queries and their results that you execute in this part. Also include your answers to the questions written in italic thought the exercise.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started