Re: Oracle,D2K interview question

From: rasale <member34440_at_dbforums.com>
Date: Tue, 29 Jul 2003 08:18:14 +0000
Message-ID: <3159602.1059466694_at_dbforums.com>


Important Questions in Oracle, Developer /2000(Form 4.5 and Reports 2.5)

Oracle

  1. What are the Back ground processes in Oracle and what are they.
  2. This is one of the most frequently asked question. There are basically 9 Processes but in a general system we need to mention the first five background processes. They do the house keeping activities for the Oracle and are common in any system. The various background processes in oracle are
  3. Data Base Writer(DBWR) :: Data Base Writer Writes Modified blocks from Database buffer cache to Data Files. This is required since the data is not written whenever a transaction is committed. b)LogWriter(LGWR) :: LogWriter writes the redo log entries to disk. Redo Log data is generated in redo log buffer of SGA. As transaction commits and log buffer fills, LGWR writes log entries into a online redo log file.
  4. System Monitor(SMON) :: The System Monitor performs instance recovery at instance startup.This is useful for recovery from system failure d)Process Monitor(PMON) :: The Process Monitor performs process recovery when user Process fails. Pmon Clears and Frees resources that process were using.
  5. CheckPoint (CKPT) :: At Specified times, all modified database buffers in SGA are written to data files by DBWR at Checkpoints and Updating all data files and control files of database to indicate the most recent checkpoint f)Archieves(ARCH) :: The Archiver copies online redo log files to archival storage when they are busy.
  6. Recoveror(RECO) :: The Recoveror is used to resolve the distributed transaction in network
  7. Dispatcher (Dnnn) :: The Dispatcher is useful in Multi Threaded Architecture
  8. Lckn :: We can have upto 10 lock processes for inter instance locking in parallel sql.
  9. How many types of SQL Statements are there in Oracle
  10. There are basically 6 types of sql statements.They are
  11. Data Definition Language(DDL) :: The DDL statements define and maintain objects and drop objects.
  12. Data Manipulation Language(DML) :: The DML statements manipulate database data.
  13. Transaction Control Statements :: Manage change by DML
  14. Session Control :: Used to control the properties of current session enabling and disabling roles and changing .e.g. :: Alter statements, Set Role
  15. System Control Statements :: Change Properties of Oracle Instance .e.g.:: Alter System
  16. Embedded SQL :: Incorporate DDL,DML and T.C.S in Programming Language. E.g.: Using the SQL Statements in languages such as 'C', Open, Fetch, execute and close
  17. What is a Transaction in Oracle?
  18. A transaction is a logical unit of work that compromises one or more SQL Statements executed by a single User. According to ANSI, a transaction begins with first executable statement and ends when it is explicitly committed or rolled back.
  19. Key Words Used in Oracle
  20. The Key words that are used in Oracle are:
  21. Committing: A transaction is said to be committed when the transaction makes permanent changes resulting from the SQL statements.
  22. Rollback: A transaction that retracts any of the changes resulting from SQL statements in Transaction.
  23. SavePoint :: For long transactions that contain many SQL statements, intermediate markers or savepoints are declared. Savepoints can be used to divide a transaction into smaller points.
  24. Rolling Forward: Process of applying redo log during recovery is called rolling forward.
  25. Cursor: A cursor is a handle (name or a pointer) for the memory associated with a specific statement. A cursor is basically an area allocated by Oracle for executing the SQL Statement. Oracle uses an implicit cursor statement for Single row query and Uses Explicit cursor for a multi row query.
  26. System Global Area (SGA): The SGA is a shared memory region allocated by the Oracle that contains Data and control information for one Oracle Instance. It consists of Database Buffer Cache and Redo log Buffer.
  27. Program Global Area (PGA): The PGA is a memory buffer that contains data and control information for server process.
  28. Database Buffer Cache: Database Buffer of SGA stores the most recently used blocks of database data. The set of database buffers in an instance is called Database Buffer Cache.
  29. Redo log Buffer: Redo log Buffer of SGA stores all the redo log entries.
  30. Redo Log Files: Redo log files are set of files that protect altered database data in memory that has not been written to Data Files. They are basically used for backup when a database crashes.
  31. Process: A Process is a 'thread of control' or mechanism in Operating System that executes series of steps.
  32. What are procedures ,functions and Packages ?
  33. Procedures and functions consist of set of PL/SQL statements that are grouped together as a unit to solve a specific problem or perform set of related tasks. Procedures do not Return values while Functions return one value Packages :: Packages Provide a method of encapsulating and storing related procedures, functions, variables and other Package Contents
  34. What are Database Triggers and Stored Procedures ?
  35. Database Triggers :: Database Triggers are Procedures that are automatically executed as a result of insert in, update to, or delete from table. Database triggers have the values old and new to denote the old value in the table before it is deleted and the new indicated the new value that will be used. DT are useful for implementing complex business rules which cannot be enforced using the integrity rules. We can have the trigger as Before trigger or After Trigger and at Statement or Row level. e.g.:: operations insert, update ,delete 3 before ,after 3*2 A total of 6 combinations At statement level(once for the trigger) or row level( for every execution ) 6 * 2 A total of 12. Thus a total of 12 combinations are there and the restriction of usage of 12 triggers has been lifted from Oracle 7.3 Onwards. Stored Procedures :: Stored Procedures are Procedures that are stored in compiled form in the database. The advantage of using the stored procedures is that many users can use the same procedure in compiled and ready to use format.
  36. How many Integrity Rules are there and what are they
  37. There are Three Integrity Rules. They are as follows ::
  38. Entity Integrity Rule :: The Entity Integrity Rule enforces that the Primary key cannot be Null
  39. Foreign Key Integrity Rule :: The FKIR denotes that the relationship between the foreign key and the primary key has to be enforced. When there is data in Child Tables the Master tables cannot be deleted.
  40. Business Integrity Rules :: The Third Integrity rule is about the complex business processes which cannot be implemented by the above 2 rules.
  41. What are the Various Master and Detail Relation ships.
  42. The various Master and Detail Relationship are
  43. NonIsolated :: The Master cannot be deleted when a child is existing.
  44. Isolated :: The Master can be deleted when the child is existing
  45. Cascading :: The child gets deleted when the Master is deleted.
  46. What are the Various Block Coordination Properties
  47. The various Block Coordination Properties are
  48. Immediate Default Setting. The Detail records are shown when the Master Record are shown.
  49. Deffered with Auto Query Oracle Forms defer fetching the detail records until the operator navigates to the detail block.
  50. Deffered with No Auto Query The operator must navigate to the detail block and explicitly execute a query
  51. What are the Different Optimization Techniques
  52. The Various Optimization techniques are
  53. Execute Plan :: we can see the plan of the query and change it accordingly based on the indexes
  54. Optimizer_hint :: set_item_property('DeptBlock',OPTIMIZER_HINT,'FIRST_ROWS'); Select /*+ First_Rows */ Deptno,Dname,Loc,Rowid from dept where (Deptno > 25)
  55. Optimize_Sql :: By setting the Optimize_Sql = No, Oracle Forms assigns a single cursor for all SQL statements. This slow downs the processing because for everytime the SQL must be parsed whenever they are executed. f45run module = my_firstform userid = scott/tiger optimize_sql = No
  56. Optimize_Tp :: By setting the Optimize_Tp= No, Oracle Forms assigns seperate cursor only for each query SELECT statement. All other SQL statements reuse the cursor. f45run module = my_firstform userid = scott/tiger optimize_Tp = No
  57. How do u implement the If statement in the Select Statement
  58. We can implement the if statement in the select statement by using the Decode statement. e.g. select DECODE (EMP_CAT,'1','First','2','Second'Null); Here the Null is the else statement where null is done .

12)How many types of Exceptions are there 12) There are 2 types of exceptions. They are a) System Exceptions
e.g. When no_data_found, When too_many_rows, Dup_Val_on_index,

     Value_Error,Others
b) User Defined Exceptions
e.g. My_exception exception
When My_exception then

  1. What are the inline and the precompiler directives
  2. The inline and precompiler directives detect the values directly
  3. How do you use the same lov for 2 columns
  4. We can use the same lov for 2 columns by passing the return values in global values and using the global values in the code
  5. How many minimum groups are required for a matrix report
  6. The minimum number of groups in matrix report are 4
  7. What is the difference between static and dynamic lov
--
Posted via http://dbforums.com
Received on Tue Jul 29 2003 - 10:18:14 CEST

Original text of this message