Oracle 19c Interview Questions and Answers.

 


1. What is Oracle 19c?

Oracle 19c is a relational database management system (RDBMS) from Oracle Corporation. 

It is the long-term support release (LTSR) of the Oracle Database 12c Release 2 (12.2) line. 

Oracle 19c is available on-premises and in the cloud.


2. Are there any specific new features that can be used in the context of a database upgrade to Oracle 19c?

Yes, there are a few new features that can be used when upgrading to Oracle 19c. One is the new Oracle Upgrade Assistant, 

which can help automate the process of upgrading your database. Another is the new Oracle Database Migration Assistant,

 which can help with migrating data to Oracle 19c. Finally, the new Oracle SQL Developer Migration Workbench can help with migrating database 

objects and data.


3. Is there anything special about upgrading from Oracle 12c to 19c as opposed to other versions?

Yes, there are a few things to keep in mind when upgrading to Oracle 19c. First, the Oracle 19c database is only 

compatible with Oracle Linux 7.3 or higher.

 Second, the Oracle 19c database is only compatible with the Oracle 19c client. Finally, when upgrading from Oracle 12c to 19c, 

you will need to export your data from the 12c database, then import it into the 19c database.


4. Is it possible to upgrade an existing 11gR2 or 12c non-container database (CDB) to Oracle 19c? If yes, how?

Yes, it is possible to upgrade an existing 11gR2 or 12c non-container database (CDB) to Oracle 19c. 

You can do this by using the Oracle Database Upgrade Assistant (DBUA).


5. In what situations would you use a container database architecture for your production databases?

Container database architectures are becoming increasingly popular for production databases, as they offer a number of advantages. 

One key advantage is that they allow for much easier management of multiple databases, as all of the databases can be managed from a single console. 

This can save a lot of time and effort, particularly for larger organizations with many databases. Additionally, 

container databases can offer better performance and scalability than traditional database architectures.


6. What is a pluggable database?

A pluggable database is a database that is contained within another database, known as the container database. 

The pluggable database shares certain resources with the container database, but it can also be configured and administered independently. 

This allows for greater flexibility and scalability when managing multiple databases.


7. Does Oracle 19c support using multiple PDBs on the same server?

Yes, Oracle 19c does support using multiple PDBs on the same server. 

This allows for greater flexibility and scalability when deploying Oracle databases.


8. What are some key features of Autonomous Database Cloud Service?

Some key features of Autonomous Database Cloud Service include:

– The ability to automatically provision and manage Oracle databases in the cloud

– The ability to elastically scale compute and storage resources as needed

– The ability to patch and upgrade databases automatically

– The ability to monitor and manage databases using the Oracle Cloud Infrastructure Console


9. Can you explain what SQL Plan Management is and why we need it?

SQL Plan Management is a feature in Oracle 19c that allows the database to automatically manage SQL execution plans. 

This can help improve performance by ensuring that the optimizer always has access to the most up-to-date execution plans. 

SQL Plan Management can also help to prevent plan regressions by automatically reverting to a previous plan if a new one is found to be sub-optimal.

10. What are the main benefits provided by Oracle Machine Learning?

Oracle Machine Learning provides a number of benefits, including the ability to automatically generate models from data, 

the ability to deploy models in a production environment, and the ability to monitor and manage models. Additionally, 

Oracle Machine Learning provides a number of tools that make it easier to work with data, including data preparation, 

feature selection, and model evaluation.


11. What’s the difference between Oracle Advanced Security Option and Oracle Data Redaction?

Oracle Advanced Security Option provides a comprehensive set of tools for securing data in transit and at rest, including encryption, 

data masking, and access control. Oracle Data Redaction, on the other hand, is a feature that allows you to selectively redact sensitive 

data from your database, making it unreadable to unauthorized users.


12. How do you ensure data security when storing sensitive information in a database like Oracle 19c?

When storing sensitive information in a database like Oracle 19c, you need to ensure that the data is encrypted. You can do this by using a 

tool like Oracle Advanced Security. This will encrypt the data both at rest and in transit, making it much more difficult for unauthorized 

individuals to access it.


