Sie sind auf Seite 1von 23

1.

What is an Oracle Instance? Database files are useless without the memory structures and processes to interact with the database. Oracle defines the term instance as the memory structure and the background processes used to access data from a database. An instance has two major memory structures: The System Global Area, also known as the Shared Global Area (SGA) stores information in memory that is shared by the various processes in Oracle. The Program Global Area, also known as the Private Global Area (PGA) contains information that is private to a particular process. The SGA contains, among other things, the database buffer cache that is used to cache information read from the data files, a data dictionary cache used to cache metadata information, and a library cache that caches recently used SQL and PL/SQL statements. The PGA is used to allocate memory for information such as sort space, variables, arrays, and cursor information that is private to each process. The instance also contains numerous background processes that cooperate to fulfill all the various functions needed. Some examples of these processes include the Database Writer, responsible for writing all changes to the database, and the Process Monitor, responsible for cleaning up after failed user processes. ALTERNATE ANSWER: Instance is a combination of memory structure and process structure. Memory structure is SGA and Process structure is background processes. SGA - System or Shared Global Area. Components of SGA:DBBC - Database Buffer Cache SP - Shared Pool. It is further divided into Library Cache (LC) and Data Dictionary Cache (DDC) or Row Cache. RLB Redo Log Buffer Background Process:1. Mandatory Processes a. SMON - System Monitor b. PMON - Process Monitor c. DBWR - Database writer d. LGWR - Log Writer e. CKPT - Check point f. RECO - Recoverer 2. Optional Process:a. ARCN b. RBAC c. MMAN d. MMON e. MMNL

2.

What information is stored in Control File? 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. The database name. The timestamp of database creation. The names and locations of associated datafiles and redo log files. Tablespace information. Datafile offline ranges. The log history Archived log information Backup set and backup piece information. Backup datafile and redo log information. Datafile copy information. The current log sequence number.

3.

When you start an Oracle DB which file is accessed first? In the platform specific default location Oracle database locates your initialization parameter file by examining the file names in the following order:

1. First reads the spfileSID.ora file. E.g. SPFILEORCL.ORA (where SID is ORCL) 2. If this file is not located then it reads the file SPFILE.ORA 3. If SPFILE.ORA is not located then it reads INIT<SID>.ORA E.g. initorcl.ora (where SID is ORCL) 4. What is the Job of SMON, PMON processes? SMON - System monitor process recovers after an instance failure and monitors temporary segments and extents. PMON - Process monitor process cleans up processes and releases locks and resources after an abnormal termination of a process. 5. What is Instance Recovery? When an Oracle instance fails, Oracle performs an instance recovery when the associated database is re-started. Instance recovery occurs in two steps: a. Cache recovery: Changes being made to a database are recorded in the database buffer cache. These changes are also recorded in online redo log files simultaneously. When there are enough data in the database buffer cache, they are written to data files. If an Oracle instance fails before the data in the database buffer cache are written to data files, Oracle uses the data recorded in the online redo log files to recover the lost data when the associated database is re-started. This process is called cache recovery. Transaction recovery: When a transaction modifies data in a database, the before image of the modified data is stored in an undo segment. The data stored in the undo segment is used to restore the original values in case a transaction is rolled back. At the time of an instance failure, the database may have uncommitted transactions. It is possible that changes made by these uncommitted transactions have gotten saved in data files. To maintain read consistency, Oracle rolls back all uncommitted transactions when the associated database is re-started. Oracle uses the undo data stored in undo segments to accomplish this. This process is called transaction recovery.

b.

During an Instance recovery we get only the committed data. We are not able to get the upcommitting data at the time of instance recovery. 6. What is written in Redo Log Files? Log writer (LGWR) writes redo log buffer contents Into Redo Log FIles. Log writer does this every three seconds, when the redo log buffer is 1/3 full and immediately before the Database Writer (DBWn) writes its changed buffers into the datafile. Redo Log Files records all changes made in to the database. 7. How do you control number of datafiles one can have in an Oracle database? When starting an Oracle instance, the database's parameter file indicates the amount of SGA space to reserve for datafile information; the maximum number of datafiles is controlled by the DB_FILES parameter. This limit applies only for the life of the instance 8. How many Maximum datafiles can there be in an Oracle Database? The maximum number of database files can be set with the init parameter db_files. Regardless of the setting of this parameter, the maximum number of datafiles in a smallfile tablespace is 1022. A bigfile tablespace can contain only 1 datafile. 9. What is a tablespace? A tablespace is a logical storage unit within an Oracle database. It is logical because a tablespace is not visible in the file system of the machine on which the database resides.

A tablespace, in turn, consists of at least one datafile which, in turn, are physically located in the file system of the server. A datafile belongs to exactly one tablespace. Each table, index and so on that is stored in an Oracle database belongs to a tablespace. The tablespace builds the bridge between the Oracle database and the filesystem in which the table's or index's data is stored. There are three types of tablespaces in Oracle: a. b. c. Permanent tablespaces Undo tablespaces Temporary tablespaces

