Computer Knowledge
Database Management Systems
5,543 Questions
Database Management Systems (DBMS) form the core framework for data storage, retrieval, and security in modern software applications. Concepts such as the E-R model, backup planning, SQL integration, and big data architecture are essential for computer knowledge sections. This hub offers a comprehensive set of practice questions to master DBMS fundamentals and advanced database operations.
E-R Model ConceptsBackup and RecoverySQL Server UpgradesJDBC and ODBCBig Data CharacteristicsData VirtualizationOracle Database
Database Management Systems Questions
D
Correct answer
Explanation
When restoring a control file in NOARCHIVELOG mode using RMAN, the database must be in NOMOUNT state. NOMOUNT allows instance initialization and control file access without opening the data files. OPEN state would require a valid control file already, MOUNT needs the control file to be accessible, and IDLE is not a valid Oracle state. The NOMOUNT state enables control file restoration before mounting.
-
The index need to be dropped, and then re-created.
-
The resolution of index fragmentation depends on the type of index.
-
The index can be rebuilt while users continue working on the table.
-
The fragmented can be ignored because Oracle resolve index fragmentation by means of a freelist.
-
The index can be rebuilt, but users will not have access to the index during this time.
C
Correct answer
Explanation
Rebuilding an index online (REBUILD ONLINE) allows users to perform DML operations on the underlying table during the rebuild process, ensuring zero downtime. Dropping and recreating the index or rebuilding it offline restricts user access, which violates the requirement of continuous 24/7 availability. Freelists do not automatically resolve index fragmentation.
-
The oracle server creates no undo tablespace.
-
The oracle server creates an undo segment in the system tablespace.
-
The oracle server cerates one undo tablespace with the name SYS_UNDOTBS.
-
Database creation fails because you did not specify an undo tablespace on the create database statment.
C
Correct answer
Explanation
When UNDO_MANAGEMENT is set to AUTO and you omit the UNDO tablespace clause in CREATE DATABASE, Oracle automatically creates a default undo tablespace named SYS_UNDOTBS. This is the expected behavior in automatic undo management mode. Options A and D are incorrect because the database creation succeeds and Oracle does create an undo tablespace automatically. Option B is wrong because undo segments are not placed in the SYSTEM tablespace when using automatic undo management.
-
Only the EMPLOYEES table.
-
Only the EMPLOYEES table and its corresponding primary key index.
-
The EMPLOYEES table and partition P1.
-
The EMPLOYEES table, IPK_EMP index, and the SALES table.
D
Correct answer
Explanation
Specifying tablespace-mode export (tablespace=SAMPLE) exports all tables located in that tablespace (EMPLOYEES), their indexes regardless of tablespace (IPK_EMP), and any table partitions located in that tablespace (SALES partition P1).
-
User the DROP DATAFILE command.
-
Use the DROP TABLESPACE command.
-
Ensure that all database files are Oracle Managed Files(OMF) before using the DROP TABLESPACE command.
-
Ensure that the DB_FILE_CREATE_DEST initialization parameter is set before using the DROP TABLESPACE command.
B
Correct answer
Explanation
The DROP TABLESPACE command drops the tablespace. In modern Oracle versions, adding the 'INCLUDING CONTENTS AND DATAFILES' clause deletes the datafiles, but the basic command to initiate this is DROP TABLESPACE.
-
The contents and data files belonging to the IND2 tablespace are dropped.
-
The statement will only succeed if the IND2 tablespace was built using Oracle-Managed Files (OMF) data files.
-
The statement will only succeed if the data files belonging to the IND2 tablespace are Oracle Managed Files (OMF) or of the database was created using OMF.
-
The contents of the tablespace are dropped along with all its data files except those identical with Oracle-Managed Files (OMF) naming convention.
A
Correct answer
Explanation
The DROP TABLESPACE statement with INCLUDING CONTENTS AND DATAFILES removes the tablespace, all its contents (segments/data), and the associated data files from the operating system. This is the complete cleanup option. Option B and C incorrectly suggest Oracle-Managed Files (OMF) is required, but this clause works for both OMF and non-OMF data files. Option D is wrong because the AND DATAFILES clause removes all data files regardless of naming convention.
-
Do nothing, the PMON process handles everything.
-
Shut down the database and restore all the tables the user was updating.
-
Log in as DBA, clean up the partial updates in those tables, and do another manual backup.
-
Use LogMiner to find out which records are changed based on the user’s ID, then roll back all those changes.
A
Correct answer
Explanation
When a client machine loses power during a transaction, Oracle's PMON (Process Monitor) background process automatically detects the interrupted session and rolls back the uncommitted changes. This ensures database consistency and atomicity. Option B is incorrect because you don't need to restore - the transaction was never committed. Option C is unnecessary as PMON handles cleanup. Option D is overly complex when automatic rollback occurs.
-
The data file needs to be restored by using operating system commands, because a data file movement must take place, and then the database can be recovered from RMAN.
-
The data file needs to be restored by using operating system commands, since a data file movement must take place, and then the database must be recovered manually.
-
From RMAN you can issue the commands RESTORE and RECOVER. RMAN automatically restores the data file on DISK 3 to another disk, based upon utilization statistics.
-
From RMAN you can issue a SET NEWNAME command to update the data file location information in the control file, and then issue the RESTORE and RECOVER commands to recover the database.
D
Correct answer
Explanation
When a data file is lost and you need to restore it to a different location, use RMAN's SET NEWNAME command to tell the control file the new location, then RESTORE and RECOVER. This is necessary because the original disk (DISK 3) is unavailable. Options A and B are incorrect because you don't use operating system commands to move data files in RMAN recovery. Option C is wrong because RMAN doesn't automatically select a new disk based on utilization - you must explicitly specify it with SET NEWNAME.
-
All of the data files must be from a backup taken prior to the point in time to which you want to recover.
-
Only the data files belonging from the SYSTEM tablespace must be from a backup taken prior to the point in time to which you want to recover.
-
Only the data files that need recovery must be from a backup taken prior to the point in time which you want to recover.
-
Only the data files belonging to the SYSTEM tablespace and the data files that need recovery must be from a backup taken prior to the point in time to which you want to recover.
A
Correct answer
Explanation
For an incomplete database recovery, all restored data files must be from backups taken prior to the target point-in-time to allow the recovery process to roll forward to the desired state.
-
Set the LOG_ARCHIVE_START parameter to TRUE in the initialization parameter file.
-
Automatic archive is the default when ARCHIVELOG mode is set. No further actions are required.
-
Set the LOG_ARCHIVE_MAX_PROCESSES parameter to n (where n is the number of Archiver process) in the initialization parameter file.
-
Immediately after setting the database in ARCHIVELOG mode, in SQL*Plus select automatic archiving using the syntax : ALTER DATABASE SET LOG_ARCHIVE_START=TRUE
A
Correct answer
Explanation
The LOG_ARCHIVE_START parameter controls automatic archiving at instance startup. Setting it to TRUE in the initialization parameter file enables automatic archiving when the instance starts. Option B is incorrect because automatic archiving is not the default - you must explicitly enable it. Option C sets the number of archiver processes but doesn't enable automatic archiving. Option D is incorrect because LOG_ARCHIVE_START is an initialization parameter, not set dynamically with ALTER DATABASE.
-
A text copy of the control file.
-
A binary copy of the control file.
-
A file containing a SQL statement which will re-create the database.
-
A file containing a SQL statement which will re-create the control file.
D
Correct answer
Explanation
ALTER DATABASE BACKUP CONTROLFILE TO TRACE generates a trace file in the user_dump_dest directory containing SQL commands to recreate the control file. This is useful for recovery or documentation purposes. Option A is incorrect because it's not a direct text copy of the control file - it's SQL to recreate it. Option B is wrong because it's not a binary copy. Option C is incorrect because it recreates the control file, not the entire database.
-
Each target database requires its own recover catalog.
-
RMAN scripts can be stored in the recovery catalog or the targer control file.
-
A channel is a stream of data to a device type and corresponds to one server session.
-
The RMAN executable interprets server session commands and establishes connections to the target database.
C
Correct answer
Explanation
An RMAN channel represents a stream of data to a device type and corresponds to one server session on the target database instance. Other options are incorrect because target databases do not require individual catalogs, and scripts cannot be stored in the control file.
-
ABORT
-
NORMAL
-
IMMEDIATE
-
TRANSACTIONAL
B,C,D
Correct answer
Explanation
For a consistent closed database backup using OS commands, use NORMAL, IMMEDIATE, or TRANSACTIONAL shutdown options. These ensure all transactions are complete and the database is cleanly closed. NORMAL waits for all users to disconnect. IMMEDIATE rolls back active transactions and disconnects users. TRANSACTIONAL waits for active transactions to finish. ABORT is unsafe for backup as it doesn't cleanly close the database - it's equivalent to pulling the plug.
-
CREATE USER
-
CREATE SESSION
-
CREATE ANY TABLE
-
IMP_FULL_DATABASE
-
EXP_FULL_DATABASE
B,E
Correct answer
Explanation
To export tables owned by another user, you must have the CREATE SESSION privilege to connect to the database and the EXP_FULL_DATABASE role to export objects belonging to other schemas.
-
SYNC or ASYNC to identify the network transmission mode.
-
LGWR or ARCH to identify the primary database process responsible for sending redo information to the standby.
-
AFFIRM or NOAFFIRM to control whether log archiving disk write operations are to be performed synchronously or asynchronously.
-
PROTECTED or UNPROTECTED to control the degree of divergence and data loss at the standby database.
A,B,C
Correct answer
Explanation
The LOG_ARCHIVE_DEST_n parameters use SYNC/ASYNC for network transmission mode (synchronous or asynchronous), LGWR/ARCH to specify which primary process sends redo (LGWR for real-time, ARCH for archiver), and AFFIRM/NOAFFIRM to control whether disk writes are synchronous (AFFIRM) or asynchronous (NOAFFIRM). These three attributes directly control data availability and protection modes in Data Guard. Option D mentions PROTECTED/UNPROTECTED which are high-level availability modes, not individual parameters.