13. What is the best way to secure passwords stored in Oracle 19c?

The best way to secure passwords stored in Oracle 19c is to use the Oracle Password Vault. The Password Vault is a secure, centralized 

repository for storing and managing passwords. It provides a single point of control for managing passwords, and it ensures that all passwords 

are stored in a secure, encrypted format.


14. How can you prevent unauthorized users from accessing sensitive information in Oracle 19c?

You can prevent unauthorized users from accessing sensitive information in Oracle 19c by using the Data Redaction feature. This feature allows 

you to specify which columns of data should be redacted, and how the data should be redacted. You can also specify which users should have 

access to the redacted data.


15. What is the importance of the Oracle wallet feature?

The Oracle wallet feature is important because it allows for the secure storage of sensitive information, such as passwords, 

within the database. This means that the information is less likely to be compromised if the database is breached.


16. What is Oracle Real Application Clusters? Why should we use it?

Oracle Real Application Clusters (RAC) is a software feature that allows Oracle databases to be deployed on a cluster of servers. 

This provides high availability and scalability for Oracle databases. RAC can be used to improve the performance of Oracle databases, 

and it can also be used to provide failover protection in the event of a server failure.


17. What are the advantages of using Oracle Enterprise Manager?

Oracle Enterprise Manager provides a comprehensive and centralized solution for managing Oracle databases, middleware, and applications. 

It offers a complete set of tools for managing and monitoring all aspects of your IT infrastructure, including:

– Provisioning and patching

– Configuration management

– Performance monitoring

– Capacity planning

– Security and compliance

– Backup and recovery

Oracle Enterprise Manager also provides a self-service portal for users, so they can request and provision new resources, 

as well as monitor the status of their existing resources.

18. Do you think there will ever be a situation where a business won’t need a data warehouse?

I don’t think so. Data warehouses will always be necessary to store and analyze large amounts of data.

19. What’s your opinion on Oracle Exadata? When should it be used?

Oracle Exadata is a powerful tool that can be used to improve the performance of Oracle databases. It should be used in situations where the 

database is expected to experience high demand or where the database is particularly large.


20. What are the differences between Oracle Exadata and Amazon Web Services RDS?

Oracle Exadata is a cloud-based platform that provides customers with a complete Oracle database solution, 

while Amazon Web Services RDS is a cloud-based platform that provides customers with a relational database service. 

Oracle Exadata includes all of the software and hardware necessary to run an Oracle database, 

while Amazon Web Services RDS only provides the software necessary to run a relational database. 

Oracle Exadata also provides customers with a complete set of tools for managing and monitoring their Oracle database, 

while Amazon Web Services RDS only provides a limited set of tools for managing and monitoring their relational database.

Top Oracle DBA, RAC, And Performance Tuning Questions


Q #1) Why do we use the materialized view instead of a table or views?

Answer: Materialized view is a database object that holds query results. If materialized views are used instead of tables or views in complex query executions, performance gets enhanced as re-execution is not required for repeated queries.


Q #2) How is the Clustered Index different from the Non-Clustered Index?

Answer: An index is a schema object, which can search the data efficiently within the table.

Indexes can be clustered or non-clustered. Differences include:

In a clustered index, table records are sorted physically and stored in a particular order. Hence, a table can have a single clustered index only.

 While in a non-clustered index, logical sorting happens which does not match the physical order of the records.

The leaf node of a clustered index holds the data pages while the non-clustered index holds the index rows.


Q #3) What are the different responsibilities of a DBA?

Answer: DBA is the database administrator who performs all administrative tasks.

Administrative tasks include:

User-level administration i.e. creates users, removes existing users, or modifies user permissions.

Maintains database security.

Manages database storage & objects.

Tunes the performance of a database.

Performs backups & recovery tasks.


Q #4) What do you mean by Database Normalization and why is it important?

Answer: The normalization technique is a set of rules that are used to organize the relational database to prevent data redundancy and dependency. 

Once initial database objects are identified, normalization helps in identifying the relationships between schema objects.

Different normalization forms are as follows:

First Normal Form (1NF)

Second Normal Form (2NF)

Third Normal Form (3NF)