A tablespace is created with the create tablespace SQL command. 10. What is the purpose of Redo Log files? The purpose of redo log file is to record all changes made to the data during the recovery of database. It is best practice to have two or more redo log files and stored in a separate disks in order to recover data during a system crash. 11. Which default Database roles are created when you create a Database? connect , resource and dba are three default roles when you create a database. 12. What is a Checkpoint? When a checkpoint occurs, Oracle must update the headers of all datafiles to record the details of the checkpoint. This is done by the CKPT process. The CKPT process does not write blocks to disk; DBWn always performs that work. The statistic DBWR checkpoints displayed by the system_statistics monitor in Enterprise Manager indicates the number of checkpoint requests completed. ALTERNATE ANSWER: A checkpoint performs the following three operations: Every dirty block in the buffer cache is written to the data files. That is, it synchronizes the datablocks in the buffer cache with the datafiles on disk. It's the DBWR that writes all modified database blocks back to the datafiles. The latest SCN is written (updated) into the datafile header. The latest SCN is also written to the controlfiles. The update of the datafile headers and the control files is done by the LGWR (CKPT if CKPT is enabled). 13. Which Process reads data from Datafiles? Server process reads data from Datafiles. 14. Which Process writes data in Datafiles?

DBWn is writing the dirty buffers from db cache to data files. DBWn Process server process read data from datafile and write it to db cache. The Background process DBWR rights data from datafile to DB cache. Server process writes the data block it read from the database to the buffer. DBWR process writes data from buffer to database. 15. Can you make a Datafile auto extendible? If yes, how? Auto extend feature can be used for a datafile. In this, Oracle will automatically increase the size of a datafile whenever space is required. You can specify by how much size the file should increase and Maximum size to which it should extend. To make a existing datafile auto extendable give the following command SQL> alter database datafile /u01/oracle/ica/icatbs01.dbf auto extend ON next 5M maxsize 500M; You can also make a datafile auto extendable while creating a new tablespace itself by giving the following command. SQL> create tablespace ica datafile /u01/oracle/ica/icatbs01.dbf size 50M auto extend ON next 5M maxsize 500M; 16. What is a Shared Pool? Shared pool in Oracle contains cache information that collects, parses, interprets and executes SQL statements that goes against database. This shared pool acts like a buffer for these SQL statements. It stores the SQL statements so that the identical SQL statements do not have to be parsed each time they're executed. In the Shared pool following things are stored: a. b. c. d. e. Optimized query plans Security checks Parsed SQL statements Packages Object information

17. What is kept in the Database Buffer Cache? Database Buffer Cache is the place where data blocks are copied from datafiles to perform SQL operations. Buffer Cache is shared memory structure and it is concurrently accessed by all server processes. 18. How many maximum Redo Logfiles one can have in a Database? Depends on what you specified for MAXLOGFILES during database creation (manually) or what you specified for "Maximum no. of redo log files" with DBCA. You can check the current max with: SQL> select decode (type, 'REDO LOG', 'MAXLOGFILES'), records_total 2 3 from v$controlfile_record_section where type = 'REDO LOG';

