Interview Questions
Interview Questions
Interview Questions
NO DATA FOUND is an exception raised only for the SELECT....INTO statements when
the where clause of the query does not match any rows. When the where clause of the
explicit cursor does not match any rows the %NOTFOUND attribute is set to TRUE
instead.
Functions are named PL/SQL blocks that return a value and can be called with arguments
procedure a named block that can be called with parameter. A procedure all is a PL/SQL
statement by itself, while a Function call is called as part of an expression.
Both the truncate and delete command have the desired outcome of getting rid of all the
rows in a table. The difference between the two is that the truncate command is a DDL
operation and just moves the high water mark and produces a now rollback. The delete
command, on the other hand, is a DML operation, which will produce a rollback and thus
take longer to complete.
with it. UTL_FILE is a package that adds the ability to read and write to operating system
files Procedures associated with it are FCLOSE, FCLOSE_ALL and 5 procedures to
output data to a file PUT, PUT_LINE, NEW_LINE, PUTF, FFLUSH.PUT,
FFLUSH.PUT_LINE,FFLUSH.NEW_LINE. Functions associated with it are FOPEN,
ISOPEN.
7. What causes the "snapshot too old" error? How can this be prevented or
mitigated
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.
11. How you will avoid your query from using indexes
i.e you have to concatenate the column name with space within codes in the where
condition.
12. What are the different optimizers? What is the best? What are the different
ways of tuning SQL statements?
CBO / RBO
The EXPLAIN PLAN command is a tool to tune SQL statements. To use it you must
have an explain_table generated in the user you are running the explain plan for. This is
created using the utlxplan.sql script. Once the explain plan table exists you run the
explain plan command giving as its argument the SQL statement to be explained. The
explain_plan table is then queried to see the execution plan of the statement. Explain
plans can also be run using tkprof.
13. Scenario having txt file having data. How will you move this txt file into
database?
14. Dynamic sql in plsql (how will you call ddl from a oracle)
UNIX
3. cron
crontab –l
Min Hour Day Month Day_of_week
minute (0-59),
hour (0-23),
day of the month (1-31),
month of the year (1-12),
day of the week (0-6 with 0=Sunday).
5. I have a text file. Inside the text file you have a word ‘database’ . I want to replace the word to ‘oracle’.
How will you do that?
4. AWK / SED
REPORTS
A Data model is composed of some (or all ) of the following data definition objects:
2. what is Boilerplate
in report?
Boilerplate consists of text and graphics that appear in a report each time it is run. Graphics drawn in the
layout as well as text added to the layout are called boilerplates
Tabular / Form-like / Mailing Label / Form Letter / Group Left / Group Above / Matrix/ / Matrix with
group