- Placement Papers
- Interview Zone
- Resume Corner
- Contact Us
(Paper) ORACLE INTERVIEW QUESTIONS - SET-5
ORACLE INTERVIEW QUESTIONS - SET-5
What third party
tools can be used with Oracle EBU/ RMAN? (for DBA)
The following Media Management Software Vendors have integrated their media management software packages with Oracle Recovery Manager and Oracle7 Enterprise Backup Utility. The Media Management Vendors will provide first line technical support for the integrated backup/recover solutions.
EMC Data Manager (EDM)
HP OMNIBack II
IBM's Tivoli Storage Manager - formerly ADSM
ManageIT Backup and Recovery
Sterling Software's SAMS:Alexandria - formerly from Spectralogic
Sun Solstice Backup
Why and when should one
tune? (for DBA)
One of the biggest responsibilities of a DBA is to ensure that the Oracle database is tuned properly. The Oracle RDBMS is highly tunable and allows the database to be monitored and adjusted to increase its performance. One should do performance tuning for the following reasons:
The speed of computing might be wasting valuable human time (users waiting for response); Enable your system to keep-up with the speed business is conducted; and Optimize hardware usage to save money (companies are spending millions on hardware). Although this FAQ is not overly concerned with hardware issues, one needs to remember than you cannot tune a Buick into a Ferrari.
How can a break order be
created on a column in an existing group? What are the various sub events a
mouse double click event involves?
By dragging the column outside the group.
What is the use of place
holder column? What are the various sub events a mouse double click event
A placeholder column is used to hold calculated values at a specified place rather than allowing is to appear in the actual row where it has to appear.
What is the use of hidden
column? What are the various sub events a mouse double click event involves?
A hidden column is used to when a column has to embed into boilerplate text.
What database aspects
should be monitored? (for DBA)
One should implement a monitoring system to constantly monitor the following aspects of a database. Writing custom scripts, implementing Oracle's Enterprise Manager, or buying a third-party monitoring product can achieve this. If an alarm is triggered, the system should automatically notify the DBA (e-mail, page, etc.) to take appropriate action.
. Is the database up and responding to requests
. Are the listeners up and responding to requests
. Are the Oracle Names and LDAP Servers up and responding to requests
. Are the Web Listeners up and responding to requests
Things that can cause service outages:
. Is the archive log destination filling up?
. Objects getting close to their max extents
. User and process limits reached
Things that can cause bad performance:
See question "What tuning indicators can one use?".
Where should the tuning
effort be directed? (for DBA)
Consider the following areas for tuning. The order in which steps are listed needs to be maintained to prevent tuning side effects. For example, it is no good increasing the buffer cache if you can reduce I/O by rewriting a SQL statement. Database Design (if it's not too late):
Poor system performance usually results from a poor database design. One should generally normalize to the 3NF. Selective denormalization can provide valuable performance improvements. When designing, always keep the "data access path" in mind. Also look at proper data partitioning, data replication, aggregation tables for decision support systems, etc.
Experience showed that approximately 80% of all Oracle system performance problems are resolved by coding optimal SQL. Also consider proper scheduling of batch tasks after peak working hours.
Properly size your database buffers (shared pool, buffer cache, log buffer, etc) by looking at your buffer hit ratios. Pin large objects into memory to prevent frequent reloads.
Disk I/O Tuning:
Database files needs to be properly sized and placed to provide maximum disk subsystem throughput. Also look for frequent disk sorts, full table scans, missing indexes, row chaining, data fragmentation, etc
Eliminate Database Contention:
Study database locks, latches and wait events carefully and eliminate where possible. Tune the Operating System:
Monitor and tune operating system CPU, I/O and memory utilization. For more information, read the related Oracle FAQ dealing with your specific operating system.
What are the various sub
events a mouse double click event involves? What are the various sub events a
mouse double click event involves?
Double clicking the mouse consists of the mouse down, mouse up, mouse click, mouse down & mouse up events.
What are the default
parameter that appear at run time in the parameter screen? What are the various
sub events a mouse double click event involves?
Destype and Desname.
What are the built-ins
used for Creating and deleting groups?
What are different types
of canvas views?
Content canvas views
Stacked canvas views
What are the
different types of Delete details we can establish in Master-Details?
What is relation between
the window and canvas views?
Canvas views are the back ground objects on which you place the interface items (Text items), check boxes, radio groups etc.,) and boilerplate objects (boxes, lines, images etc.,) that operators interact with us they run your form . Each canvas views displayed in a window.
What is a User_exit?
Calls the user exit named in the user_exit_string. Invokes a 3Gl program by name which has been properly linked into your current oracle forms executable.
How is it possible to
select generate a select set for the query in the query property sheet?
By using the tables/columns button and then specifying the table and the column names.
How can values be passed
bet. precompiler exits & Oracle call interface?
By using the statement EXECIAFGET & EXECIAFPUT.
How can a square be drawn
in the layout editor of the report writer?
By using the rectangle tool while pressing the (Constraint) key.
How can a
file be attached to a report while creating in the report
By using the link file property in the layout boiler plate property sheet.
How can I message to
passed to the user from reports?
By using SRW.MESSAGE function.
Does one need to drop/
truncate objects before importing? (for DBA)
Before one import rows into already populated tables, one needs to truncate or drop these tables to get rid of the old data. If not, the new data will be appended to the existing tables. One must always DROP existing Sequences before re-importing. If the sequences are not dropped, they will generate numbers inconsistent with the rest of the database. Note: It is also advisable to drop indexes before importing to the import process. Indexes can easily be recreated after the data was successfully imported.
How can a button be used
in a report to give a drill down facility?
By setting the action associated with button to Execute pl/sql option and using the SRW.Run_report function.
Can one import/export
between different versions of Oracle? (for DBA)
Different versions of the import utility is 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. This is quite an effective way of upgrading a database from one release of Oracle to the next.
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.
What are different types
Boiler plate imagesImage Items
Can one export to multiple
files?/ Can one beat the Unix
2 Gig limit? (for DBA)
From Oracle8i, the export utility supports multiple output files. This feature enables large exports to be divided into files whose sizes will not exceed any operating system limits (FILESIZE= parameter). When importing from multi-file export you must provide the same filenames in the same sequence in the FILE= parameter. Look at this example:
exp SCOTT/TIGER FILE=D:\F1.dmp,E:\F2.dmp FILESIZE=10m LOG=scott.log
Use the following technique if you use an Oracle version prior to 8i:
Create a compressed export on the fly. Depending on the type of data, you probably can export up to 10 gigabytes to a single file. This example uses gzip. It offers the best compression I know of, but you can also substitute it with zip, compress or whatever.
# create a named pipe
mknod exp.pipe p
# read the pipe - output to zip file in the background
gzip < exp.pipe > scott.exp.gz &
# feed the pipe
exp userid=scott/tiger file=exp.pipe ...
What is bind reference and
how can it be created?
Bind reference are used to replace the single value in sql, pl/sql statements a bind reference can be created using a (:) before a column or a parameter name.
How can one improve
Import/ Export performance? (for DBA)
. Set the BUFFER parameter to a high value (e.g. 2M)
. Set the RECORDLENGTH parameter to a high value (e.g. 64K)
. Stop unnecessary applications to free-up resources for your job.
. If you run multiple export sessions, ensure they write to different physical disks.
. DO NOT export to an NFS mounted filesystem. It will take forever.
. Create an indexfile so that you can create indexes AFTER you have imported data. Do this by setting INDEXFILE to a filename and then import. No data will be imported but a file containing index definitions will be created. You must edit this file afterwards and supply the passwords for the schemas on all CONNECT statements.
. Place the file to be imported on a separate physical disk from the oracle data files
. Increase DB_CACHE_SIZE (DB_BLOCK_BUFFERS prior to 9i) considerably in the init$SID.ora file
. Set the LOG_BUFFER to a big value and restart oracle.
. Stop redo log archiving if it is running (ALTER DATABASE NOARCHIVELOG;)
. Create a BIG tablespace with a BIG rollback segment inside. Set all other rollback segments offline (except the SYSTEM rollback segment of course). The rollback segment must be as big as your biggest table (I think?)
. Use COMMIT=N in the import parameter file if you can afford it
. Use ANALYZE=N in the import parameter file to avoid time consuming ANALYZE statements
. Remember to run the indexfile previously created
Give the sequence of
execution of the various report triggers?
Before form , After form , Before report, Between page, After report.
What are the common
Import/ Export problems? (for DBA )
ORA-00001: Unique constraint (...) violated - You are importing duplicate rows. Use IGNORE=NO to skip tables that already exist (imp will give an error if the object is re-created).
ORA-01555: Snapshot too old - Ask your users to STOP working while you are exporting or use parameter CONSISTENT=NO
ORA-01562: Failed to extend rollback segment - Create bigger rollback segments or set parameter COMMIT=Y while importing
IMP-00015: Statement failed ... object already exists... - Use the IGNORE=Y import parameter to ignore these errors, but be careful as you might end up with duplicate rows.
Why is it preferable to
create a fewer no. of queries in the data model?
Because for each query, report has to open a separate cursor and has to rebind, execute and fetch data.
Where is the
external query executed at the client or the server?
At the server.
Where is a procedure
return in an external pl/sql library executed at the client or at the server?
At the client.
What is coordination
Any event that makes a different record in the master block the current record is a coordination causing event.
What is the difference
between OLE Server & Ole Container?
An Ole server application creates ole Objects that are embedded or linked in ole Containers ex. Ole servers are ms_word & ms_excel. OLE containers provide a place to store, display and manipulate objects that are created by ole server applications. Ex. oracle forms is an example of an ole Container.
What is an object
An object group is a container for a group of objects; you define an object group when you want to package related objects, so that you copy or reference them in other modules.
What is an LOV?
An LOV is a scrollable popup window that provides the operator with either a single or multi column selection list.
At what point of report
execution is the before Report trigger fired?
After the query is executed but before the report is executed and the records are displayed.
What are the built -ins
used for Modifying a groups structure?
What is an user exit used
A way in which to pass control (and possibly arguments ) form Oracle report to another Oracle products of 3 GL and then return control ( and ) back to Oracle reports.
What is the User-Named
A user named editor has the same text editing functionality as the default editor, but, because it is a named object, you can specify editor attributes such as windows display size, position, and title.
My database was terminated
while in BACKUP MODE, do I need to recover? (for DBA)
If a database was terminated while one of its tablespaces was in BACKUP MODE (ALTER TABLESPACE xyz BEGIN BACKUP;), it will tell you that media recovery is required when you try to restart the database. The DBA is then required to recover the database and apply all archived logs to the database. However, from Oracle7.2, you can simply take the individual datafiles out of backup mode and restart the database.
ALTER DATABASE DATAFILE '/path/filename' END BACKUP;
One can select from V$BACKUP to see which datafiles are in backup mode. This normally saves a significant amount of database down time.
Thiru Vadivelu contributed the following:
From Oracle9i onwards, the following command can be used to take all of the datafiles out of hot backup mode:
ALTER DATABASE END BACKUP;
The above commands need to be issued when the database is mounted.
What is a Static Record
A static record group is not associated with a query, rather, you define its structure and row values at design time, and they remain fixed at runtime.
What is a record group?
A record group is an internal Oracle Forms that structure that has a column/row framework similar to a database table. However, unlike database tables, record groups are separate objects that belong to the form module which they are defined.
My database is down and I
cannot restore. What now? (for DBA )
Recovery without any backup is normally not supported, however, Oracle Consulting can sometimes extract data from an offline database using a utility called DUL (Disk UnLoad). This utility reads data in the data files and unloads it into SQL*Loader or export dump files. DUL does not care about rollback segments, corrupted blocks, etc, and can thus not guarantee that the data is not logically corrupt. It is intended as an absolute last resort and will most likely cost your company a lot of money!!!
I've lost my REDOLOG
files, how can I get my DB back? (for DBA)
The following INIT.ORA parameter may be required if your current redo logs are corrupted or blown away. Caution is advised when enabling this parameter as you might end-up losing your entire database. Please contact Oracle Support before using it. _allow_resetlogs_corruption = true
What is a property clause?
A property clause is a named object that contains a list of properties and their settings. Once you create a property clause you can base other object on it. An object based on a property can inherit the setting of any property in the clause that makes sense for that object.
What is a physical page ?
& What is a logical page ?
A physical page is a size of a page. That is output by the printer. The logical page is the size of one page of the actual report as seen in the Previewer.
I've lost some Rollback
Segments, how can I get my DB back? (for DBA)
Re-start your database with the following INIT.ORA parameter if one of your rollback segments is corrupted. You can then drop the corrupted rollback segments and create it from scratch.
Caution is advised when enabling this parameter, as uncommitted transactions will be marked as committed. One can very well end up with lost or inconsistent data!!! Please contact Oracle Support before using it. _Corrupted_rollback_segments = (rbs01, rbs01, rbs03, rbs04)
What are the differences
between EBU and RMAN? (for DBA)
Enterprise Backup Utility (EBU) is a functionally rich, high performance interface for backing up Oracle7 databases. It is sometimes referred to as OEBU for Oracle Enterprise Backup Utility. The Oracle Recovery Manager (RMAN) utility that ships with Oracle8 and above is similar to Oracle7's EBU utility. However, there is no direct upgrade path from EBU to RMAN.
How does one create a RMAN
recovery catalog? (for DBA)
Start by creating a database schema (usually called rman). Assign an appropriate tablespace to it and grant it the recovery_catalog_owner role. Look at this example:
SQL>create user rman identified by rman;
SQL> alter user rman default tablespace tools temporary tablespace temp;
SQL> alter user rman quota unlimited on tools;
SQL> grant connect, resource, recovery_catalog_owner to rman;
Next, log in to rman and create the catalog schema. Prior to Oracle 8i this was done by running the catrman.sql script. rman catalog rman/rman
RMAN>create catalog tablespace tools;
You can now continue by registering your databases in the catalog. Look at this example:
rman catalog rman/rman target backdba/backdba
RMAN> register database;
How can a group in a cross
products be visually distinguished from a group that does not form a cross
A group that forms part of a cross product will have a thicker border.
What is the frame &
A frame is a holder for a group of fields. A repeating frame is used to display a set of records when the no. of records that are to displayed is not known before.
What is a combo box?
A combo box style list item combines the features found in list and text item. Unlike the pop list or the text list style list items, the combo box style list item will both display fixed values and accept one operator entered value.
What are three panes
that appear in the run time pl/sql interpreter?
1. Source pane.
2. interpreter pane.
3. Navigator pane.
What are the two panes
that Appear in the design time pl/sql interpreter?
1. Source pane.
2. Interpreter pane
What are the two ways by
which data can be generated for a parameters list of values?
1. Using static values.
2. Writing select statement.
What are the various methods
of performing a
calculation in a report ?
1. Perform the calculation in the SQL statements itself.
2. Use a calculated / summary column in the data model.
What are the default
extensions of the files created by menu module?
What are the default
extensions of the files created by forms modules?
.fmb - form module binary
.fmx - form module executable
To display the page no.
for each page on a report what would be the source & logical page no. or
& of physical page no.?
& physical page no.