DECODE (TYPE RECORDS_TOTAL ----------- -------------

MAXLOGFILES ALTERNATE ANSWER:

16

32 redo log files are maximum in a database. 19. What is difference between PFile and SPFile? A PFILE is a static, client-side text file that must be updated with a standard text editor like "notepad" or "vi". This file normally reside on the server, however, you need a local copy if you want to start Oracle from a remote machine. DBA's commonly refer to this file as the INIT.ORA file. An SPFILE (Server Parameter File), on the other hand, is a persistent server-side binary file that can only be modified with the "ALTER SYSTEM SET" command. This means you no longer need a local copy of the pfile to start the database from a remote machine. Editing an SPFILE will corrupt it, and you will not be able to start your database anymore. The following query when executed will show if the database was started with a PFILE or SPFILE: SQL> SELECT DECODE(value, NULL, 'PFILE', 'SPFILE') "Init File Type" FROM sys.v_$parameter WHERE name = 'spfile'; You can also use the V$SPPARAMETER view to check if you are using a PFILE or not: if the "value" column is NULL for all parameters, you are using a PFILE. SQL> SELECT DECODE(value, NULL, 'PFILE', 'SPFILE') "Init File Type" FROM sys.v$spparameter WHERE name = 'spfile'; 20. What is PGA_AGGREGATE_TARGET parameter? PGA_AGGREGATE_TARGET is an Oracle server parameter that specifies the target aggregate PGA memory available to all server processes attached to the instance. Some of the properties of the PGA_AGGREGATE_TARGET parameter are given below: a. b. c. d. Parameter type: Big integer Syntax: PGA_AGGREGATE_TARGET = integer [K| M| G] Default value: 20% of SGA size or 10MB, whichever is greater Modifiable: ALTER SYSTEM

21. Which types of backups you can take in Oracle? Following are the main types of backup in Oracle a. Whole database: A whole database backup includes all datafiles and at least one control file. Online redo log files are never backed up; restoring backed up redo log files and replacing the current redo log files will result in loss of data during media recovery. Only one of the control files needs to be backed up; all copies of the control file are identical. b. Partial database: A partial database backup includes zero or more tablespaces, which in turn includes zero or more datafiles; a control file is optional in a partial database backup. As you may infer, a partial database backup that includes no tablespaces and does not include the control file backs up zero bytes of data to the backup destination. c. Full: A full backup includes all blocks of every datafile backed up in a whole or partial database backup. d. Incremental: An incremental backup makes a copy of all data blocks that have changed since a previous backup. Oracle 10g supports five levels of incremental backups, from 0 to 4. An incremental backup at level 0 is considered a baseline backup; it is the equivalent of a full backup and contains all data blocks in the datafile(s) that are backed up. Although incremental backups can take less time, the potential downside is that you must first restore the baseline backup and then apply all incremental backups performed since the baseline backup. e. Consistent: A consistent backup, also known as an offline backup, is performed while the database is not open. These backups are consistent because the SCN in the control file matches the SCN in every datafile's header. Although recovering using a consistent backup requires no additional recovery operation after a failure, you reduce your database's availability during a consistent backup as well as risk the loss of committed transactions performed since the consistent backup.

f.

Inconsistent: Although the term inconsistent backup may sound like something you might avoid in a database, it is a way to maintain availability of the database while performing backups. An inconsistent backup, also known as an online backup, is performed while the database is open and available to users. The backup is inconsistent because the SCN in the control file is most likely out of synch with the SCN in the header of the datafiles. Inconsistent backups require recovery when they are used for recovering from a media failure, but keep availability high because the database is open while the backup is performed.

22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39.

A database is running in NOARCHIVELOG mode then which type of backups you can take? Can you take partial backups if the Database is running in NOARCHIVELOG mode? Can you take Online Backups if the database is running in NOARCHIVELOG mode? How do you bring the database in ARCHIVELOG mode from NOARCHIVELOG mode? You cannot shutdown the database for even some minutes, then in which mode you should run the database? Where should you place Archive logfiles, in the same disk where DB is or another disk? Can you take online backup of a Control file if yes, how? What is a Logical Backup? Should you take the backup of Logfiles if the database is running in ARCHIVELOG mode? Why do you take tablespaces in Backup mode? What is the advantage of RMAN utility? How RMAN improves backup time? Can you take Offline backups using RMAN? How do you see information about backups in RMAN? What is a Recovery Catalog? Should you place Recovery Catalog in the Same DB? Can you use RMAN without Recovery catalog? Can you take Image Backups using RMAN?

40. Can you use Backup sets created by RMAN with any other utility?

1. What is an Oracle Instance?

2. What information is stored in Control File?

3. When you start an Oracle DB which file is accessed first?

4. What is the Job of SMON, PMON processes?

5. What is Instance Recovery?

6. What is written in Redo Log Files?

7. How do you control number of Datafiles one can have in an Oracle database?

8. How many Maximum Datafiles can there be in an Oracle Database?

9. What is a Tablespace?

10. What is the purpose of Redo Log files?

11. Which default Database roles are created when you create a Database?

12. What is a Checkpoint?

13. Which Process reads data from Datafiles?

14. Which Process writes data in Datafiles?

15. Can you make a Datafile auto extendible. If yes, how?

16. What is a Shared Pool?

17. What is kept in the Database Buffer Cache?

18. How many maximum Redo Logfiles one can have in a Database?

19. What is difference between PFile and SPFile?

20. What is PGA_AGGREGRATE_TARGET parameter?

21. Large Pool is used for what?

22. What is PCT Increase setting?

23. What is PCTFREE and PCTUSED Setting?

24. What is Row Migration and Row Chaining?

25. What is 01555 - Snapshot Too Old error and how do you avoid it?

26. What is a Locally Managed Tablespace?

27. Can you audit SELECT statements?

28. What does DBMS_FGA package do?

29. What is Cost Based Optimization?

30. How often you should collect statistics for a table?

31. How do you collect statistics for a table, schema and Database?

32. Can you make collection of Statistics for tables automatic?

33. On which columns you should create Indexes?

34. What type of Indexes are available in Oracle?

35. What is B-Tree Index?

36. A table is having few rows, should you create indexes on this table?

37. A Column is having many repeated values which type of index you should create on this column, if you have to?

38. When should you rebuilt indexes?

39. Can you built indexes online?

40. Can you see Execution Plan of a statement.

41. A table is created with the following setting storage (initial 200k next 200k minextents 2 maxextents 100 pctincrease

40) What will be size of 4th extent?

42. What is DB Buffer Cache Advisor?

43. What is STATSPACK tool?

44. Can you change SHARED_POOL_SIZE online?

45. Can you Redefine a table Online?

46. Can you assign Priority to users?

47. You want users to change their passwords every 2 months. How do you enforce this?

48. How do you delete duplicate rows in a table?

49. What is Automatic Management of Segment Space setting?

50. What is the difference between DELETE and TRUNCATE statements?

51. What is COMPRESS and CONSISTENT setting in EXPORT utility?

52. What is the difference between Direct Path and Convention Path loading?

53. Can you disable and enable Primary key?

54. What is an Index Organized Table?

55. What is a Global Index and Local Index?

56. What is the difference between Range Partitioning and Hash Partitioning?

57. What is difference between Multithreaded/Shared Server and Dedicated Server?

58. Can you import objects from Oracle ver. 7.3 to 9i?

59. How do you move tables from one tablespace to another tablespace?

60. How do see how much space is used and free in a tablespace? POSTED BY DATA BASE ADMINSTRATION AT 2:12 AM 0 COMMENTS Interview Question on Oracle DBA with answers Oracle DBA 1. SNAPSHOT is used for[DBA] a] Synonym, b] Table space, c] System server, d] Dynamic datareplication Ans : D 2. We can create SNAPSHOTLOG for[DBA] a] Simple snapshots, b] Complex snapshots, c] Both A & B, d]Neither A nor B Ans : A 3. Transactions per rollback segment is derived from[DBA] a] Db_Block_Buffers, b] Processes, c] Shared_Pool_Size, d] Noneof the above Ans : B 4. ENQUEUE resources parameter information is derived from[DBA] a] Processes or DDL_LOCKS and DML_LOCKS, b] LOG_BUFFER,c] DB__BLOCK_SIZE..Ans : A 5. LGWR process writes information intoa] Database files, b] Control files, c] Redolog files, d] All theabove.Ans : C