Boyce-Codd Normal Form (BCNF)

Fourth Normal Form (4NF)

Fifth Normal Form (5NF)


Q #5) Can you list down the different components of physical and logical database structure?

Answer: Given below is the list of different components.

The physical structure includes:

Data files, which hold all the DB objects like tables, views, indexes, etc.

Redo Log files, which maintain the records of database changes as a result of user transactions.

Control files, which maintain the database status and physical structure.

The logical structure includes:

Tablespace, which is a logical storage unit where the database object resides.

Segments are logical storage units only but within a tablespace.

Extent is the logical unit where various contiguous data blocks and extents together form a segment.

A data block is the smallest logical storage unit in the database.


Q #6) What is a SYSTEM tablespace and why do we need it?

Answer: System tablespace is created at the time of database creation. This tablespace holds all the data dictionary tables and hence it is 

used for the creation of various database objects. System tablespace must stay online for the database to function smoothly.


Q #7) What do you mean by SGA and how is it different from PGA?

Answer: SGA means System Global Area is the memory area that is defined by Oracle during instance startup. 

This area can be shared by the system-level processes and hence it is known as the Shared Global Area as well.

PGA is Program Global Area is memory specific to a process or session. It is created when the Oracle process gets 

started and each process will have a dedicated PGA.


Q #8) What is a password file in a database and why is it required when a user can be authenticated using data dictionary tables?

Answer: Database users can be authenticated using data dictionary tables as they store the username & password. 

If the password provided by a user matches the one stored in the database, then the user would be able to log in. However, 

this can happen only if the database is open.

If the database is in shutdown mode, then these tables cannot be accessed and hence password file will be used by the database 

administrators to log in and open the database.


Q #9) What are the different types of backups that are available in Oracle?

Answer: On a higher level, there are 2 types of backup that are available in Oracle which are physical & logical.

During physical backup, copies of physical database files (like data files, control files, redo logs & other executables) 

are created and saved for the future. This can be achieved using either operating system utilities or RMAN.

In contrast, logical backup allows taking a backup of the database objects like tables, views, indexes, stored procedures, etc. 

individually through the Export/Import utility provided by Oracle.


Q #10) What do we mean by hot backup & cold backup and how are they different?

Answer: Hot backup is the process of taking database backup while the database is in running mode. Hence, it is also known as Online Backup. 

While cold backup can be taken only when the database is in shutdown mode and hence it is known as Offline Backup as well.

There are few websites like banking & trading ones, which are 24 hours operational and hence, cannot support bringing the database down. Hence, 

DBAs need to take the backup in online mode only.


Q #11) What is the difference between restoring a database and recovering a database? 

Answer: During the restoration process, backup files are copied from the hard disk, media, or tapes to the restoration location and later make

 the database operational. Recovery has an additional step of updating these data files by applying redo logs so as to recover the changes which 

are not backed up.

Let us understand this with the help of a scenario.

Database full backup is taken on Friday at 11 PM

The database crash happened on Saturday at 7 AM

We can restore the lost files using the 11 PM full backup which is Restoration. However, the data will be restored up till Friday at

 11 PM and not till Saturday at 7 AM. In order to do the same, redo logs can be applied which will bring the database to the point of failure.


Q #12) What do you understand by Redo Log file mirroring?

Answer: Redo log is the most crucial component of database architecture that records all transactions within the database even before it goes to the data file.

Hence, the mirroring of these files is done to protect them. Redo Log file mirroring allows redo logs to be copied to different disks simultaneously.

 And this can be achieved using Data Guard and other utilities.


Q #13) How is incremental backup different from differential backup?

Answer: Incremental backup is known for keeping a backup of only the changed data files since the last backup, which might be full or incremental.

 For Example, An incremental/full backup is done at 10 AM on Friday and the next backup is done at 10 AM Saturday. The second incremental backup will

 only have the transactions that occurred after Friday at 10 AM.

While Differential backup backs up the files that changed during the last full backup.

If you take a full backup on Friday at 10 AM and then differential back up on Saturday at 10 AM, it will take the backup of the files 

changed since Friday, at 10 AM. Further, if the differential backup is taken on Sunday at 10 AM, it will take the backup of the files changed since 

