Oracle PL SQL tutorial to teach you the basics of programming in PL/SQL like cursors, stored procedures, functions. Complete Free PL/SQL Tutorial for an Oracle DBA. Includes PL/SQL Interview questions to prepare for Oracle DBA Jobs
Monday, May 29, 2017
Oracle Interview Questions and Answers - SQL Queries and Database
1. What is oracle database ?
Oracle Database is a relational database management system (RDBMS) which is used to store and retrieve the large amounts of data. Oracle Database had physical and logical structures. Logical structures and physical structures are separated from each other
2. Explain oracle grid architecture?
Grid computing is a information technology architecture that provides lower cost enterprise information systems. Using grid computing, independent hardware, and software components can be connected and rejoined on demand to meet the changing needs of businesses. It also enables the use of smaller individual hardware components.
3. What is the difference between large dedicated server and oracle grid?
Large dedicated server:
It has expensive costly components.
High incremental costs.
It has single point of failure.
Enterprise service at higher cost.
It has low cost modular components.
Low incremental costs.
It has no single point of failure.
Enterprise service at low cost.
4. What are the computing components of oracle grid?
The computing componenets of oracle grid are:
Oracle Enterprise Manager and Grid Control
Oracle 10g Database and Real Application Clusters.
ASM Storage Grid.
5. What is server virtualization?
Oracle Real Application Clusters 10g (RAC) enables a single database to run across multiple clustered nodes in a grid, pooling the processing resources of several standard machines.
6. What is storage virtualization?
The Oracle Automatic Storage Management (ASM) is a feature of Oracle Database 10g which provides a virtual layer between the database and storage so that group of disks can be treated as a single disk group and disks can be dynamically added or removed while keeping databases online.
Also Read Basic to Advanced Oracle SQL Query Interview Question and Answers
7. What is Grid Management feature?
The Grid Management feature of Oracle Enterprise Manager 10g provides a single console to manage multiple systems together as a logical group.
8. When oracle allocates an SGA?
When Oracle starts, it reads the initialization parameter file to determine the values of initialization parameters. After this, it allocates an SGA and creates background processes.
9. What is an oracle instance?
When you start, the database instance comes into picture into system memory. Combination of the SGA and the Oracle processes is called an Oracle instance.
10. What are the several tools for interacting with the oracle database using sql?
There are several tools for interfacing with the database using SQL:
Oracle SQL*Plus and iSQL*Plus
Oracle Forms, Reports, and Discoverer
Oracle Enterprise Manager
11. How oracle works?
An instance has started on the database server.
A client established a connection to the server, using the proper Oracle Net Services driver.
The server creates a dedicated server process on behalf of the user process.
The user executes SQL statement and commits the transaction.
The server process receives the statement and checks for any shared SQL area that contains a similar SQL.
The server process retrieves data from datafile (table) or SGA.
The server process modifies data in the SGA area. The DBWn process writes modified blocks permanently to disk. The LGWR process records the transaction in the redo log file.
The server process sends a message to the application.
12. What contains oracle physical database structure?
Redo Log Files
Archive Log Files
Alert and Trace Log Files
13. What is a Tablespace?
Oracle use Tablespace for logical data Storage. Physically, data will get stored in Datafiles. Datafiles will be connected to tablespace. A tablespace can have multiple datafiles. A tablespace can have objects from different schema's and a schema can have multiple tablespace's. Database creates "SYSTEM tablespace" by default during database creation. It contains read only data dictionary tables which contains the information about the database.
14. What is a Control File ?
Control file is a binary file which stores Database name, associated data files, redo files, DB creation time and current log sequence number. Without control file database cannot be started and can hamper data recovery.
15. What are data blocks?
Oracle stores data in data blocks also called as logical blocks, Oracle blocks or pages. A data block represents specific number of bytes of space on disk.
16. What is an extent?
An extent is a specific number of consecutive data blocks allocated for storing a specific type of information.
17. What is a segment?
A segment is a group of extents, each of which has been allocated for a specific data structure and all of which are stored in the same table-space.
18. What is Rollback Segment ?
Database contain one or more Rollback Segments to roll back transactions and data recovery.
19. What are the different type of Segments ?
Data Segment(for storing User Data), Index Segment (for storing index), Rollback Segment and Temporary Segment.
20. What is an oracle schema?
A user account and its associated data including tables, views, indexes, clusters, sequences,procedures, functions, triggers,packages and database links is known as Oracle schema. System, SCOTT etc are default schema's. We can create a new Schema/User. But we can't drop default database schema's.
21. When and how oracle database creates a schema?
Oracle Database automatically creates a schema when you create a user.
22. What is a view?
A view is a tailored presentation of the data contained in one or more tables or other views. A view is output of a query and treats it as a table. Therefore, a view can be thought of as a stored query or a virtual table. A view is not assigned any storage space, nor does a view actually contain data.
23. How views are used?
It provides security by restricting access to a predetermined set of rows or columns of a table. It hides data complexity. It simplifies statements for the user.
An example would be the views, which allow users to select data from multiple tables without actually knowing how to perform a join.
It presents the data in a different perspective from that of the base table. It isolate applications from changes in definitions of base tables. It saves complex queries.
24. What are materialized views?
These are schema objects that are used to summarize, compute, replicate, and distribute data. They can be used in various environments for computation such as data warehousing, decision support, and distributed or mobile computing and it also provides local access to data rather than accessing from remote sites. In data warehouses, MVs are used to compute and store aggregated data.