6. SET TRANSACTION USE ROLLBACK SEGMENT is used to create userobjectsin a particular Tablespacea] True, b] FalseAns : False 7. Databases overall structure is maintained in a file calleda] Redolog file, b] Data file, c] Control file, d] All of theabove.Ans :C 8. These following parameters are optional in init.ora parameter fileDB_BLOCK_SIZE,PROCESSESa] True, b] FalseAns : False 9. Constraints cannot be exported through EXPORT commanda] True, b] FalseAns : False 10. It is very difficult to grant and manage common privileges needed bydifferent groups ofdatabase users using the rolesa] True, b] FalseAns : False 11. What is difference between a DIALOG WINDOW and a DOCUMENT WINDOWregardingmoving the window with respect to the application windowa] Both windows behave the same way as far as moving the window isconcerned.b] A document window can be moved outside the application window whilea dialogwindow cannot be movedc] A dialog window can be moved outside the application window while adocumentwindow cannot be movedAns : C 12. What is the difference between a MESSAGEBOX and an ALERTa] A messagebox can be used only by the system and cannot be used inuser applicationwhile an alert can be used in user application also.b] A alert can be used only by the system and cannot be use din userapplicationwhile an messagebox can be used in user application also.c] An alert requires an response from the userwhile a messagebox justflashes a messageand only requires an acknowledment from the userd] An message box requires an response from the userwhile a alert justflashes amessage an only requires an acknowledment from the userAns : C 13. Which of the following is not an reason for the fact that most of theprocessing is done at theserver ?a] To reduce network traffic. b] For application sharing, c] Toimplement business rulescentrally, d] None of the aboveAns : D 14. Can a DIALOG WINDOW have scroll bar attached to it ?a] Yes, b] NoAns : B 15. Which of the following is not an advantage of GUI systems ?a] Intuitive and easy to use., b] GUI's can display multipleapplications in multiple windowsc] GUI's provide more user interface objects for a developerd] None of the aboveAns :D 16. What is the difference between a LIST BOX and a COMBO BOX ?a] In the list box, the user is restricted to selecting a value from alist but in a combo boxthe user can type in a value which is not in the listb] A list box is a data entry area while a combo box can be used onlyfor control purposesc] In a combo box, the user is restricted to selecting a value from alist but in a list box theuser can type in a value which is not in the listd] None of the aboveAns : A 17. In a CLIENT/SERVER environment , which of the following would not bedone at the client ?a] User interface part, b] Data validation at entry line, c]Responding to user events,d] None of the aboveAns : D 18. Why is it better to use an INTEGRITY CONSTRAINT to validate data in atable than to use aSTORED PROCEDURE ?a] Because an integrity constraint is automatically checked while datais inserted into orupdated in a table while a stored procedure has to bespecifically invokedb] Because the stored procedure occupies more space in the databasethan a integrityconstraint definitionc] Because a stored procedure creates more network traffic than aintegrity constraintdefinitionAns : A 19. Which of the following is not an advantage of a client/server model ?a] A client/server model allows centralised control of data andcentralised implementationof business rules.b] A client/server model increases developer;s productivityc] A client/server model is suitable for all applicationsd] None of the above.Ans : C 20. What does DLL stands for ?a] Dynamic Language Libraryb] Dynamic Link Libraryc] Dynamic Load Libraryd] None of the aboveAns : B 21. POST-BLOCK trigger is aa] Navigational triggerb] Key triggerc] Transactional triggerd] None of the aboveAns : A 22. The system variable that records the select statement that SQL * FORMSmost recently usedto populate a block isa] SYSTEM.LAST_RECORDb] SYSTEM.CURSOR_RECORDc] SYSTEM.CURSOR_FIELDd] SYSTEM.LAST_QUERYAns: D

23. Which of the following is TRUE for the ENFORCE KEY fielda] ENFORCE KEY field characterstic indicates the source of the valuethat SQL*FORMSuses to populate the fieldb] A field with the ENFORCE KEY characterstic should have the INPUTALLOWEDcharaterstic turned offa] Only 1 is TRUEb] Only 2 is TRUEc] Both 1 and 2 are TRUEd] Both 1 and 2 are FALSEAns : A 24. What is the maximum size of the page ?a] Characters wide & 265 characters lengthb] Characters wide & 265 characters lengthc] Characters wide & 80 characters lengthd] None of the aboveAns : B 25. A FORM is madeup of which of the following objectsa] block, fields only,b] blocks, fields, pages only,c] blocks, fields, pages, triggers and form level procedures,d] Only blocks.Ans : C 26. For the following statements which is true1] Page is an object owned by a form2] Pages are a collection of display information such as constant textand graphics.a] Only 1 is TRUEb] Only 2 is TRUEc] Both 1 & 2 are TRUEd] Both are FALSEAns : B 27. The packaged procedure that makes data in form permanent in theDatabase isa] Postb] Post formc] Commit formd] None of the aboveAns : C 28. Which of the following is TRUE for the SYSTEM VARIABLE $$date$$a] Can be assigned to a global variableb] Can be assigned to any field only during design timec] Can be assigned to any variable or field during run timed] None of the aboveAns : B 29. Which of the following packaged procedure is UNRESTRICTED ?a] CALL_INPUT, b] CLEAR_BLOCK, c] EXECUTE_QUERY, d] USER_EXITAns : D 30. Identify the RESTRICTED packaged procedure from the followinga] USER_EXIT, b] MESSAGE, c] BREAK, d] EXIT_FORMAns : D 31. What is SQL*FORMSa] SQL*FORMS is a 4GL tool for developing & executing Oracle basedinteractiveapplications.b] SQL*FORMS is a 3GL tool for connecting to the Database.c] SQL*FORMS is a reporting toold] None of the above.Ans : A 32. Name the two files that are created when you generate a form usingForms 3.0a] FMB & FMX, b] FMR & FDX, c] INP & FRM, d] None of the aboveAns : C 33. What is a triggera] A piece of logic written in PL/SQLb] Executed at the arrival of a SQL*FORMS eventc] Both A & Bd] None of the aboveAns : C 34. Which of the folowing is TRUE for a ERASE packaged procedure1] ERASE removes an indicated Global variable & releases the memoryassociated with it2] ERASE is used to remove a field from a page1] Only 1 is TRUE2] Only 2 is TRUE3] Both 1 & 2 are TRUE4] Both 1 & 2 are FALSEAns : 1 35. All datafiles related to a Tablespace are removed when the Tablespaceis droppeda] TRUEb] FALSEAns : B 36. Size of Tablespace can be increased bya] Increasing the size of one of the Datafilesb] Adding one or more Datafilesc] Cannot be increasedd] None of the aboveAns : B 37. Multiple Tablespaces can share a single datafilea] TRUEb] FALSEAns : B 38. A set of Dictionary tables are createda] Once for the Entire Databaseb] Every time a user is createdc] Every time a Tablespace is createdd] None of the aboveAns : A 39. Datadictionary can span across multiple Tablespacesa] TRUEb] FALSEAns : B 40. What is a DATABLOCKa] Set of Extentsb] Set of Segmentsc] Smallest Database storage unitd] None of the aboveAns : C 41. Can an Integrity Constraint be enforced on a table if some existingtable data does not satisfythe constrainta] Yesb] NoAns : B 42. A column defined as PRIMARY KEY can have NULL'sa] TRUEb] FALSEAns : B