Friday, at 10 AM.


Q #14) What is a Flashback Query and when should it be used?

Answer: Oracle has introduced a flashback technology to recover the past states of database objects. It can recover the accidental changes, 

which got committed as well. Recovery depends on the specified value of the UNDO_RETENTION parameter.

For Example, the UNDO_RETENTION parameter is set to 2 hours, and if a user accidentally deletes the data at 11 AM with a commit performed. 

Then, using FLASHBACK QUERY, he can retrieve these rows until 1 PM only.


Q #15) How is RMAN better than the user-managed backup recovery process?

Answer: Recovery Manager (RMAN) is an Oracle built-in utility that can automate database backup & recovery processes and administrate 

backup strategies as well. In user-managed backups, the user needs to perform backup manually.

RMAN backup time will be less when compared to user-managed backups as RMAN maintains all the metadata in the Central Repository and can 

quickly retrieve the same.

RMAN does incremental backups rather than taking full file backups which are done by user-managed backups, which again saves time.

RMAN creates backup and recovery scripts that can be re-used and scheduled and does not need manual intervention.

RMAN can detect corrupted data blocks automatically during the backup process and recover them, whereas it doesn’t happen in user-managed backups.


Q #16) What is a Recovery Catalog?

Answer: A recovery catalog is a database schema that holds the metadata used by RMAN for restoration and recovery processes.

It basically stores information on

Data files & their backup files.

Archived Redo Logs & their backup sets.

Stored scripts

Incarnation

Backup history

The catalog gets updated once RMAN takes the backup or switches redo log or changes data file.

Q #17) How do you recover a lost control file?

Answer: If one of the control files is lost or gets corrupted, we can use another copy of the control file maintained at the OS level. 

If all the copies of control files are lost or if a user is maintaining only one copy of the control file which gets lost, then a user can

Manually create a control file.

Restore it from the backup control file using the below command.

ALTER DATABASE BACKUP CONTROL FILE TO TRACE;

Restore using RMAN backup by using the below commands.

setdbid XX;

restorecontrolfile;

Q #18) What is the difference between media recovery & crash recovery?

Answer: Media recovery is the process of recovering the database from the backup whenever a disk failure is there. Physical files like data files, 

control files, or server parameter files get recovered during media recovery. However, crash recovery will be performed whenever a database instance failure occurs.

Media recovery needs to be performed by DBA while crash recovery is an automated process that is taken care of SMON background process.

Q #19) What is RAC and what are the various benefits of using RAC architecture?

Answer: RAC or Real Application Cluster allows the database to be installed across multiple servers forming a cluster and sharing the storage 

structure at the same time. This prevents the database from a single point of failure as one or the other instance will always stay up even if 

the other fails.

Using RAC helps in

Maintaining high availability of the system.

Managing workload with the least expenses.

Scalability & agility.

Q #20) How would you differentiate between cluster and grid?

Answer: Clustering is an integral part of grid infrastructure and focuses on a specific objective.

While grid, which may or may not consist of multiple clusters, possesses a wider framework that enables sharing of storage systems, data resources, 

and remaining others across different geographical locations.

A cluster will have single ownership but the grid can have multiple ownership based on the number of clusters it holds.


Q #21) What do you understand from Cache Fusion?

Answer: Cache fusion is the process of transferring data from one instance buffer cache to another at a very high speed within a cluster. 

Instead of fetching data from a physical disk which is a slow process, the data block can be accessed from the cache.

For Example, Instance A wants to access a data block, owned by instance B. It will send an access request to instance B and hence can access 

the same using the other instance B’s buffer cache.


Q #22) How can a single instance environment be converted into the RAC environment and how will they be different?

Answer: Single instance can be converted into RAC using one of the below methods:

Enterprise Manager

DBCA i.e. Database Configuration Assistant

RCONFIG Utility

Single Instance environment Vs RAC Environment

Parameters

Single Instance Environment

RAC Environment

Instance

Instance

Multiple

Memory Instance will have dedicated SGA

Every instance will have separate SGA

Access to physical files Only one instance will access data files

 and control files. Data files and Control Files are shared across all instances.

