Final Day reveiw Flashcards

1
Q

Which type of database backup can be performed while a database is online?

A

Inconsistent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What can be queried from a database while it is in the NOMOUNT state?

A

Instance parameters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which process duplicates modified blocks from a buffer cache to files on disk?

A

Database Writer (DBWn)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In response to users’ complaints that the system is slow, a database administrator detects that a user is consuming too many resources.

Which parameter controls the use of service units?

A

COMPOSITE_LIMIT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the result of the CASCADE option when used with the DROP USER command?

A

All the user’s objects are removed from the database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which privilege is required to add a foreign key constraint to a table owned by another user?

A

REFERENCES

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

An administrator runs the following SQL statements:

CREATE USER HR_User IDENTIFIED BY ‘Password’ DEFAULT TABLESPACE DATA;
GRANT CREATE SESSION, CREATE TABLE to HR_User;

HR_User creates a new table in their own schema.

What happens when HR_User inserts a row into the new table?

A

The insert fails with an error for missing privileges on the DATA tablespace.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the NOMOUNT state in Oracle?

A

The NOMOUNT state is the initial state of an Oracle instance, in which the instance is started but the database is not mounted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does it mean for a database to be “mounted”?

A

When a database is “mounted,” it means that the instance is able to access the datafiles and control files of the database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What can be done in the NOMOUNT state?

A

In the NOMOUNT state, the instance can perform tasks such as creating a new database or recovering an existing one.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the command to start an instance in NOMOUNT state?

A

The command to start an instance in NOMOUNT state is “STARTUP NOMOUNT”.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the command to mount a database?

A

The command to mount a database is “ALTER DATABASE MOUNT”.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the command to open a database?

A

The command to open a database is “ALTER DATABASE OPEN”.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the difference between mounting and opening a database?

A

Mounting a database makes it accessible to the instance, while opening a database makes it available for use by users.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What can be queried from a database while it is in the NOMOUNT state?

A

While the database is in the NOMOUNT state, you will not be able to query any data from the database as the database is not mounted, and the instance does not have access to the datafiles and control files of the database.
In NOMOUNT state, you can only query the information available in the data dictionary, such as the initialization parameters, backup and recovery information, and the structure of the database objects. However, you will not be able to access the data stored in the database tables.
You can also check the status of the background processes and the memory structures such as SGA, PGA etc.
Once the database is mounted and opened, you will be able to query the data in the database tables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the MOUNTED state in Oracle?

A

The MOUNTED state is when the instance has successfully mounted the database, allowing the instance to access the datafiles and control files of the database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the OPEN state in Oracle?

A

The OPEN state is when the instance has opened the database, making it available for use by users.

18
Q

What is the CLOSED state in Oracle?

A

The CLOSED state is when the instance has closed the database, making it unavailable for use by users, but allowing the instance to continue to access the datafiles and control files

19
Q

What is the SHUTDOWN state in Oracle?

A

The SHUTDOWN state is when the instance is shut down, and the database is not available for use.

20
Q

What is the ARCHIVELOG mode in Oracle?

A

ARCHIVELOG mode is a mode in which the Oracle database automatically archives redo logs, which are used to recover the database in case of a failure.

21
Q

What is the NOARCHIVELOG mode in Oracle?

A

NOARCHIVELOG mode is a mode in which the Oracle database does not automatically archive redo logs. This mode is less robust in terms of recovery options.

22
Q

More info on Closed state

A

Certainly, the CLOSED state in Oracle is when the instance has closed the database, making it unavailable for use by users, but allowing the instance to continue to access the datafiles and control files. Here are some additional details on the closed state:

The closed state is typically used when performing maintenance on the database, such as adding new datafiles or making structural changes to the database.
While the database is closed, users cannot access the data in the tables, but the instance can still access the datafiles and control files.
The instance can perform tasks such as backup and recovery, and it can also read and write to the datafiles.
The instance can also switch the database to another state, such as the open state, once the maintenance is complete.
The command to close the database is “ALTER DATABASE CLOSE”, this command makes the database unavailable for user access and only the instance can access the datafiles and control files.
The closed state is not the same as shutting down the instance, shutting down the instance would close the database but also release all the resources and stop the background processes.
It is important to note that a closed database is not accessible to the users, so the data is not updated, therefore the database can be inconsistent and can’t be used for any query or transaction. A closed database is typically used for maintenance purpose, and before opening the database, it is important to perform recovery actions to make it consistent.

23
Q

What is the Apply Server (ASnn) in Oracle?

A