43. A Transaction endsa] Only when it is Committedb] Only when it is Rolledbackc] When it is Committed or Rolledbackd] None of the aboveAns : C 44. A Database Procedure is stored in the Databasea] In compiled formb] As source codec] Both A & Bd] Not storedAns : C 45. A database trigger doesnot apply to data loaded before the definitionof the triggera] TRUEb] FALSEAns : A 46. Dedicated server configuration isa] One server process - Many user processesb] Many server processes - One user processc] One server process - One user processd] Many server processes - Many user processesAns : C 47. Which of the following does not affect the size of the SGAa] Database bufferb] Redolog bufferc] Stored procedured] Shared poolAns : C 48. What does a COMMIT statement do to a CURSORa] Open the Cursorb] Fetch the Cursorc] Close the Cursord] None of the aboveAns : D 49. Which of the following is TRUE1] Host variables are declared anywhere in the program2] Host variables are declared in the DECLARE sectiona] Only 1 is TRUEb] Only 2 is TRUEc] Both 1 & 2are TRUEd] Both are FALSEAns : B 50. Which of the following is NOT VALID is PL/SQLa] Bool boolean;b] NUM1, NUM2 number;c] deptname dept.dname%type;d] date1 date := sysdateAns : B 51. Declarefvar number := null; svar number := 5Begingoto <<>>if fvar is null then<<>>svar := svar + 5end if;End; What will be the value of svar after the execution ?a] Errorb] 10c] 5d] None of the above Ans : A 52. Which of the following is not correct about an Exception ?a] Raised automatically / Explicitly in response to an ORACLE_ERRORb] An exception will be raised when an error occurs in that blockc] Process terminates after completion of error sequence.d] A Procedure or Sequence of statements may be processed. Ans : C 53. Which of the following is not correct about User_Defined Exceptions ?a] Must be declaredb] Must be raised explicitlyc] Raised automatically in response to an Oracle errord] None of the above Ans : C 54. A Stored Procedure is aa] Sequence of SQL or PL/SQL statements to perform specific functionb] Stored in compiled form in the databasec] Can be called from all client environmetsd] All of the above Ans : D 55. Which of the following statement is falsea] Any procedure can raise an error and return an user message anderror numberb] Error number ranging from 20000 to 20999 are reserved for userdefined messagesc] Oracle checks Uniqueness of User defined errorsd] Raise_Application_error is used for raising an user defined error. Ans : C 56. Is it possible to open a cursor which is in a Package in anotherprocedure ?a] Yesb] No Ans : A 57. Is it possible to use Transactional control statements in DatabaseTriggers ?a] Yesb] No Ans : B

58. Is it possible to Enable or Disable a Database trigger ?a] Yesb] No Ans : A 59. PL/SQL supports datatype(s)a] Scalar datatypeb] Composite datatypec] All of the aboved] None of the above Ans C 60. Find the ODD datatype outa] VARCHAR2b] RECORDc] BOOLEANd] RAW Ans : B 61. Which of the following is not correct about the "TABLE" datatype ?a] Can contain any no of columnsb] Simulates a One-dimensional array of unlimited sizec] Column datatype of any Scalar typed] None of the above Ans : A 62. Find the ODD one out of the followinga] OPENb] CLOSEc] INSERTd] FETCH Ans C 63. Which of the following is not correct about Cursor ?a] Cursor is a named Private SQL areab] Cursor holds temporary resultsc] Cursor is used for retrieving multiple rowsd] SQL uses implicit Cursors to retrieve rows Ans : B 64. Which of the following is NOT VALID in PL/SQL ?a] Select ... intob] Updatec] Created] Delete Ans : C 65. What is the Result of the following 'VIK'NULL'RAM' ?a] Errorb] VIK RAMc] VIKRAMd] NULL Ans : C 66. Declarea number := 5; b number := null; c number := 10;Beginif a > b AND a < c thena := c * a;end if;End;What will be the value of 'a' after execution ?a] 50b] NULLc] 5d] None of the above Ans : C67. Does the Database trigger will fire when the table is TRUNCATED ?a] Yesb] No Ans : B 68. SUBSTR(SQUARE ANS ALWAYS WORK HARD,14,6) will returna] ALWAYb} S ALWAc] ALWAYSAns : C 69. REPLACE('JACK AND JUE','J','BL') will returna] JACK AND BLUEb] BLACK AND JACKc] BLACK AND BLUEd] None of the above Ans : C 70. TRANSLATE('333SQD234','0123456789ABCDPQRST','0123456789') will returna] 333234b] 333333c] 234333d] None of the above Ans : A 71. EMPNO ENAME SALA822 RAMASWAMY 3500A812 NARAYAN 5000A973 UMESH 2850A500 BALAJI 5750 Use these data for the following Questions

