Friday, August 18, 2006

Fundamentals I Ch3 - Installing and Managing Oracle

Chapter 3 - Installing and Managing Oracle


Review Questions



1. Which of the following is an invalid database start-up option?


A. STARTUP NORMAL
B. STARTUP MOUNT
C. STARTUP NOMOUNT
D. STARTUP FORCE
----

STARTUP NORMAL is an invalid option; to start the database, you issue the STARTUP command without any options or with STARTUP OPEN.
Ans: A.


2. Which two values from the V$SESSION view are used to terminate a user session?


A. SID
B. USERID
C. SERIAL#
D. SEQUENCE#
----
SID and SERIAL# are used to kill a session. You can query the V$SESSION view to obtain these values. The command is ALTER SYSTEM KILL SESSION ‘, .
Ans: A, C



3. To use operating system authentication to connect to the database as an administrator, what should the value of the parameter REMOTE_LOGIN_PASSWORDFILE be set to?


A. SHARED
B. EXCLUSIVE
C. NONE
D. OS

-----
The value of the REMOTE_LOGIN_PASSWORDFILE parameter should be set to NONE to use OS authentication. To use password file authentication, the value should be either EXCLUSIVE or SHARED.
Ans: C.


4. What information is available in the alert log files?


A. Block corruption errors
B. Users connecting and disconnecting from the database
C. All user errors
D. The default values of the parameters used to start up the database

-----
The alert log stores information about block corruption errors, internal errors,
and the non-default initialization parameters used at instance start-up.
The alert log also records information about database start-up, shutdown, archiving, recovery, tablespace modifications, undo segment modifications, and data file modifications.
Ans: A.


5. Which parameter value is used to set the directory path where the alert log file is written?


A. ALERT_DUMP_DEST
B. USER_DUMP_DEST
C. BACKGROUND_DUMP_DEST
D. CORE_DUMP_DEST
----
The alert log file is written in the BACKGROUND_DUMP_DEST directory.
This directory also records the trace files generated by the background processes.
The USER_DUMP_DEST directory has the trace files generated by user sessions.
The CORE_DUMP_DEST directory is used primarily on Unix platforms to save the core dump files.
ALERT_DUMP_ DEST is not a valid parameter.
Ans: C.


6. Which SHUTDOWN option requires instance recovery when the database is started the next time?


A. SHUTDOWN IMMEDIATE
B. SHUTDOWN TRANSACTIONAL
C. SHUTDOWN NORMAL
D. None of the above
---
SHUTDOWN ABORT requires instance recovery when the database is started the next time. Oracle will also roll back uncommitted transactions during start-up. This option shuts down the instance without dismounting the database.
Ans: D.


7. Which SHUTDOWN option will wait for the users to complete their uncommitted transactions?


A. SHUTDOWN IMMEDIATE
B. SHUTDOWN TRANSACTIONAL
C. SHUTDOWN NORMAL
D. SHUTDOWN ABORT
----
When SHUTDOWN TRANSACTIONAL is issued, Oracle waits for the users to either commit or roll back their pending transactions. Once all users have either rolled back or committed their transactions, the database is shut down. When using SHUTDOWN IMMEDIATE, the user sessions are disconnected and the changes are rolled back. SHUTDOWN NORMAL waits for the user sessions to disconnect from the database.
Ans: B.


8. How do you make a database read-only? (Choose the best answer.)


A. STARTUP READ ONLY
B. STARTUP MOUNT; ALTER DATABASE OPEN READ ONLY
C. STARTUP NOMOUNT; ALTER DATABASE READ ONLY
D. STARTUP; ALTER SYSTEM ENABLE READ ONLY
---
To put a database into read-only mode, you can mount the database and open the database in read-only mode. This can be accomplished in one step by using STARTUP OPEN READ ONLY.
Ans: B.


9. Which role is created by default to administer databases?


A. DATABASE_ADMINISTRATOR
B. SUPER_USER
C. DBA
D. No such role is created by default; you need to create administrator roles after logging in as SYS.

----
The DBA role is created when you create the database and is assigned to the SYS and SYSTEM users.
Ans: C.


10. Which parameter in the ORAPWD utility is optional?


A. FILE
B. PASSWORD
C. ENTRIES
D. All the parameters are optional; if you omit a parameter, Oracle substitutes the default.
----
The parameter ENTRIES is optional. You must specify a password file name and the SYS password. The password file created will be used for authentication.
Ans: C.


11. Which privilege do you need to connect to the database, if the database is started up by using STARTUP RESTRICT?


A. ALTER SYSTEM
B. RESTRICTED SESSION
C. CONNECT
D. RESTRICTED SYSTEM
----
The RESTRICTED SESSION privilege is required to access a database that is in restricted mode. You start up the database in restricted mode by using STARTUP RESTRICT, or you change the database to restricted mode by using ALTER SYSTEM ENABLE RESTRICTED SESSION.
Ans: B.