A: The Apply Server (ASnn) is a background process that is used to apply changes from the redo log to a replicated or materialized database.

24
Q

What types of replication and data warehousing configurations use the Apply Server (ASnn)?

A

The Apply Server (ASnn) is used in configurations such as Oracle Streams and Oracle GoldenGate, which are used to replicate data between databases.

25
Q

What is the function of the Apply Server (ASnn)?

A

The Apply Server (ASnn) reads the redo log and applies the changes to the replicated or materialized database. This ensures that the replicated or materialized database remains in sync with the primary database.

26
Q

How does the Apply Server (ASnn) ensure that the replicated or materialized database is in sync with the primary database?

A

The Apply Server (ASnn) reads the redo log and applies the changes to the replicated or materialized database in the same order that they were made to the primary database. This ensures that the replicated or materialized database has the same data as the primary database.

27
Q

What is the function of the Database Writer (DBWn)?

A

The Database Writer (DBWn) is responsible for writing changes made to the database buffer cache to data files on disk.

28
Q

What is the function of the Log Writer (LGWR)?

A

The Log Writer (LGWR) is responsible for writing redo log entries to the online redo log files on disk, these entries contain information about changes made to the database.

29
Q

What types of data do the Database Writer (DBWn) and Log Writer (LGWR) write to disk?

A

The Database Writer (DBWn) writes changes made to the database buffer cache to datafiles on disk, while the Log Writer (LGWR) writes redo log entries to the online redo log files on disk.

30
Q

What is the main difference between the two processes?

A

The main difference is that the Database Writer (DBWn) writes changes made to the database buffer cache to datafiles on disk, while the Log Writer (LGWR) writes redo log entries to the online redo log files on disk. The DBWn process writes the changes that were made to the database buffer cache to the datafiles, while the LGWR writes the redo logs, which contain information about the changes that were made to the database.

31
Q

When do the two process runs?

A

The Database Writer (DBWn) process runs continuously and writes changes to disk as they are made to the database buffer cache. The Log Writer (LGWR) process runs continuously and writes redo log entries to disk as they are generated by the database.

32
Q

What is the LOG_ARCHIVE_DEST parameter?

A

The LOG_ARCHIVE_DEST parameter specifies the location of archived redo logs, which are used for recovery and replication.

33
Q

What is the DIAGNOSTIC_DEST parameter?

A

The DIAGNOSTIC_DEST parameter specifies the location of diagnostic files, such as trace files, core dumps, and alert logs.

34
Q

What is the AUDIT_FILE_DEST parameter?

A

The AUDIT_FILE_DEST parameter specifies the location of audit files, which contain information about database activity, such as user logins and SQL statements executed.

35
Q

What is the main difference between the three parameters?

A

The main difference is the type of files that they specify the location of. LOG_ARCHIVE_DEST specifies the location of archived redo logs, DIAGNOSTIC_DEST specifies the location of diagnostic files, and AUDIT_FILE_DEST specifies the location of audit files.

36
Q

What is the purpose of these files?

A

Archived redo logs are used for recovery and replication, diagnostic files are used for troubleshooting and monitoring the database, and audit files are used for auditing and compliance purposes.

37
Q

What is the Oracle backup process?

A

Oracle provides several methods for creating backups of the database, including full backups, incremental backups, and archived redo logs. Full backups create a complete copy of the entire database, while incremental backups only copy changes made since the last backup. Archived redo logs capture changes made to the database in real-time, allowing for more granular recovery options.

38
Q

What is the Oracle restore process?

A

In order to restore a database, you will need to have a valid backup of the database, as well as all of the necessary archived redo logs. The restore process typically involves using Oracle’s recovery manager (RMAN) to restore the backup and apply the archived redo logs. Different restore options may be available depending on the type of backup and the specific recovery scenario, such as point-in-time recovery or incomplete recovery.

39
Q

What is the difference between complete recovery and incomplete recovery?

A

Complete recovery is the process of restoring the database to the most recent consistent state by applying all the archived redo logs. Incomplete recovery is the process of restoring the database to a specific point in time by applying a subset of the archived redo logs. Complete recovery is typically used when the database is fully functional but a problem has occurred, while incomplete recovery is typically used when the database is in an inconsistent state or when specific data needs to be recovered.

40
Q

What is required to perform a complete or incomplete recovery?

A

Both complete recovery and incomplete recovery require a consistent full backup of the database and all the archived redo logs. In case of incomplete recovery, you will also need to have all the archived redo logs up to the point in time you want to recover.