Select SAL from EMP E1 where 3 > ( Select count(*) from Emp E2where E1.SAL > E2.SAL ) will retrievea] 3500,5000,2500b] 5000,2850c] 2850,5750d] 5000,5750 Ans : A 72. Is it possible to modify a Datatype of a column when column containsdata ?a] Yesb] No Ans B 73. Which of the following is not correct about a View ?a] To protect some of the columns of a table from other usersb] Ocuupies data storage spacec] To hide complexity of a queryd] To hide complexity of a calculations Ans : B 74. Which is not part of the Data Definiton Language ?a] CREATEb] ALTERc] ALTER SESSION Ans : C 75. The Data Manipulation Language statements area] INSERTb] UPDATEc] SELECTd] All of the above Ans : D 76. EMPNO ENAME SALA822 RAMASWAMY 3500A812 NARAYAN 5000A973 UMESHA500 BALAJI 5750 Using the above dataSelect count(sal) from Emp will retrievea] 1b] 0c] 3d] None of the above Ans : C 77. If an UNIQUE KEY constraint on DATE column is created, will it acceptthe rows that areinserted with SYSDATE ?a] Willb] Won't Ans : B 78. What are the different events in Triggers ?a] Define, Createb] Drop, Commentc] Insert, Update, Deleted] All of the above Ans : C79. What built-in subprogram is used to manipulate images in image items ?a] Zoom_outb] Zoom_in'c] Image_zoomd] Zoom_image Ans : C 80. Can we pass RECORD GROUP between FORMS ?a] Yesb] No Ans : A 81. SHOW_ALERT function returnsa] Booleanb] Numberc] Characterd] None of the above Ans : B 82. What SYSTEM VARIABLE is used to refer DATABASE TIME ?a] $$dbtime$$b] $$time$$c] $$datetime$$d] None of the above Ans : A 83. :SYSTEM.EFFECTIVE.DATE varaible isa] Read onlyb] Read & Writec] Write onlyd] None of the above Ans : C

84. How can you CALL Reports from Forms4.0 ?a] Run_Report built_inb] Call_Report built_inc] Run_Product built_ind] Call_Product built_in Ans : C 85. When do you get a .PLL extension ?a] Save Library fileb] Generate Library filec] Run Library filed] None of the above Ans : A 86. What is built_in Subprogram ?a] Stored procedure & Functionb] Collection of Subprogramc] Collection of Packagesd] None of the above Ans : D 87. GET_BLOCK property is aa] Restricted procedureb] Unrestricted procedurec] Library functiond] None of the above Ans : D 88. A CONTROL BLOCK can sometimes refer to a BASETABLE ?a] TRUEb] FALSE Ans : B 89. What do you mean by CHECK BOX ?a] Two state controlb] One state controlc] Three state controld] none of the above Ans : C - Please check the Correcness of this Answer ( The correct answeris 2 ) 90. List of Values (LOV) supportsa] Single columnb] Multi columnc] Single or Multi columnd] None of the above Ans : C 91. What is Library in Forms 4.0 ?a] Collection of External fieldb] Collection of built_in packagesc] Collection of PL/SQl functions, procedures and packagesd] Collection of PL/SQL procedures & triggers Ans : C 92. Can we use a RESTRICTED packaged procedure in WHEN_TEXT_ITEM trigger ?a] Yesb] No Ans : B 93. Can we use GO_BLOCK package in a PRE_TEXT_ITEM trigger ?a] Yesb] No Ans : B 94. What type of file is used for porting Forms 4.5 applications to variousplatforms ?a] .FMB fileb] .FMX filec] .FMT filed] .EXE file Ans : C 95. What built_in procedure is used to get IMAGES in Forms 4.5 ?a] READ_IMAGE_FILEb] GET_IMAGE_FILEc] READ_FILEd] GET_FILE Ans A 96. When a form is invoked with CALL_FORM does Oracle forms issuesSAVEPOINT ?a] Yesb] No Ans : A

97. Can we attach the same LOV to different fields in Design time ?a] Yesb] No Ans : A 98. How do you pass values from one form to another form ?a] LOVb] Parametersc] Local variablesd] None of the above Ans : B 99. Can you copy the PROGRAM UNIT into an Object group ?a] Yesb] No Ans : B 100. Can MULTIPLE DOCUMENT INTERFACE (MDI) be used in Forms 4.5 ?a] Yesb] No Ans : A 101. When is a .FMB file extension is created in Forms 4.5 ?a] Generating formb] Executing formc] Save formd] Run form Ans : C 102. What is a Built_in subprogram ?a] Libraryb] Stored procedure & Functionc] Collection of Subprogramsd] None of the above Ans : D 103. What is a RADIO GROUP ?a] Mutually exclusiveb] Select more than one columnc] Above all TRUEd] Above all FALSE Ans : A 104. Identify the Odd one of the following statements ?a] Poplistb] Tlistc] List of valuesd] Combo box Ans : C 105. What is an ALERT ?a] Modeless windowb] Modal windowc] Both are TRUEd] None of the above Ans : B 106. Can an Alert message be changed at runtime ?a] Yesb] No Ans : A 107. Can we create an LOV without an RECORD GROUP ?a} Yesb] No Ans : B 108. How many no of columns can a RECORD GROUP have ?a] 10b] 20c] 50d] None of the above Ans D 109. Oracle precompiler translates the EMBEDDED SQL statemens intoa] Oracle FORMSb] Oracle REPORTSc] Oracle LIBRARYd] None of the above Ans : D 110. Kind of COMMENT statements placed within SQL statements ?a] Asterisk(*) in column ?b] ANSI SQL style statements(...)c] C-Style comments (/*......*/)d] All the above

