InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 951. |
Do View Contain Data ? |
|
Answer» VIEWS do not CONTAIN or STORE DATA. Views do not contain or store data. |
|
| 952. |
What Is The Use Of Control File ? |
|
Answer» When an instance of an ORACLE DATABASE is started, its control file is used to identify the database and redo log files that MUST be OPENED for database OPERATION to proceed. It is also used in database recovery. When an instance of an ORACLE database is started, its control file is used to identify the database and redo log files that must be opened for database operation to proceed. It is also used in database recovery. |
|
| 953. |
Can Objects Of The Same Schema Reside In Different Tablespaces? |
|
Answer» Yes. Yes. |
|
| 954. |
Can A Tablespace Hold Objects From Different Schemes ? |
|
Answer» Yes. Yes. |
|
| 955. |
Can A View Based On Another View ? |
|
Answer» Yes. Yes. |
|
| 956. |
What Is Full Backup ? |
|
Answer» A full backup is an operating SYSTEM backup of all data files, on-line REDO LOG files and control file that constitute ORACLE DATABASE and the PARAMETER. A full backup is an operating system backup of all data files, on-line redo log files and control file that constitute ORACLE database and the parameter. |
|
| 957. |
What Is Mirrored On-line Redo Log ? |
|
Answer» A MIRRORED on-line redo log consists of copies of on-line redo log files physically located on separate disks, changes made to one member of the GROUP are made to all MEMBERS. A mirrored on-line redo log consists of copies of on-line redo log files physically located on separate disks, changes made to one member of the group are made to all members. |
|
| 958. |
What Is Partial Backup ? |
|
Answer» A Partial Backup is any OPERATING system backup SHORT of a FULL backup, TAKEN while the database is OPEN or shut down. A Partial Backup is any operating system backup short of a full backup, taken while the database is open or shut down. |
|
| 959. |
What Is An Oracle View? |
|
Answer» VIEW is a VIRTUAL table. EVERY view has a query ATTACHED to it. (The query is a SELECT statement that identifies the columns and rows of the table(s) the view USES). view is a virtual table. Every view has a query attached to it. (The query is a SELECT statement that identifies the columns and rows of the table(s) the view uses). |
|
| 960. |
What Is Oracle Table? |
|
Answer» A table is the BASIC UNIT of data storage in an ORACLE database. The TABLES of a database hold all of the USER accessible data. Table data is stored in rows and columns. A table is the basic unit of data storage in an Oracle database. The tables of a database hold all of the user accessible data. Table data is stored in rows and columns. |
|
| 961. |
Can A Tablespace Hold Objects From Different Schemes? |
|
Answer» Yes. Yes. |
|
| 962. |
What Are Schema Objects? |
|
Answer» Schema objects are the LOGICAL structures that directly refer to the DATABASE's data. Schema objects include tables, views, SEQUENCES, synonyms, indexes, clusters, database triggers, procedures, functions PACKAGES and database links. Schema objects are the logical structures that directly refer to the database's data. Schema objects include tables, views, sequences, synonyms, indexes, clusters, database triggers, procedures, functions packages and database links. |
|
| 963. |
What Is Schema? |
|
Answer» A SCHEMA is COLLECTION of DATABASE OBJECTS of a USER. A schema is collection of database objects of a user. |
|
| 964. |
What Is System Tablespace And When Is It Created? |
|
Answer» EVERY Oracle database contains a TABLESPACE named SYSTEM, which is automatically created when the database is created. The SYSTEM tablespace always contains the data DICTIONARY TABLES for the entire database. Every Oracle database contains a tablespace named SYSTEM, which is automatically created when the database is created. The SYSTEM tablespace always contains the data dictionary tables for the entire database. |
|
| 965. |
What Is A Tablespace? |
|
Answer» A DATABASE is divided into Logical Storage UNIT called tablespaces. A tablespace is used to GROUPED related logical structures together. A database is divided into Logical Storage Unit called tablespaces. A tablespace is used to grouped related logical structures together. |
|
| 966. |
What Are The Components Of Logical Database Structure Of Oracle Database? |
|
Answer» There are TABLESPACES and DATABASE's SCHEMA OBJECTS. There are tablespaces and database's schema objects. |
|
| 967. |
What Are The Components Of Physical Database Structure Of Oracle Database? |
|
Answer» ORACLE DATABASE is comprised of three types of FILES. One or more datafiles, two are more REDO log files, and one or more control files. Oracle database is comprised of three types of files. One or more datafiles, two are more redo log files, and one or more control files. |
|
| 968. |
How Do You Move Tables From One Tablespace To Another Tablespace? |
|
Answer» There are several METHODS to do this;
CREATE TABLE temp_name TABLESPACE new_tablespace AS SELECT * FROM source_table; Then drop the original table and rename the temporary table as the original: DROP TABLE real_table;RENAME temp_name TO real_table. There are several methods to do this; CREATE TABLE temp_name TABLESPACE new_tablespace AS SELECT * FROM source_table; Then drop the original table and rename the temporary table as the original: |
|
| 969. |
Can You Import Objects From Oracle Ver. 7.3 To 9i? |
|
Answer» Different versions of the import utility are upwards COMPATIBLE. This means that one can take an export file created from an old export version, and import it using a LATER version of the import utility. Oracle also ships some previous catexpX.sql SCRIPTS that can be executed as user SYS ENABLING older imp/exp versions to work (for backwards compatibility). For example, one can RUN $ORACLE_HOME/rdbms/admin/catexp7.sql on an Oracle 8 database to allow the Oracle 7.3 exp/imp utilities to run against an Oracle 8 database. Different versions of the import utility are upwards compatible. This means that one can take an export file created from an old export version, and import it using a later version of the import utility. Oracle also ships some previous catexpX.sql scripts that can be executed as user SYS enabling older imp/exp versions to work (for backwards compatibility). For example, one can run $ORACLE_HOME/rdbms/admin/catexp7.sql on an Oracle 8 database to allow the Oracle 7.3 exp/imp utilities to run against an Oracle 8 database. |
|
| 970. |
What Is Difference Between Multithreaded/shared Server And Dedicated Server? |
|
Answer» Oracle Database CREATES server processes to handle the requests of user processes connected to an instance. A server process can be either of the following:
Your database is always ENABLED to allow dedicated server processes, but you must SPECIFICALLY configure and enable shared server by setting one or more initialization parameters. Oracle Database creates server processes to handle the requests of user processes connected to an instance. A server process can be either of the following: Your database is always enabled to allow dedicated server processes, but you must specifically configure and enable shared server by setting one or more initialization parameters. |
|
| 971. |
What Is The Difference Between Range Partitioning And Hash Partitioning? |
|
Answer» Range Partitioning MAPS data to partitions based on a range of column values (e.g. a date column) Range Partitioning maps data to partitions based on a range of column values (e.g. a date column) |
|
| 972. |
What Is A Global Index And Local Index? |
|
Answer» Local Index :each partition of a local index is ASSOCIATED with exactly one partition of the table. Oracle offers two TYPES of global partitioned index:
Local Index :each partition of a local index is associated with exactly one partition of the table. Oracle offers two types of global partitioned index:
|
|
| 973. |
What Is The Difference Between Direct Path And Conventional Path Loading? |
|
Answer» A conventional path load executes SQL INSERT statements to POPULATE tables in an ORACLE database. A conventional path load executes SQL INSERT statements to populate tables in an Oracle database. |
|
| 974. |
What Is The Difference Between Delete And Truncate Statements? |
|
Answer» DELETE: command is used to remove rows from a table. A WHERE clause can be used to only remove some rows. If no WHERE condition is specified, all rows will be removed. After performing a DELETE OPERATION you need to COMMIT or ROLLBACK the transaction to MAKE the CHANGE permanent or to undo it. TRUNCATE: removes all rows from a table. A WHERE clause is not permited. The operation cannot be rolled back and no triggers will be fired. As such, TRUCATE is faster and doesn't use as much undo space as a DELETE. DELETE: command is used to remove rows from a table. A WHERE clause can be used to only remove some rows. If no WHERE condition is specified, all rows will be removed. After performing a DELETE operation you need to COMMIT or ROLLBACK the transaction to make the change permanent or to undo it. TRUNCATE: removes all rows from a table. A WHERE clause is not permited. The operation cannot be rolled back and no triggers will be fired. As such, TRUCATE is faster and doesn't use as much undo space as a DELETE. |
|
| 975. |
Can You Assign Priority To Users? |
|
Answer» YES. This is achievable with Oracle Resource Manager. YES. This is achievable with Oracle Resource Manager. |
|
| 976. |
Can You Change Shared_pool_size Online? |
|
Answer» YES. That's POSSIBLE. YES. That's possible. |
|
| 977. |
What Is Statspack Tool? |
|
Answer» STATSPACK: is a performance diagnosis TOOL provided by Oracle starting from Oracle 8i and above.STATSPACK is a diagnosis tool for instance-wide performance problems it also supports APPLICATION tuning activities by providing DATA which identifies high-load SQL statements. Although AWR and ADDM (introduced in Oracle 10g) provide better statistics than STATSPACK, STATSPACK: is a performance diagnosis tool provided by Oracle starting from Oracle 8i and above.STATSPACK is a diagnosis tool for instance-wide performance problems it also supports application tuning activities by providing data which identifies high-load SQL statements. Although AWR and ADDM (introduced in Oracle 10g) provide better statistics than STATSPACK, |
|
| 978. |
What Is Db Buffer Cache Advisor? |
|
Answer» The Buffer CACHE Advisor provides advice on how to size the Database Buffer Cache to OBTAIN OPTIMAL cache HIT ratios. Member of PERFORMANCE Advisors --> Memory Advisor pack. The Buffer Cache Advisor provides advice on how to size the Database Buffer Cache to obtain optimal cache hit ratios. Member of Performance Advisors --> Memory Advisor pack. |
|
| 979. |
Can You See Execution Plan Of A Statement? |
|
Answer» YES. In many WAYS, for example from GUI based tools like TOAD, Oracle SQL Developer. Configuring AUTOTRACE, a SQL*Plus facility AUTOTRACE is a facility within SQL*Plus to show us the explain plan of the queries we've executed, and the RESOURCES they USED. Once the PLAN_TABLE has been installed in the database, You can control the report by setting the AUTOTRACE system variable.
YES. In many ways, for example from GUI based tools like TOAD, Oracle SQL Developer. Configuring AUTOTRACE, a SQL*Plus facility AUTOTRACE is a facility within SQL*Plus to show us the explain plan of the queries we've executed, and the resources they used. Once the PLAN_TABLE has been installed in the database, You can control the report by setting the AUTOTRACE system variable. |
|
| 980. |
Can You Built Indexes Online? |
|
Answer» YES. You can create and rebuild indexes online. YES. You can create and rebuild indexes online. |
|
| 981. |
When Should You Rebuilt Indexes? |
|
Answer» In 90% cases - NEVER. When the data in index is sparse (lots of HOLES in index, due to DELETES or UPDATES) and your query is usually range based. Also index blevel is one of the key indicators of performance of sql queries doing Index range scans. In 90% cases - NEVER. When the data in index is sparse (lots of holes in index, due to deletes or updates) and your query is usually range based. Also index blevel is one of the key indicators of performance of sql queries doing Index range scans. |
|
| 982. |
A Column Is Having Many Repeated Values Which Type Of Index You Should Create On This Column, If You Have To? |
|
Answer» For example, assume there is a motor vehicle DATABASE with numerous low-cardinality COLUMNS such as car_color, car_make, car_model, and car_year. Each column contains less than 100 distinct values by themselves, and a b-tree INDEX would be fairly useless in a database of 20 MILLION vehicles. For example, assume there is a motor vehicle database with numerous low-cardinality columns such as car_color, car_make, car_model, and car_year. Each column contains less than 100 distinct values by themselves, and a b-tree index would be fairly useless in a database of 20 million vehicles. |
|
| 983. |
A Table Is Having Few Rows, Should You Create Indexes On This Table? |
|
Answer» SMALL tables do not require INDEXES; if a query is taking too long, then the table might have grown from small to large. You can create an index on any column; however, if the column is not USED in any of these SITUATIONS, creating an index on the column does not increase performance and the index TAKES up resources unnecessarily. Small tables do not require indexes; if a query is taking too long, then the table might have grown from small to large. You can create an index on any column; however, if the column is not used in any of these situations, creating an index on the column does not increase performance and the index takes up resources unnecessarily. |
|
| 984. |
What Is B-tree Index? |
|
Answer» A B-Tree INDEX is a DATA structure in the FORM of a tree, but it is a tree of database blocks, not rows. A B-Tree index is a data structure in the form of a tree, but it is a tree of database blocks, not rows. |
|
| 985. |
What Type Of Indexes Are Available In Oracle? |
|
Answer» There are many index types within Oracle: B*Tree Indexes - common indexes in Oracle. They are similar construct to a binary tree, they provide fast access by KEY, to an individual row or range of rows, normally requiring very few reads to find the correct row. The B*Tree index has several subtypes:
Bitmap Indexes - With a bitmap index , a single index entry uses a bitmap to point to many rows SIMULTANEOUSLY, they are used with low data that is mostly read-only. Schould be avoided in OLTP systems. Function Based Indexes - These are B*Tree or bitmap indexes that store the computed result of a function on a row(s) (for example sorted results)- not the column data itself. Application Domain Indexes - These are indexes you build and store yuorself, either in Oracle or outside of Oracle interMedia Text Indexes - This is a specialised index built into Oracle to allow for keyword searching of large bodies of text. There are many index types within Oracle: B*Tree Indexes - common indexes in Oracle. They are similar construct to a binary tree, they provide fast access by key, to an individual row or range of rows, normally requiring very few reads to find the correct row. The B*Tree index has several subtypes: Bitmap Indexes - With a bitmap index , a single index entry uses a bitmap to point to many rows simultaneously, they are used with low data that is mostly read-only. Schould be avoided in OLTP systems. Function Based Indexes - These are B*Tree or bitmap indexes that store the computed result of a function on a row(s) (for example sorted results)- not the column data itself. Application Domain Indexes - These are indexes you build and store yuorself, either in Oracle or outside of Oracle interMedia Text Indexes - This is a specialised index built into Oracle to allow for keyword searching of large bodies of text. |
|
| 986. |
On Which Columns You Should Create Indexes? |
|
Answer» In general, you should CREATE an index on a column in any of the following SITUATIONS:
The following list gives guidelines in choosing COLUMNS to index:
In general, you should create an index on a column in any of the following situations: The following list gives guidelines in choosing columns to index: |
|
| 987. |
Can You Make Collection Of Statistics For Tables Automatically? |
|
Answer» YES. Oracle DATABSE has default, scheduled job "gather_stats_job" that analyses stats on a daily basis during the maintenance window time. There are two scheduled activities related to the collection of Oracle "statistics":
This job can be disabled with this command: EXEC dbms_scheduler.disable(’SYS.GATHER_STATS_JOB’); YES. Oracle databse has default, scheduled job "gather_stats_job" that analyses stats on a daily basis during the maintenance window time. There are two scheduled activities related to the collection of Oracle "statistics": This job can be disabled with this command: exec dbms_scheduler.disable(’SYS.GATHER_STATS_JOB’); |
|
| 988. |
How Often You Should Collect Statistics For A Table? |
|
Answer» Analyse if it's necessary:
Analyse if it's necessary: |
|
| 989. |
What Is Cost Based Optimization? |
|
Answer» The ORACLE Cost Based Optimizer (CBO) is a SQL Query optimizer that uses data statistics to identify the query plan with lowest cost before execution. The cost is based on the number of rows in a table, index efficiency, etc. All APPLICATIONS should be converted to use the Cost Based Optimizer as the RULE Based Optimizer is not be supported in Oracle 10G and above releases. The Oracle Cost Based Optimizer (CBO) is a SQL Query optimizer that uses data statistics to identify the query plan with lowest cost before execution. The cost is based on the number of rows in a table, index efficiency, etc. All applications should be converted to use the Cost Based Optimizer as the Rule Based Optimizer is not be supported in Oracle 10g and above releases. |
|
| 990. |
What Does Dbms_fga Package Do? |
|
Answer» The DBMS_FGA package provides FINE-grained security functions. DBMS_FGA is a PL/SQL package used to DEFINE Fine Grain AUDITING on objects.
The DBMS_FGA package provides fine-grained security functions. DBMS_FGA is a PL/SQL package used to define Fine Grain Auditing on objects. |
|
| 991. |
Can You Audit Select Statements? |
|
Answer» YES. But beware, you will need a storage mechanism to hold your SQL SELECT audits, a high data volume that can exceed the size of your whole database, everyday.
In a BUSY database, the volume of the SELECT audit trail could easily exceed the size of the database every data. PLUS, all data in the audit trail must also be audited to SEE who has selected data from the audit trail. YES. But beware, you will need a storage mechanism to hold your SQL SELECT audits, a high data volume that can exceed the size of your whole database, everyday. In a busy database, the volume of the SELECT audit trail could easily exceed the size of the database every data. Plus, all data in the audit trail must also be audited to see who has selected data from the audit trail. |
|
| 992. |
What Is A Locally Managed Tablespace? |
|
Answer» Locally Managed Tablespace is a tablespace that record extent allocation in the tablespace header. ADVANTAGES of Locally Managed Tablespaces:
Locally Managed Tablespace is a tablespace that record extent allocation in the tablespace header. Advantages of Locally Managed Tablespaces: |
|
| 993. |
What Is Row Migration And Row Chaining? |
|
Answer» Row Migration: Oracle will leave a FORWARDING pointer in the original BLOCK so indexes will still be able to "find" the row. Note that Oracle does not discriminate between CHAINED and migrated rows, even though they have different causes. A chained row is a row that is too large to fit into a single database data block. For example, if you use a 4KB blocksize for your database, and you need to insert a row of 8KB into it, Oracle will use 3 blocks and store the row in pieces. Some conditions that will cause row chaining are:
Detecting row chaining: To see which rows are chained: This will put the rows into the INVALID_ROWS table which is created by the utlvalid.sql script (located in $ORACLE_HOME/rdbms/admin). Row Migration: Oracle will leave a forwarding pointer in the original block so indexes will still be able to "find" the row. Note that Oracle does not discriminate between chained and migrated rows, even though they have different causes. A chained row is a row that is too large to fit into a single database data block. For example, if you use a 4KB blocksize for your database, and you need to insert a row of 8KB into it, Oracle will use 3 blocks and store the row in pieces. Some conditions that will cause row chaining are: Detecting row chaining: To see which rows are chained: This will put the rows into the INVALID_ROWS table which is created by the utlvalid.sql script (located in $ORACLE_HOME/rdbms/admin). |
|
| 994. |
What Is Pctfree And Pctused Setting? |
|
Answer» PCTFREE: is a block storage parameter used to specify how much space should be left in a database block for future updates. For example, for PCTFREE=10, Oracle will keep on adding new rows to a block until it is 90% full. This leaves 10% for future updates (row expansion). When using Oracle Advanced COMPRESSION, Oracle will trigger block compression when the PCTFREE is REACHED. This eliminates holes created by row deletions and maximizes contiguous free space in blocks. See the PCTFREE setting for a table: SQL> SELECT pct_free FROM user_tables WHERE table_name = 'EMP';PCT_FREE ---------- 10 PCTUSED:is a block storage parameter used to specify when Oracle should consider a database block to be empty enough to be added to the freelist. Oracle will only insert new rows in blocks that is enqueued on the freelist. For example, if PCTUSED=40, Oracle will not ADD new rows to the block unless sufficient rows are DELETED from the block so that it falls below 40% empty. PCTFREE: is a block storage parameter used to specify how much space should be left in a database block for future updates. For example, for PCTFREE=10, Oracle will keep on adding new rows to a block until it is 90% full. This leaves 10% for future updates (row expansion). When using Oracle Advanced Compression, Oracle will trigger block compression when the PCTFREE is reached. This eliminates holes created by row deletions and maximizes contiguous free space in blocks. See the PCTFREE setting for a table: PCTUSED:is a block storage parameter used to specify when Oracle should consider a database block to be empty enough to be added to the freelist. Oracle will only insert new rows in blocks that is enqueued on the freelist. For example, if PCTUSED=40, Oracle will not add new rows to the block unless sufficient rows are deleted from the block so that it falls below 40% empty. |
|
| 995. |
Large Pool Is Used For What? |
|
Answer» The large pool is an OPTIONAL memory area and provides large memory allocations for:
The large pool is an optional memory area and provides large memory allocations for: |
|
| 996. |
What Is Pga_aggregate_target Parameter? |
|
Answer» PGA_AGGREGATE_TARGET: SPECIFIES the target aggregate PGA MEMORY AVAILABLE to all server processes attached to the INSTANCE. PGA_AGGREGATE_TARGET: specifies the target aggregate PGA memory available to all server processes attached to the instance. |
|
| 997. |
What Is Difference Between Pfile And Spfile? |
|
Answer» A PFILE is a static, text FILE located in $ORACLE_HOME/dbs - UNIX. A PFILE is a static, text file located in $ORACLE_HOME/dbs - UNIX. |
|
| 998. |
What Is Kept In The Database Buffer Cache? |
|
Answer» The DATABASE BUFFER cache is the portion of the SGA that holds copies of DATA blocks read from datafiles. The database buffer cache is the portion of the SGA that holds copies of data blocks read from datafiles. |
|
| 999. |
Can You Make A Datafile Auto Extendible. If Yes, How? |
|
Answer» YES. A DATAFILE can be auto EXTENDIBLE. YES. A Datafile can be auto extendible. |
|
| 1000. |
Which Process Writes Data In Datafiles? |
|
Answer» Database Writer BACKGROUND PROCESS DBWn (20 POSSIBLE) writes dirty BUFFERS from the buffer cache to the data files.In other WORDS, this process writes modified blocks permanently to disk. Database Writer background process DBWn (20 possible) writes dirty buffers from the buffer cache to the data files.In other words, this process writes modified blocks permanently to disk. |
|