Set - 8

Question 26 :

How do you switch from an init.ora file to a spfile?

Answer :

Issue the create spfile from pfile command.
Explain the difference between a data block, an extent and a segment.
A data block is the smallest unit of logical storage for a database object. As objects grow they take chunks of additional storage that are composed of contiguous data blocks. These groupings of contiguous data blocks are called extents. All the extents that an object takes when grouped together are considered the segment of the database object.

Question 27 :

Give two examples of how you might determine the structure of the table DEPT.

Answer :

Use the describe command or use the dbms_metadata.get_ddl package.

Question 28 :

Where would you look for errors from the database engine?

Answer :

In the alert log.

Question 29 :

Compare and contrast TRUNCATE and DELETE for a table.

Answer :

Both the truncate and delete command have the desired outcome of getting rid of all the rows in a table. The difference between the two is that the truncate command is a DDL operation and just moves the high water mark and produces a now rollback. The delete command, on the other hand, is a DML operation, which will produce a rollback and thus take longer to complete.

Question 30 :

Give the reasoning behind using an index.

Answer :

Faster access to data blocks in a table.