What Is RDBMS?: Primary Key
What Is RDBMS?: Primary Key
1. What is RDBMS?
Ans.
Relational Data Base Management system is system software that stores and
manages access to data held in relational form, laid down by Dr.E.F.Codd
5. What is SGA?
Ans.
System Global Area or Shared Global Area is a group of shared memory structures
that contain data and control information for one instance. If multiple users are
concurrently connected to the same instance, the data in the instance's SGA is
"shared" among the users.
6. What is instance?
Ans.
The combination of the SGA and the Oracle processes (Background Process) is
called an Oracle database instance. Instance will start in NOMOUNT stage.
14. What are DBWR, LGWR, PMON, SMON, RECO, CKPT, Dnnn and ARCH?
Ans.
DBWR - Database Writer process or Dirty Buffer Writer (DBWR) writes DB
buffers to datafiles
LGWR - Log Writer process (LGWR) writes the redo log buffer to a redo log file
on disk
PMON – Process Monitor (PMON) performs process recovery when a user process
fails. PMON is responsible for cleaning up the cache and freeing resources (Lock)
RECO - Recoverer process (RECO) is a process used with the distributed option that
Automatically resolves failures involving distributed transactions and resolves in-
doubt transactions also.
CKPT - When a checkpoint occurs, Oracle must update the header of all data files to
highest SCN to indicate the checkpoint.
Dnnn - Dispatcher processes allow user processes to share a limited number of server
processes.
ARCH - Archiver process (ARCH) copies online redo log files to a designated storage
device once they become full. ARCH is present only when the redo log is used in
ARCHIVELOG mode and automatic archiving is enabled.
16. Is checkpoint optional? Then which one will take care of ckpt is not present?
Ans.
Yes. Checkpoint is optional. If you are not enabled CKPT using
CHECKPOINT_PROCESS=TRUE, this job is performed by LGWR
17. Which background process you can have more than in an instance?
Ans.
Dnnn. You can create multiple dispatcher processes for a single database instance.
18. When the data buffer will be flushed into respective files?
Ans.
1. When ever dirty list gets filled.
2. When ever checkpoint is taking place.
19. What is parameter file?
Ans.
The parameter file is a text file that contains a list of parameters and a value for each
parameter. This file will read in the NOMOUNT stage. The default parameter file
name is INITORCL.ORA (ORCL is SID).
20. Which parameter can’t be changed after the init file has been set?
Ans.
DB_BLOCK_SIZE. If you want change the block size you have to recreate the
database.
37. When system tablespace and system rollback segment will be made offline?
Ans.
System tablespace and system rollback segments can’t make offline. Because system
transactions and data dictionary views will take place in the system rollback segments
and system tablespaces.
65. What is object audit, how to enable it and where will you see the result?
Ans.
To audit all successful and unsuccessful DELETE statements on the EMP table,
BY SESSION (the default value), enter the following statement:
AUDIT DELETE ON emp;
66. What is statement audit, how to enable it and where will you see the result?
Ans.
To audit all successful and unsuccessful connections to and disconnection
from the database BY SESSION (the default and only value for this option), enter the
following statement:
AUDIT SESSION BY Scott, lori;
67. What is privilege audit, how to enable it and where will you see the result?
Ans.
To audit all unsuccessful SELECT, INSERT, and DELETE statements on all
tables and unsuccessful uses of the EXECUTE ANY PROCEDURE system privilege,
by all database users, BY ACCESS, enter the following statement:
AUDIT SELECT TABLE, INSERT TABLE, DELETE TABLE,
EXECUTE ANY PROCEDURE BY ACCESS WHENEVER NOT SUCCESSFUL;
71. How to change from noarchivelog to archivelog? Explain all the steps.
Ans.
ALTER DATABASE ARCHIVELOG;
Steps:
a. Shut down the database instance.
b. Start up a new instance and mount but do not open the database.
c. In mount Stage say ALTER DATABASE ARCHIVELOG;
d. Open the database;
72. How to change from archivelog to noarchivelog? Explain all the steps.
Ans.
ALTER DATABASE NOARCHIVELOG;
Steps:
e. Shut down the database instance.
f. Start up a new instance and mount but do not open the database.
g. In mount Stage say ALTER DATABASE NOARCHIVELOG;
h. Open the database;
90. How do you take the backup of control file. Why do you have to take that?
Ans.
SVRMGR> ALTER DATABASE BACKUP CONTROL FILE TO TRACE;
Because a control file keeps track of the associated database's physical file
structure, a backup of a database's control file should be made every time a
structural change is made to the database.
93. What is hot backup, when do you take it and how do you take it? Explain the steps.
Ans.
Online or HOT backups allow you to back up all or part of the database while it is
running.
Syntax
ALTER TABLESPACE <Tablespace name> BEGIN BACKUP;
99. What happens when you issue begin backup and end backup?
Ans.
When you say begin backup, checkpoint will take place to update the highest
SCN in the respective Tablespace’s datafile header after that datafile header will be
frozen.
When you say end backup, datafile header frozen will be released.
Checkpoint will not take place.
100.What is recovery?
Ans.
If hardware, software, network, process, or system failure affects the
operation of a database system, you must usually recover the databases and return to
normal operations as quickly as possible.
106. What will you do when you lost in both archivelog and noarchivelog mode
a) Datafile (with and without backup)
b) Log file (with and without backup)
c) Control file (with and without backup)
Ans.
………
118.Explain the difference between rule based and cost based approach.
Ans.
……….
119.List the access paths.
Ans.
1. Single row returned by ROWID
2. Single row returned by CLUSTER join
3 Single row returned by hash cluster join, with unique or primary key
4 Single row returned by unique or primary key
5. Cluster join
6. Hash cluster key
7. Indexed cluster key
8. Composite index
9. Single-column index
10 Bound range search on indexed column
11.Unbound range search on indexed column.
12.Sort merge join
13. MAX or MIN of indexed column
14.ORDER BY on indexed column
15. Full table scans.
120.When will you create index? Up to what extend it is worth to index.
Ans.
As a general guideline, you should create indexes on tables that are often queried
for less than 2% or 4% of the table's rows. This value may be higher in situations where
all data can be retrieved from an index, or where the indexed columns can be used for
joining to other tables.
123.What is Explain plan. Why is used and what type of result you will get?
Ans.
EXPLAIN PLAN is a SQL statement that lists the access path determined by the
query optimizer.
The EXPLAIN PLAN command displays the execution plan chosen by the Oracle
optimizer for SELECT, UPDATE, INSERT, and DELETE statements. A statement's
execution plan is the sequence of operations that Oracle performs to execute the
statement. By examining the execution plan, you can see exactly how Oracle executes
your SQL statement. The result will be store in PLAN_TABLE.
124.What is TKPROF. Why is used and what type of result you will get?
Ans.
You can run the TKPROF program to format the contents of the trace file and
place the output into a readable output file.
TKPROF output includes the following information:
. The text of the SQL statement
. The SQL trace statistics in tabular form
. The number of library cache misses for the parsing and execution of the
statement
. The user initially parsing the statement
. The execution plan generated by EXPLAIN PLAN
125.What is SQL tuning?
Ans.
System designers and application developers must understand Oracle's query
processing mechanism to write effective SQL statements. Tune the SQL statements to
achieve the fastest results.
138.What are the system bottlenecks that affect the server’s performance?
Ans.
i. Memory
ii. Disk I/O and controllers
iii. CPU
iv. Network
141.What is db link?
Ans.
A database link is an object in the local database that allows you to access objects
on a remote database or to mount a secondary database in read-only mode.
142.What is Normalization?
Ans.
Normalization is basic to designing a high-performance system. It is the process
of breaking down all items to their lowest level, making sure that each piece of data can
be uniquely identified and is not duplicated.
143.What is De-normalization?
Ans.
In the real world, a world in which performance may be more important than
abstract perfection, you may find that you need to compromise your commitment to
normalize and be flexible about dealing with real data, for that you may need to embrace
the necessary evil of denormalization.
144.When do de-normalize?
And.
There are number of situations in which you may improve performance by
denormalizing your data. If you find that your application is performing repetitive SQL
table joins and sort/merges on large tables, you may be able to avoid reducing the need
for these operations if you denormalize some part of your database.
151.What is Sql*loader?
Ans.
SQL*Loader moves data from external files into tables in an Oracle database.
SQL*Loader loads data in a variety of formats, performs filtering and loads multiple
tables simultaneously.
SQL*Loader can:
. Load data from multiple datafiles of different file types
. Handle fixed-format, delimited-format, and variable-length records
. Manipulate data fields with SQL functions before inserting the data into
database columns
. Load multiple tables during the same run, loading selected rows into each table
. Load data from disk or tape
. Provide thorough error reporting capabilities, so you can easily adjust and load
all records
154.What is SQL?
Ans.
Structured Query Language (SQL), pronounced "sequel," is the set of commands
that all programs and users must use to access data within the Oracle database.
156.What is Savepoint?
Ans.
To identify a point in a transaction to which you can later roll back.
158.What is PL/sql?
Ans.
PL/SQL (Procedural Language/SQL) is set of procedural capabilities that extend
the power of traditional SQL. PL/sql statements can be combined with traditional SQL in
variety of SQL products to increase the ease of application programming, and
considerably overall system performance.
Block Structure:
Declare
<Local declaration>
Begin
<Statements>
Exception
<Error handler>
End;
159.What is stored procedure and stored function?
Ans. doubt
Procedure: A procedure is a subprogram that performs a specific action. It will not
return value as like function.
160.What is ODBC?
Ans.
Open Database Connectivity.
A standard protocol for accessing Relational Database around sql.
162.What is high water mark and how would you see the HWM value?
Ans.
The high water mark indicates the amount of used space. You cannot release space
below the high water mark (even if there is no data in the space you wish to deallocate).
You can use the DBMS_SPACE package, which contains a procedure
(UNUSED_SPACE) that returns information about the position of the high water mark
and the amount of unused space in a segment.
165.What is VLDB?
Ans.
Very Large Data Base. Databases are very large indeed, with several thousand
users and hundreds of Gigabytes of storage.
166.What is a partition?
Ans.
A table can split in to more than one logical pieces as partitions, to improve the
I/O performance.
168.What is DBVERIFY?
Ans.
DB_VERIFY is an external command-line utility that performs a physical data
structure integrity check on an offline database. It can be used against backup files and
online files. You use DB_VERIFY primarily when you need to insure that a backup
database (or datafile) is valid before it is restored or as a diagnostic aid when you have
encountered data corruption problems.
Score______________________- Comments________________________________
……END…..