Professional Documents
Culture Documents
Selvaraj V
• What is Log Switch? – The point at which ORACLE ends writing to one
online redo log file and begins writing to another is called a log switch.
• What is On-line Redo Log? – The On-line Redo Log is a set of tow or more
on-line redo files that record all committed changes made to the database.
Whenever a transaction is committed, the corresponding redo entries
temporarily stores in redo log buffers of the SGA are written to an on-line
redo log file by the background process LGWR. The on-line redo log files are
used in cyclical fashion.
• – Close the
What are the steps involved in Database Shutdown?
Database, Dismount the Database and Shutdown the Instance.
• What is Archived Redo Log? – Archived Redo Log consists of Redo Log files
that have archived before being reused.
• What is Mirrored on-line Redo Log? – 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.
• What are the type of Synonyms? – There are two types of Synonyms
Private and Public
• What are Clusters? – Clusters are groups of one or more tables physically
stores together to share common columns and are often used together.
• What is an Integrity Constrains? – An integrity constraint is a declarative
way to define a business rule for a column of a table.
• What is a View? – A 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.)
• How to define Data Block size? – A data block size is specified for each
ORACLE database when the database is created. A database users and
allocated free database space in ORACLE datablocks. Block size is specified in
INIT.ORA file and can’t be changed latter.
• What does a Control file Contain? – A Control file records the physical
structure of the database. It contains the following information. Database
Name Names and locations of a database’s files and redolog files. Time stamp
of database creation.
NOTE: Problems will occur if synonyms are used to make table names the same
name; private synonyms override public synonyms.
Q- How can a new view be created from two old views that have common field
names?
A- Use aliases in the fields. For example:
CREATE VIEW x AS
SELECT tab1.fld1 afld1, tab2.fld1 bfld1
FROM tab1,tab2
WHERE tab1.fld1=tab2.fld1;
SELECT fld1,fld2
FROM tab1,tab2
WHERE key1=’&key1′;
Prompts for Enter value from key1: when data is entered this produces an old/new
information listing which may be turned off with
sELECT name,num
FROM v1 a
WHERE 10 > (SELECT COUNT(*)
FROM v1
WHERE a.num < num)
ORDER BY num;
• Trigonometric functions like SIN and COS are available in SQL, and thus
SQL*Plus
• 1* select sin(3.14159/2), cos(3.14159/2) from dual
• SQL> /
•
• SIN(3.14159/2) COS(3.14159/2)
• -------------- --------------
• 1 1.3268E-06
The query
SELECT *
FROM table1
WHERE ROWNUM < 11
does not return the first 10 rows for any reasonable definition of “first”. It
returns an arbitrary 10 rows from the table. Since heap-organized tables are
essentially unordered, you would need to supply an ORDER BY clause to
identify what rows are “first”. And since ROWNUM is applied before ORDER
BY, you’ll need a nested query
SELECT *
FROM (
SELECT *
FROM your_table
ORDER BY some_column )
WHERE rownum <= 10;
Additionally, it will be more efficient to get the most common values by
scanning the table once, rather than twice, i.e.
Question: How many types of columns are there and what are they
Formula columns: For doing mathematical calculations and returning one value
Summary Columns: For doing summary calculations such as summations etc.
Place holder Columns: These columns are useful for storing the value in a variable
Answer: It is possible to have more than one layout in a report by using the
additional layout option in the layout editor.
Answer: Yes it is possible to run the report without parameter form by setting the
PARAM value to Null
Answer: Flex is the property of moving the related fields together by setting the flex
property on
What is Normalisation?
Normalisation is the process of organising the tables to remove the
redundancy.There are mainly 5 Normalisation rules.
a) 1 Normal Form : A table is said to be in 1st Normal Form when the attributes are
atomic
b) 2 Normal Form : A table is said to be in 2nd Normal Form when all the candidate
keys are dependant on the primary key
c) 3rd Normal Form : A table is said to be third Normal form when it is not
dependant transitively
Can you have two functions with the same name in a PL/SQL block ?
Yes.
Can you have two stored functions with the same name ?
Yes.
Can 2 functions have same name & input parameters but differ only by return
datatype
No.
What is the maximum no. of statements that can be specified in a trigger statement?
One.
Can views be specified in a trigger statement ?
No
What are the states of a rollback segment ? What is the difference between partly
available and needs recovery ?
The various states of a rollback segment are :
ONLINE, OFFLINE, PARTLY AVAILABLE, NEEDS RECOVERY and INVALID.
What is the difference between unique key and primary key ?
Unique key can be null; Primary key cannot be null.