Ans : D 111. What is the appropriate destination type to send the output to aprinter ?a] Screenb] Previewerc] Either of the aboved] None of the above Ans : D 112. What is TERM ?a] TERM is the terminal definition file that describes the terminalfrom which you areusing R20RUN ( Reports run time )b] TERM is the terminal definition file that describes the terminalfrom which you areusing R20DES ( Reports designer )c] There is no Parameter called TERM in Reports 2.0d] None of the above Ans : A 113. If the maximum records retrieved property of a query is set to 10,then a summary value willbe calculateda] Only for 10 recordsb] For all the records retrievedc] For all therecords in the referenced tabled] None of the above Ans : A 114. With which function of a summary item in the COMPUTE AT optionrequired ?a] Sumb] Standard deviationc] Varianced] % of Total function Ans : D 115. For a field in a repeating frame, can the source come from a columnwhich does not exist inthe datagroup which forms the base of the frame ?a] Yesb] No Ans : A 116. What are the different file extensions that are created by OracleReports ?a] .RDF file & .RPX fileb] .RDX file & .RDF filec] .REP file & .RDF filed] None of the above Ans : C 117. Is it possible to Disable the Parameter form while running the report?a] Yesb] No Ans : A 118.What are the SQL clauses supported in the link property sheet ?a] WHERE & START WITHb] WHERE & HAVINGc} START WITH & HAVINGd] WHERE, START WITH & HAVING Ans : D 119. What are the types of Calculated columns available ?a] Summary, Place holder & Procedure columnb] Summary, Procedure & Formula columnsc] Procedure, Formula & Place holder columnsd] Summary, Formula & Place holder columns Ans.: D 120. If two groups are not linked in the data model editor, what is thehierarchy between them?a] There is no hierarchy between unlinked groupsb] The group that is right ranks higher than the group that is to theleftc] The group that is above or leftmost ranks higher than the groupthat is to right or belowitd] None of the above Ans : C 121. Sequence of events takes place while starting a Database isa] Database opened, File mounted, Instance startedb] Instance started, Database mounted & Database openedc] Database opened, Instance started & file mountedd] Files mounted, Instance started & Database opened

Ans : B 122. SYSTEM TABLESPACE can be made off-linea] Yesb] No Ans : B 123. ENQUEUE_RESOURCES parameter information is derived froma] PROCESS or DDL_LOCKS & DML_LOCKSb] LOG BUFFERc] DB_BLOCK_SIZEd] DB_BLOCK_BUFFERS Ans : A 124. SMON process is used to write into LOG filesa] TRUEb] FALSE Ans : B 125. EXP command is useda] To take Backup of the Oracle Databaseb] To import data from the exported dump filec] To create Rollback segmentsd] None of the above Ans : A 126. SNAPSHOTS cannot be refreshed automaticallya] TRUEb] FALSEAns : B127. The User can set Archive file name formatsa] TRUEb] FALSE Ans : A 128. The following parameters are optional in init.ora parameter fileDB_BLOCK_SIZE,PROCESSa} TRUEb] FALSE Ans : B129. NOARCHIEVELOG parameter is used to enable the database in Archievemodea] TRUEb] FALSE Ans : B 130. Constraints cannot be exported through Export command?a] TRUEb] FALSE Ans : B 131. It is very difficult to grant and manage common priveleges needed bydifferent groups ofdatabase users using rolesa] TRUEb] FALSE Ans : B 132. The status of the Rollback segment DBA_FREE_SPACESd] DBA_ROLLBACK_SEG Ans : D 133. Explicitly we can assign transaction to a rollback segmenta] TRUEB] FALSE Ans : A 134. What file is read by ODBC to load drivers ?a] ODBC.INIb] ODBC.DLLc] ODBCDRV.INId] None of the above Ans : A> POSTED BY DATA BASE ADMINSTRATION AT 2:08 AM 0 COMMENTS Robert G Freeman - Oracle Consultant on DBA can be viewed througha] DBA_SEGMENTSb] DBA_ROLESc]

Robert G. Freeman, Oracle consultant and the author of several books, including "Portable DBA: Oracle" and "Oracle Database 10g New Features," knows a bit about the highs and lows of being an Oracle DBA. At next month's IOUG Live! 2005 conference, Freeman will share some of what he has learned in his 17 years with those of you who are new to the role, or considering it, and SearchOracle.com got a preview.

Let's say someone wants to be a DBA. Where do you tell that person to begin? RGF: This can be a tough field to get into. Since DBAs tend to be responsible for a critical company asset -- data -- they tend to prefer those with some degree of experience. However, on the other side of the coin, there is a certain demand curve that seems to outstrip the experience supply. That being the case, there is some opportunity for the junior DBA. Typically, even the junior DBA will already have some IT experience, either as a developer or as a system administrator. So, for the truly new person, finding such a position is a place to get your foot in the door. If you are already at a company that uses Oracle, then it's time to start looking for opportunity within your company. For example, if you know your company is going to have a big Oracle-related development project gearing up, it's time to put your hat in the ring to work on it. Educating yourself is always a good start too. User events, like my university session at IOUG-A for beginning DBAs, other educational classes (such as those offered by Burleson Consulting) and reading will all help you as you search for that Oracle DBA job.

