Documente Academic
Documente Profesional
Documente Cultură
PL/SQL Questions
1. Describe the difference between a procedure, function and anonymous pl/sql block.
Level: Low
Expected answer : Candidate should mention use of DECLARE statement, a function must
return a value while a procedure doesn't have to. Anonymous block is used inside procedures
and functions with declare, begin and end
2. What is a mutating table error and how can you get around it?
Level: Intermediate
Expected answer: This happens with triggers. It occurs because the trigger is trying to update
a row it is currently using. The usual fix involves either use of views or temporary tables so
the database is selecting from one while updating the other.
3. Describe the use of %ROWTYPE and %TYPE in PL/SQL
Level: Low
Expected answer: %ROWTYPE allows you to associate a variable with an entire table row.
The %TYPE associates a variable with a single column type.
4. What packages (if any) has Oracle provided for use by developers?
Level: Intermediate to high
Expected answer: Oracle provides the DBMS_ series of packages. There are many which
developers should be aware of such as DBMS_SQL, DBMS_PIPE, DBMS_TRANSACTION,
DBMS_LOCK, DBMS_ALERT, DBMS_OUTPUT, DBMS_JOB, DBMS_UTILITY, DBMS_DDL,
UTL_FILE. If they can mention a few of these and describe how they used them, even better.
If they include the SQL routines provided by Oracle, great, but not really what was asked.
5. Describe the use of PL/SQL tables
Level: Intermediate
Expected answer: PL/SQL tables are scalar arrays that can be referenced by a binary integer.
They can be used to hold values for use in later queries or calculations. In Oracle they will be
able to be of the %ROWTYPE designation, or RECORD.
6. When is a declare statement needed ?
Level: Low
The DECLARE statement is used in PL/SQL anonymous blocks such as with stand alone,
non-stored PL/SQL procedures. It must come first in a PL/SQL stand alone file if it is used.
7. In what order should a open/fetch/loop set of commands in a PL/SQL block be
implemented if you use the %NOTFOUND cursor variable in the exit when statement?
Why?
Level: Intermediate
Expected answer: OPEN then FETCH then LOOP followed by the exit when. If not specified
in this order will result in the final return being done twice because of the way the
%NOTFOUND is handled by PL/SQL.
8. What are SQLCODE and SQLERRM and why are they important for PL/SQL
developers?
Level: Intermediate
Expected answer: SQLCODE returns the value of the error number for the last error
encountered. The SQLERRM returns the actual error message for the last error encountered.
They can be used in exception handling to report, or, store in an error log table, the error that
occurred in the code. These are especially useful for the WHEN OTHERS exception.
9. How can you find within a PL/SQL block, if a cursor is open?
Level: Low
Expected answer: Use the %ISOPEN cursor status variable.
10. How can you generate debugging output from PL/SQL?
Level:Intermediate to high
Expected answer: Use the DBMS_OUTPUT package. The DBMS_OUTPUT package can be
used to show intermediate results from loops and the status of variables as the procedure is
executed, however output only occurs after processing is finished, which might not be useful if
processing takes a long time. The package UTL_FILE can be used to write to a file, but one
must have write access to the output directory. A third possibility is to create a log table and
have the procedure write to the table. This will give you debugging information in real time.
11. What are the types of triggers?
Level:Intermediate to high
Expected Answer: There are 12 types of triggers in PL/SQL that consist of combinations of
the BEFORE, AFTER, ROW, TABLE, INSERT, UPDATE, DELETE and ALL key words:
BEFORE ALL ROW INSERT AFTER ALL ROW INSERT BEFORE INSERT AFTER INSERT
etc.
12. What is the correct sequence among FETCH, EXECUTE, And PARSE?
Level : Intermediate
Expected Answer : the correct sequence is PARSE, EXECUTE and then FETCH.
13. You got this error while using DBMS_OUTPUT.PUT_LINE package
ORA-20000: ORU-10027: buffer overflow, limit of 2000 bytes.
How to handle it?
Level : Intermediate
Expected Answer : Increase the default buffer size of 2000 bytes with the command
DBMS_OUTPUT.ENABLE(1000000);
14. Can we use GROUP BY and ORDER BY CLAUSE in where conditios.
Level : low and Intermediate
Expected Answer : no
15. What is cartesian product?
Level: Low and Intermediate
Expected Answer : The Cartesian product, also referred to as a cross-join, returns all the rows
in all the tables listed in the query. Each row in the first table is paired with all the rows in the
second table. This happens when there is no relationship defined between the two tables.
18. Can Commit,Rollback ,Savepoint be used in Database Triggers?If yes than HOW? If no
Why?With Reasons
Level : Intermediate
Expected Answer: we cannot commit inside a trigger. Having Commit / Rollback inside a
trigger defeats the standard of whole transaction's commit / rollback al together. Once
trigger execution is complete then only a transaction can be said as complete and then
only commit should take place.
DBA Questions
1. Give one method for transferring a table from one schema to another:
Level:Intermediate
Expected Answer: There are several possible methods, export-import, CREATE TABLE... AS
SELECT, or COPY.
2. What is the purpose of the IMPORT option IGNORE? What is it's default setting?
Level: Low
Expected Answer: The IMPORT IGNORE option tells import to ignore "already exists" errors.
If it is not specified the tables that already exist will be skipped. If it is specified, the error is
ignored and the tables data will be inserted. The default value is N.
3. You have a rollback segment in a version 7.2 database that has expanded beyond
optimal, how can it be restored to optimal?
Level: Low
Expected answer: Use the ALTER TABLESPACE ..... SHRINK command.
4. If the DEFAULT and TEMPORARY tablespace clauses are left out of a CREATE USER
command what happens? Is this bad or good? Why?
Level: Low
Expected answer: Prior Oracle9i the user is assigned the SYSTEM tablespace as a default
and temporary tablespace. This is bad because it causes user objects and temporary
segments to be placed into the SYSTEM tablespace resulting in fragmentation and improper
table placement (only data dictionary objects and the system rollback segment should be in
SYSTEM). In above oracle9i user is assigned the default user tablespace and default
temporary tablespace.
5. What are some of the Oracle provided packages that DBAs should be aware of?
Level: Intermediate to High
Expected answer: Oracle provides a number of packages in the form of the DBMS_ packages
owned by the SYS user. The packages used by DBAs may include: DBMS_SHARED_POOL,
DBMS_UTILITY, DBMS_SQL, DBMS_STATS, DBMS_DDL, DBMS_SESSION,
DBMS_OUTPUT and DBMS_SNAPSHOT. They may also try to answer with the UTL*.SQL or
CAT*.SQL series of SQL procedures. These can be viewed as extra credit but aren?t part of
the answer.
6. What happens if the constraint name is left out of a constraint clause?
Level: Low
Expected answer: The Oracle system will use the default name of SYS_Cxxxx where xxxx is
a system generated number. This is bad since it makes tracking which table the constraint
belongs to or what the constraint does harder.
7. What happens if a tablespace clause is left off of a primary key constraint clause?
Level: Low
Expected answer: This results in the index that is automatically generated being placed in
then users default tablespace. Since this will usually be the same tablespace as the table is
being created in, this can cause serious performance problems.
8. What is the proper method for disabling and re-enabling a primary key constraint?
Level: Intermediate
Expected answer: You use the ALTER TABLE command for both. However, for the enable
clause you must specify the USING INDEX and TABLESPACE clause for primary keys.
9. What happens if a primary key constraint is disabled and then enabled without fully
specifying the index clause?
Level: Intermediate
Expected answer: The index is created in the user?s default tablespace and all sizing
information is lost. Oracle doesn?t store this information as a part of the constraint definition,
but only as part of the index definition, when the constraint was disabled the index was
dropped and the information is gone.
10. (On UNIX) When should more than one DB writer process be used? How many
should be used?
Level: High
Expected answer: If the UNIX system being used is capable of asynchronous IO then only
one is required, if the system is not capable of asynchronous IO then up to twice the number
of disks used by Oracle number of DB writers should be specified by use of the db_writers
initialization parameter.
11. You are using hot backup without being in archivelog mode, can you recover in the
event of a failure? Why or why not?
Level: High
Expected answer: You can't use hot backup without being in archivelog mode. So no, you
couldn't recover.
12. What causes the "snapshot too old" error? How can this be prevented or
mitigated?
Level: Intermediate
Expected answer: This is caused by large or long running transactions that have either
wrapped onto their own rollback space or have had another transaction write on part of their
rollback space. This can be prevented or mitigated by breaking the transaction into a set of
smaller transactions or increasing the size of the rollback segments and their extents or undo
tablespace.
13. How can you tell if a database object is invalid?
Level: Low
Expected answer: By checking the STATUS column of the DBA_, ALL_ or USER_OBJECTS
views, depending upon whether you own or only have permission on the view or are using a
DBA account.
14. A user is getting an ORA-00942 error yet you know you have granted them
permission on the table, what else should you check?
Level: Low
Expected answer: You need to check that the user has specified the full name of the object
(SELECT empid FROM scott.emp; instead of SELECT empid FROM emp;) or has a synonym
that points to the object (CREATE SYNONYM emp FOR scott.emp;)
15. A developer is trying to create a view and the database won?t let him. He has the
"DEVELOPER" role which has the "CREATE VIEW" system privilege and SELECT
grants on the tables he is using, what is the problem?
Level: Intermediate
Expected answer: You need to verify the developer has direct grants on all tables used in the
view. You can't create a stored object with grants given through a role.
16. If you have an example table, what is the best way to get sizing data for the
production table implementation?
Level: Intermediate
Expected answer: The best way is to analyze the table and then use the data provided in the
DBA_TABLES view to get the average row length and other pertinent data for the calculation.
The quick and dirty way is to look at the number of blocks the table is actually using and ratio
the number of rows in the table to its number of blocks against the number of expected rows.
17. How can you find out how many users are currently logged into the database? How
can you find their operating system id?
Level: high Expected answer: There are several ways. One is to look at the v$session or
v$process views. Another way is to check the current_logins parameter in the v$sysstat view.
Another if you are on UNIX is to do a "ps -ef|grep oracle|wc -l? command, but this only works
against a single instance installation.
18. A user selects from a sequence and gets back two values, his select is:
SELECT pk_seq.nextval FROM dual; What is the problem?
Level: Intermediate
Expected answer: Somehow two values have been inserted into the dual table. This table is a
single row, single column table that should only have one value in it.
19. How can you determine if an index needs to be dropped and rebuilt?
Level: Intermediate
Expected answer: Run the ANALYZE INDEX command on the index to validate its structure
and then calculate the ratio of LF_BLK_LEN/LF_BLK_LEN+BR_BLK_LEN and if it isn?t near
1.0 (i.e. greater than 0.7 or so) then the index should be rebuilt. Or if the ratio BR_BLK_LEN/
LF_BLK_LEN+BR_BLK_LEN is nearing 0.3.
20. What are different kind of standby database configurations?
Level : Intermediate
Expected Answer : There are Physical standby and Logical stand by database
21. how to convert local management tablespace to dictionary managed tablespace?
Level : Intermediate
Expected Answer : use the following package
>execute dbms_space_admin.tablespace_convert_to_local('tablespace_name');
>execute dbms_space_admin.tablespace_convert_from_local('tablespace_name');
Each tablespace in an ORACLE database consists of one or more files called datafiles, which
are physical structures that conform with the operating system in which Oracle is running.
23. Explain the relationship among database, tablespace and data
file.What is schema?
Level : Intermediate
Expected Answer: Databases, tablespaces and datafiles are closely related, but they have
important differences:
Expected Answer: Oracle allows you to create private, public, and global database links.
Private Database Link: You can create a private database link in a specific schema of a
database. Only the owner of a private database link or PL/SQL subprograms in the schema
can use a private database link to access data and database objects in the corresponding
remote database.
Public Database Link : You can create a public database link for a database. All users and
PL/SQL subprograms in the database can use a public database link to access data and
database objects in the corresponding remote database.
Global Database Link - When an Oracle network uses Oracle Names, the names servers in
the system automatically create and manage global database links for every Oracle database
in the network. All users and PL/SQL subprograms in any database can use a global
database link to access data and database objects in the corresponding remote database.
A private database link is more secure than a public or global link, because only the owner of
the private link, or subprograms within the same schema, can use the private link to access
the specified remote database.
When many users require an access path to a remote Oracle database, an administrator can
create a single public database link for all users in a database.
When an Oracle network uses Oracle Names, an administrator can conveniently manage
global database links for all databases in the system. Database link management is
centralized and simple.
Level: Low
Expected Answer : A database instance also know as server is a set of memory structures
and background processes that access a set of database files.It is possible for a single
database to be accessed by multiple instances (this is oracle Rac server option).
Expected Answer: The basic memory structures associated with Oracle include:
• System Global Area (SGA), which is shared by all server and background
processes and holds the following:
o Database buffer cache
o Redo log buffer
o Shared pool
o Large pool (if configured)
• Program Global Areas (PGA), which is private to each server and background
process; there is one PGA for each process. The PGA holds the following:
o Stack areas
o Data areas
33. Which process writes data from data files to database buffer cache?
Level : High
Expected Answer: There is no background process which read data file and write to buffer
cache. Server process writes the data block it read from the database to the buffer. DBWR
process writes data from buffer to database
Level :Intermediate
Expected Answer: Normal view does not contain data, but Materialize view does contain
data.
35. How do you find wheather the instance was started with pfile or spfile
Level : Intermediate
Expected Answer: Thhere are 3 different ways :-
1) SELECT name, value FROM v$parameter WHERE name = 'spfile'; //This query will return
NULL if you are using PFILE
2) SHOW PARAMETER spfile // This query will returns NULL in the value column if you are
using pfile and not spfile
3) SELECT COUNT(*) FROM v$spparameter WHERE value IS NOT NULL; // if the count is non-
zero then the instance is using a spfile, and if the count is zero then it is using a pfile:
By Default oracle will look into the default location depends on the o/s. Like in unix, oracle
will check in $oracle_home/dbs directory and on windows it will check in
oracle_home/database directory, and the content of pfile is just text based, but spfile
content is in binary format, that is understandable by oracle very well.
Also oracle server always check the spfile or pfile with these sequence :-
SPFILE<SID>.ORA
SPFILE.ORA
PFILE<SID>.ORA
PFILE.ORA
37. What is SCN number in Oracle? How Oracle Use them, give
Explanation?
Level : Low or Intermediate
Expected Answer : The system change number (SCN) is an ever-increasing value that
uniquely identifies a committed version of the database. Every time a user commits a
transaction, Oracle records a new SCN. Oracle uses SCNs in control files, datafile headers,
and redo records. Every redo log file has both a log sequence number and low and high SCN.
38. How many maximum number of columns can be part of Primary Key in a
table in Oracle 9i and 10g?
Level : High
Expected Answer: You can set primary key on table upto 16 columns of table in oracle 9i
and 10g.
Level : Intermediate
Expected Answer : truncate does not generate undo, unlike delete operation.
1. Every dirty block in the buffer cache is written to the data files. That is, it
synchronizes the datablocks in the buffer cache with the datafiles on disk.
It's the DBWR that writes all modified databaseblocks back to the datafiles.
2. The latest SCN is written (updated) into the datafile header.
3. The latest SCN is also written to the controlfiles.
The update of the datafile headers and the control files is done by the LGWR(CKPT if
CKPT is enabled). As of version 8.0, CKPT is enabled by default.
Expected Answer: Once the pga_aggregate_target has been set, Oracle will automatically
manage PGA memory allocation based upon the individual needs of each Oracle
connection. It can only be set when you are using dedicated server.
43. How would you determine what sessions are connected and what
resources they are waiting for?
Level :low
Expected Answer: Use of V$SESSION and V$SESSION_WAIT
Level : Low
Expected Answer :
Redo logs are logical and physical structures that are designed to hold all the
changes (before and after) made to a database and are intended to aid in the
recovery of a database.
45.As as DBA, How would you determine who has added a row to a table?
Level : High
Expected Answer : Turn on fine grain auditing for the table.
46. Explain what is table partitioning is and what its benefit is.
Level : Intermediate
Expected Answer: Partitioning is a method of taking large tables and indexes and splitting
them into smaller, more manageable pieces for better performance.
Expected Answer :
Use the DBMS_SESSION.SET_SQL_TRACE or
Use ALTER SESSION SET SQL_TRACE = TRUE;
48. How can you tell if a database object is invalid?
Level: Low
49. A developer is trying to create a view and the database won?t let him
to do so. He has the "DEVELOPER" role which has granted "CREATE
VIEW" system privilege and SELECT grants on the tables he is using,
what is the problem?
Expected answer: You need to verify the developer has direct grants on all tables
used in the view. You can?t create a view with grants on tables given through
roles.
50. Explain the difference between a data block, an extent and a segment.
Level : low
Expected Answer:
A data block is the smallest unit of logical storage for a database object. As objects grow
they take chunks of additional storage that are composed of contiguous data blocks. These
groupings of contiguous data blocks are called extents. All the extents that an object takes
when grouped together are considered the segment of the database object.
In a database environment this will often happen because of not issuing proper row
lock commands. Poor design of front-end application may cause this situation and the
performance of server will reduce drastically.
34. Oracle use Index to have fast access to data. Name all Index Types in Oracle?
Level : Intermediate
Expected Answer: Normal (Btree Index), Bit Map Index, Function based Index, Partitioned
Index and Domain Index.
38. What are oracle database base tables and data dictionary view?
Level : Intermediate
Expected Answer : The base tables are underlying tables that store information about the
associated database. Only Oracle should write to and read these tables. Users rarely access
them directly because they are normalized, and most of the data is stored in a cryptic format.
The base tables are are normally named in v_$ format and its view are available in v$ format.
There are some vies available with prefix ALL_, DBA_ and USER_.
39. The ratio of disk (sort) is high. Is that good or bad? Why? How will you reduce disk
sort?
Level : Intermediate
Expected Answer: If Disk(sort)ratio is high, itis not good. You need to adjust size of
sort_area_retained_size and sort_area_size so that session can sort in max in memory.
40. What is Alert Log file and what is its importance for a DBA?
Level : High
Expected Answer: Oracle write error in alert log file. Depending upon the error corrective
action needs to be taken.1) DeadLock Error : Take the trace file in user dump destination and
analysis it for the error.2) ORA-01555 Snapshot error. Check the query try to fine tune and
check the undo size.3) Unable to extent segment : Check the tablespace size and if require
add space in the tablespace by 'alter database datafile .... resize' or alter tablespace add
datafile command.
40. Discuss row chaining, how does it happen? How can you reduce it?
How do you correct it?
Level: high
Expected answer: Row chaining occurs when a VARCHAR2 value is updated and
the length of the new value is longer than the old value and won?t fit in the
remaining block space. This results in the row chaining to another block. It effect
the performance while accessing such tables. It can be reduced by setting the
storage parameters on the table to appropriate values. It can be corrected by
export and import of the effected table.
41. What can cause a high value for recursive calls? How can this be
fixed?
Level: High
Expected answer: A high value for recursive calls is cause by improper cursor
usage, excessive dynamic space management actions, and or excessive
statement re-parses. You need to determine the cause and correct it By either
relinking applications to hold cursors, use proper space management techniques
(prop
Installation/Configuration Questions
1. Define OFA.?.
Level: Low
Expected answer: OFA stands for Optimal Flexible Architecture. It is a method of placing
directories and files in an Oracle system so that you get the maximum flexibility for future
tuning and file placement.
2. How do you set up your tablespace on installation?
Level: Low
Expected answer: The answer here should show an understanding of separation of redo and
rollback, data and indexes and isolation os SYSTEM tables from other tables. An example
would be to specify that at least 7 disks should be used for an Oracle installation so that you
can place SYSTEM tablespace on one, redo logs on two (mirrored redo logs) the
TEMPORARY tablespace on another, ROLLBACK tablespace on another and still have two
for DATA and INDEXES. They should indicate how they will handle archive logs and exports
as well. As long as they have a logical plan for combining or further separation more or less
disks can be specified.
3. What should be done prior to installing Oracle (for the OS and the disks)?
Level: Low
Expected Answer: adjust kernel parameters or OS tuning parameters in accordance with
installation guide. Be sure enough contiguous disk space is available. Check any other oracle
product is installed and find oracle home paths for already installed products.
4. You have installed Oracle and you are now setting up the actual instance. You have
been waiting an hour for the initialization script to finish, what should you check first
to determine if there is a problem?
Level: Intermediate to high
Expected Answer: Check to make sure that the archiver isn?t stuck. If archive logging is
turned on during install a large number of logs will be created. This can fill up your archive log
destination causing Oracle to stop to wait for more space.
5. When configuring SQLNET on the server what files must be set up?
Level: Intermediate
Expected answer: INITIALIZATION file, TNSNAMES.ORA file, SQLNET.ORA file
6. When configuring SQLNET on the client what files need to be set up?
Level: Intermediate
Expected answer: SQLNET.ORA, TNSNAMES.ORA
7. What must be installed with ODBC on the client in order for it to work with Oracle?
Level: Intermediate
Expected answer: SQLNET and PROTOCOL (for example: TCPIP adapter) layers of the
transport programs.
8. You have just started a new instance with a large SGA on a busy existing server.
Performance is terrible, what should you check for?
Level: Intermediate
Expected answer: The first thing to check with a large SGA is that it isn?t being swapped out.
9. What OS user should be used for the first part of an Oracle installation (on UNIX)?
Level: low
Expected answer: You must use root first.
10. When should the default values for Oracle initialization parameters be used as is?
Level: Low
Expected answer: Never
11. How many control files should you have? Where should they be located?
Level: Low
Expected answer: At least 2 on separate disk spindles. Be sure they say on separate disks,
not just file systems.
12. How many redo logs should you have and how should they be configured for
maximum recoverability?
Level: Intermediate
Expected answer: You should have at least three groups of two redo logs with the two logs
each on a separate disk spindle (mirrored by Oracle). The redo logs should not be on raw
devices on UNIX if it can be avoided.
13. How will you Drop a database?.
Level: High
Expected Answer: You can do it at the OS level by deleting all the files of the database. The
files to be deleted can be found using:
Clean up the listener.ora and the tnsnames.ora. make sure that the oratab entry is also
removed. In Oracle 10g, there is a new command to drop an entire database or use dbca.
-- Edit the trace file and change the CREATE CONTROLFILE command
-- CREATE CONTROLFILE REUSE SET DATABASE "NEW_SID_NAME" RESETLOGS
-- (note the SET keyword)
-- Rename GLOBAL_NAME to
ALTER DATABASE RENAME GLOBAL_NAME TO ;
In oracle10g there is to change database name run DBNEWID (nid) utility to change the
database name.
3. Can you start a database without SPfile in oracle 9i?
Level : intermediate
Expected Answer : Yes it is possible to start the database using init.ora file only. The main
advantage of using the SPFILE.ora is only to make changes to the dynamic initialization
parameters without restarting the database using the SCOPE option. The changes will be
stored in the spfile only and if you start the database using "pfile" option those changes wont
be applicable to the database.
4. What does database do during mounting process?
Level : Intermediate
Expected Answer: while mounting the database oracle reads the data from controlfile which is used for varifying
physical database files during sanity check.backgroung processes are started before mounting the database only.
5. Your junior dba has changed and lost sys password, how to recover it?
Level: High
Expected Answer:1. Members of the dba group (or the ORA_DBA group on Windows) are
allowed to log on as a SYS without supplying a password at all. Connect / as sysdba means
"get me on as sys. You can issue a command such as 'alter user sys identified by newpwd'.
2. If you're using a password file to authenticate as SYS, then you can simply delete the existing
password file and replace it with a new one... and you get to specify the new password for SYS at
the time you create the new file. The utility provided by Oracle for this purpose is "orapwd" and
the command on Windows, for example, would look like:
On Linux, the required name for the password file is of the form orapwSID, where SID is the
name of your instance/database. On Windows, it's as I showed you above: pwdSID.ora.
Once you have a new password file in place, you can log in as 'sys\newpword@somedb as
sysdba' and again issue an 'alter user sys identified by yetanothernewpword' command: that will
update the password file as well as changing things inside the database itself and you'll log on
with that password thereafter. The REMOTE_LOGIN_PASSWORD=EXCLUSIVE in parameter file.
6. With which software release Oracle first Introduced Flashback query?
Level : Intermediate
Expected Answer : Oracle9i
Expected Answer: The database must be mounted but not open. Use ALTER
DATABASE FLASHBACK ON statement. Database must be in archivelog mode.
8. How you can Flashback database to the certain time in past?
Level : High
Expected Answer:
STARTUP MOUNT EXCLUSIVE
ALTER DATABASE FLASHBACK ON;
ALTER DATABASE OPEN
With your database open for at least a day, You can pass your transaction and do some
testing. You can flash back the database one day with the following statements:
SHUTDOWN DATABASE
STARTUP MOUNT EXCLUSIVE
FLASHBACK DATABASE TO TIMESTAMP SYSDATE-1;
8. What is required to put database in Flashback mode?
Level : Intermediate or High
Expected Answer : Database must be in archive log mode and database should be
in mount state.
Consistent backup
Inconsistent backup
15. What are software available from oracle for database backup?
Level : High
Expected Answer : RMAN and Oracle Secure Backup
16. How many backup types are available in Oracle for database, name these?
Level : Intermediate
Expected Answer : There are 4 types of oracle backup are available in oracle
1. Cold backup. 2. Hot Backup. 3. Logical backup 4. Rman backup
17 . What is oracle logical backup, how you can perform it?
Level : Low or Intermediate
Expected Answer : A logical backup is an extract of the database. All SQL statements to
create the objects and all SQL statements to populate the objects are included in the extract.
Oracle provides a utility export or expdp, to create the extract. You can export whole
database, schema, tablespace or table.
18. Why does an Oracle database have to be recovered all together to the same point in
time?
Level : High
Expected Answer : This is just the way it is in Oracle. The referential integrity in a relational
database can only be guaranteed if the entire database is consistant in relation to the last
committed transactions.
19. Does a logical backup contain the data as well as the SQL needed to recreate the
objects?
Level : Intermediate or High
Expected Answer : May or may not, depend upon parameter selected during
export or expdp command.
21. How you can recovery drop table in oracle9i and Oracle10g?
Level : High
Expected Answer: In Oracle9i oracle flashback version query. In oracle10g
FLASHBACK TABLE Table_Name TO BEFORE DROP.
26. You have just had to restore from backup and do not have any control files. How
would you go about bringing up this database?
Level : High
Expected Answer : I would create a text based backup control file, stipulating where on disk
all the data files where and then issue the recover command with the using backup control file
clause.
27. What is the purpose of the IMPORT option IGNORE? What is it?s
default setting?
Level: Low
Expected Answer: The IMPORT IGNORE option tells import to ignore "already
exists" errors. If it is not specified the tables that already exist will be skipped. If it
is specified, the error is ignored and the tables data will be inserted. The default
value is N.
29. You are making Weekly Level 0 backup and daily level 1 Incremental RMAN
backup, what will happen if you do not have level 0 backup and run the follow
incremental backup level 1 command;
Run {
RECOVER COPY OF DATABASE WITH TAG 'WEEKLY';
BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'WEEKLY'
DATABASE;
}
Level : High
Expected Answer : It will give warning for the first command and create the
backup for Level 0 with tag 'WEEKLY'.
Level : Medium
8. Can you copy the datafiles of database configured in ASM using Operating system
Copy command?
Level : Intermediate or High
Expected Answer : NO
9. Can you configure Load balancing and failover feature in Oracle Database cluster
nodes and How?
Level : High
Expected Ansewer: Yes. You need to set up in TNSNAMES.ORA at client and server
parameter file. The parameters are LOAD_BALANCE=ON and FAILOVER_MODE, TYPE and
METHOD. Failover is done with the virtual IP Address assigned to rac database.
10. Which utility is used to manage the Oracle Database instance in RAC environment?
Level : High
Expected Answer: Oracle srvctl utility is used to manage the oracle database in cluster
environment for a database or its individual nodes in that cluster.
11. What is Cache Fusion Technology?
Level : High
Expected Answer : Cache Fusion is a new technology that uses a high speed interprocess
communication (IPC) interconnect to provide cache to cache transfers of data blocks between
instances in a cluster.
12. What column differentiates the V$ views to the GV$ views and how?
Level : High
Expected Answer :
The INST_ID column which indicates the instance in a RAC environment the information
came from.
13.