Flash  Recovery Log

Accessed by single instance.

Shared by multiple instances.

Redo Logs

Dedicated to single instance.

Only one instance can write at a time but others can read data during recovery or archiving process.

Q #23) How can we monitor the space allocations in a database?

Answer: We can use the below data dictionary tables to monitor the space allocations:

DBA_FREE_SPACE

DBA_SEGMENTS

DBA_DATA_FILES

Q #24) What do you understand by “Performance Tuning of DB” & what are the different areas where we can perform tuning?

Answer: It is the process of enhancing database performance by making optimal use of the available resources.

Performance can be enhanced by tuning any of the below areas:

Database design.

Memory allocation.

Disk I/Os.

Database contention.

OS level (CPU).

Q #25) What are the different tools that are provided by Oracle to assist performance monitoring?

Answer: Various tools include:

AWR(Automatic Workload Repository)

ADDM(Automated Database Diagnostics Monitor)

TKPROF

STATSPACK

OEM(Oracle Enterprise Manager)

Q #26) What are the different optimizers that are used to optimize the database?

Answer: There are two types of optimizers:

Rule-Based Optimizer (RBO): If the referenced objects don’t maintain any internal statistics, RBO is used.

Cost-Based Optimizer (CBO): If the referenced objects maintain internal statistics, CBO will check all the possible execution plans and select 

the one with the lowest cost.

Q #27) What is an explained plan and how does it help in optimizing the SQL query?

Answer: An explain plan is a statement that displays the execution plan selected by the Oracle optimizer for SELECT, INSERT, UPDATE & DELETE statements. 

By looking at this plan, one can figure out Oracle’s selection of the right indexes, proper joins & sorts operations, etc.


Q #28) How can we collect the statistics of different database objects?

Answer: ANALYZE statement can be used to collect the statistics of various database objects like tables, indexes, partitions, clusters,s or object 

references. Using this statement we can also identify migrated as well as chained rows within a table or cluster.


Q #29) Why do we need to rebuild indexes?

Answer: Rebuilding indexes is required in order to improve the performance of an application. Due to various INSERT & DELETE operations, the index gets 

fragmented & unstructured, thereby making the application slow. To reorganize data within these indexes, rebuilding is performed.


Q #30) What is TKPROF and how can we use it?

Answer: TKPROF is a tuning utility provided by Oracle which can convert SQL trace files into a readable format.

Once the trace file is generated using SQL Trace Utility, the TKPROF tool can be run against the trace file and the output can be read. It can also 

generate the execution plan for SQL statements. The executable for TKPROF is located in the ORACLE HOME/bin directory.


Q #31) How can we tune a SQL query to optimize the performance of a database?

Answer: Enlisted are a few of the best practices for writing SQL queries.

Column names should be provided instead of * in SELECT statements.

Joins should be used in the place of sub-queries.

EXISTS should be used instead of IN to verify the existence of data.

UNION ALL should be used in the place of UNION.

HAVING should be used only for filtering the resulting rows from the SQL query.

Q #32) How would you identify the SHARED_POOL_SIZE parameter that needs to be adjusted?

Answer: Below is the indications for the same:

Getting an ORA-04031 error.

Degrading the performance even when all the other parameters are already optimized.

Poor library cache/data dictionary hits.

Q #33) What do you understand by Row Chaining?

Answer: When a row is too large that it cannot fit in a block, then it will end up using consequent blocks which leads to the concept of Row Chaining. 

It can be avoided by updating the storage parameters to an appropriate value.


Q #34) What is table partitioning and why is it required?

Answer: It is a process of dividing a table into smaller chunks so as to make data retrieval easy and quick. Each piece will be known as a partition 

and can be accessed separately. Apart from tables, indexes can also be partitioned.


Q #35) How can we identify the resources for which the sessions are waiting?

Answer: We can find it out using v$session_waits and v$ system _waits.


No comments:

ORA-00059: Maximum Number Of DB_FILES Exceeded in 19C database

When I am adding datafile to my 19C database facing the below error. SQL> alter tablespace DATA  add datafile '/u01/data/data15.dbf...