What is the minimum background needed before companies will even consider someone for a DBA role?

RGF: For a new hire, if you don't have two years of previous DBA experience, then it's going to be difficult. Typically, a minimum of five years of IT experience, in addition, is going to be preferred as well. For the newer DBA, OCP certification is a must if you want to be able to sell yourself in spite of lack of experience. Years ago, I knew of at least two DBA contractors who were hired with no Oracle work experience, little overall IT experience, who graduated with an IT degree and got their OCPs. I don't think you will see that in this day and age. Something else to consider is that many companies already have experienced DBAs on staff, so they may be looking for a junior type, at a lower salary, to do things like basic monitoring and so on. Often these companies will try to hire from within too. This is the kind of opportunity that a DBA want-to-be needs to be on the look out for. While the short-term salary benefits might not be great, the experience you will gain will eventually give you an opportunity for the salaries that experienced DBAs can demand.

Is certification worthwhile for new DBAs?

ABOUT THE SPEAKER Robert G. Freeman has over 17 years of Oracle DBA experience. He currently is an independent contractor, and works with Burleson Consulting on a number of different projects.

He is the author of several Oracle Press titles including "Portable DBA: Oracle," "Oracle Database 10g New Features," "Oracle9i RMAN Backup and Recovery" and "Oracle9i New Features." Robert lives in the Chicago area with his wife, five kids and a predatory cat named Clifford who sees invisible prey everywhere. RGF: I think it can't hurt, and it's a good exercise. There are those who think it's pointless, and just a memorization exercise. In the end, it does force you to gather some information about Oracle, and you do learn something. It's no substitute for experience, but it's better than nothing.

What's the best way to learn about administering Oracle databases?

RGF: The best ways to learn how to administer Oracle databases are: Find a mentor who knows Oracle and who knows how to mentor. I had a great mentor when I first started working with Oracle and it makes all the difference in the world. Training is helpful, but I'd suggest you sit down with Oracle and use if for a while (create a few tables, a few users, and learn basic SQL) before you actually go to training. Read, read, read. Load up on books. Join Oracle related forums and news groups and read them daily. Forums like http://www.dba-oracle.com/, http://www.quest-pipelines.com/, Oracle-L and LazyDBA all will provide insight and education on a daily basis. User group meetings, like IOUG-A, are invaluable to the learning process. It is in these environments that you can learn from a large number of people, on a large number of topics. In addition, you have the University sessions, such as the one I'm doing for the beginning DBA, that can be most helpful in learning about Oracle. Finally, don't believe everything you hear or read, in fact, don't believe anything you hear. Oracle is about few absolutes. Every system is different, and there are many different ways of doing things. Do not build yourself a box of ideas that can never change, because that does not make for the best of DBA's. There are some best practices, and standards, that are somewhat absolute, but for the most part, it's all fluid and situation-dependent. Is it possible to learn on-the-job DBA tasks without being on-the-job?RGF: It is possible to learn on-the-job DBA tasks, but the real question is can you retain what you have learned without having the opportunity to practice it? The job is key because a lot of what the DBA does is on-his-feet thinking and responses to out-of-the-ordinary problems. There are numerous technologies and varying complexities. This is hard experience to acquire in a strictly learning environment.

What are the first few questions new DBAs have when sitting down with Oracle for the first time?

RGF: That depends on if they have any experience with databases at all. If not, then the first question is, where do I start? Things like using SQL, and SQL*Plus are of prime interest because until you can actually talk to the database, there isn't much to do. If it's a developer who may have done SQL coding, and had some SQL*Plus experience, then the questions are more of the order of, "How do I do the task I've been asked to do?". Then it's a discussion of how to create a user, a table, a discussion on grants and privileges, and some base information to get them started. When it's an experienced DBA, the first questions generally are something like, "What's the Oracle account password, what's the SYS password, and where is the bathroom and the Coke machine?". That's the difference between beginners and experienced DBAs. Experienced DBA's have time to go to the bathroom and the Coke machine. What are the most common mistakes beginners make?RGF: Believing that there is a single answer to a given question. While there are standards that one should always use, more often than not, the answer to a given question is, it depends. Another common mistake is thinking you know everything after a while. Just when you think you know everything is the exact moment when you actually should realize that you don't know anything. Always rethink your way of looking at things, and check your reality against the thinking of other professionals in the field. Always ask yourself if you are being closed-minded about things. A DBA is paid to think, in my opinion, and that requires an open mind.

What should the top five priorities be for new DBAs on the job?

RGF:

Be on fire. You have to want to learn everything, do everything, consume everything. So you got the DBA job, now is not the time to rest in your new chair and enjoy your success. List out your goals and what you want to learn. A five year plan is a great idea.

Listen! Ask Questions! Be involved! Don't just sit back waiting for the create table requests. When it comes to theory, don't believe anything you hear or read until you have tried it yourself. Database rule number one, in my opinion, is that no rule of thumb applies all the time. If you are solely responsible for a database, make darned sure, before you leave your job on day one, that your database can be recovered. Nothing else matters if you can't get that database back.

Document everything. And, a baker's half-dozen... Learn to use your voice of authority. You are the DBA, and this database is your responsibility. As you learn the right way, and the wrong way to do things (like, say, database design), you need to be an advocate for best practices and for good design. If you succeed, you can enjoy the rapture of success. If they don't listen, you will get the joy of "I told you so."