Notes: when do you what to use STARTUP RESTRICT?



12. At which stage of the database start-up is the control file opened?


A. Before the instance start-up
B. Instance started
C. Database mounted
D. Database opened

----
The control file is opened when the instance mounts the database. The data files and redo log files are opened after the database is opened. When the instance is started, the background processes are started.
Ans: C


13. User SCOTT has opened a SQL*Plus session and left for lunch. When you queried the V$SESSION view, the STATUS was INACTIVE. You terminated SCOTT’s session. What will be the status of SCOTT’s session in V$SESSION?


A. INACTIVE
B. There will be no session information in V$SESSION view
C. TERMINATED
D. KILLED
----
When you terminate a session that is INACTIVE, the STATUS in V$SESSION will show as KILLED. When SCOTT tries to perform any database activity in the SQL*Plus window, he receives an error that his session is terminated. When an ACTIVE session is killed, the changes are rolled back and an error message is written to the user’s screen.
Ans: D.


14. Which command will "bounce" the database - that is, shut down the database and start up the database in a single command?


A. STARTUP FORCE
B. SHUTDOWN FORCE
C. SHUTDOWN START
D. There is no single command to “bounce” the database; you need to shut down the database and then restart it
---
STARTUP FORCE will terminate the current instance and start up the database. It is equivalent to issuing SHUTDOWN ABORT and STARTUP OPEN.
Ans: A.


15. When performing the command SHUTDOWN TRANSACTIONAL, Oracle performs the following tasks in what order?


A. Terminates the instance
B. Performs a checkpoint
C. Closes the data files and redo log files
D. Waits for all user transactions to complete
E. Dismounts the database
F. Closes all sessions
----
Ans: D, F, B, C, E, and A. SHUTDOWN TRANSACTIONAL waits for all user transactions to complete. Once no transactions are pending, it disconnects all sessions and proceeds with the normal shutdown process. The normal shutdown process performs a checkpoint, closes data files and redo log files, dismounts the database, and shuts down the instance.


16. What is the primary benefit of using an SPFILE to maintain the parameter file?


A. The SPFILE can be mirrored across several drives, unlike PFILEs.
B. Changes to the database configuration can be made persistent across shutdown and startup.
C. Because the SPFILE is binary, the DBA will be less likely to edit it.
D. The ALTER SYSTEM command cannot modify the contents of an SPFILE.
----
Using the ALTER SYSTEM command, the changes can be made to the current (MEMORY) configuration, to the next restart (SPFILE), or to both (BOTH).
Ans: B.


17. Using SQL*Plus, which two options below will display the value of the parameter DB_BLOCK_SIZE?


A. SHOW PARAMETER DB_BLOCK_SIZE
B. SHOW PARAMETERS DB_BLOCK_SIZE
C. SHOW ALL
D. DISPLAY PARAMETER DB_BLOCK_SIZE

---
The SHOW PARAMETER command will display the current value of the parameter. If you provide the parameter name, its value is displayed; if you omit the parameter name, all the parameter values are displayed. SHOW ALL in SQL*Plus will display the SQL*Plus environment settings, not the parameters.
Ans: A and B.


18. When you issue the command ALTER SYSTEM ENABLE RESTRICTED SESSION, what happens to the users who are connected to the database?


A. The users with DBA privilege remain connected, and others are disconnected.
B. The users with RESTRICTED SESSION remain connected, and others are disconnected.
C. Nothing happens to the existing users. They can continue working.
D. The users are allowed to complete their current transaction and are disconnected.
----
If you enable RESTRICTED SESSION when users are connected, nothing happens to the already connected sessions. Future sessions are started only if the user has the RESTRICTED SESSION privilege.
Ans. C


19. Which view has information about users who are granted SYSDBA or SYSOPER privilege?


A. V$PWFILE_USERS
B. DBA_PWFILE_USERS
C. DBA_SYS_GRANTS
D. None of the above
----

The dynamic view V$PWFILE_USERS has the username and a value of TRUE in column SYSDBA if the SYSDBA privilege is granted, or a value of TRUE in column SYSOPER if the SYSOPER privilege is granted.
Ans: A.


20. Which of the following initialization parameters is NOT used in OMF operations?


A. DB_CREATE_FILE_DEST
B. DB_CREATE_FILE_DEST_2
C. DB_CREATE_ONLINE_LOG_DEST_1
D. DB_CREATE_ONLINE_LOG_DEST_5
---
Only one file destination is allowed. Control files and redo log files use the same parameter; the parameter DB_CREATE_ONLINE_LOG_ DEST_n (n can have values from 1 to 5).
Ans B.

No comments: