You are on page 1of 16

Oracle And Distributed Databases Ch-1

1. A _______________ is a collection of all object that user has created. (a) Data (b) Attribute (c) Index (d) Schema 2. Which of the Oracle Authentication Mechanism is used to management of the password for the account?_________________ . (a) Database Authentication (b) Network Authentication (c) Operating System Authentication (d) Protocol Authentication 3. A _____________ is the set of predefined resource parameters that can be used to Monitor and control various database resources. (a) Profile (b) Username (c) Password (d) Monitor 4. PL/SQL is a _____________ structured language. 5. _____________ has made PL/SQL code run faster without requiring any additional work on the part of the programmer. 6. A line in PL/SQL text contains group of characters known as ___________________ . 7. There are two kinds of numeric literals can be used in arithmetic expressions of PL/SQL they are _____________ and _________________ . 8. _______________ literals are the predefined values TRUE and FALSE and the non- value NULL. 9. The ___________________ specifies whether the PL/SQL block is a procedure, a function or a package. 10.PL/SQL iterative control statements, a _______________ repeats a sequence of statements. 11.The _______________ loop enables you to evaluate a condition before a sequence of statements would be executed.

12.The ____________ loop will allow us to execute a block of code repeatedly until some condition occurs. 13.There are ________________ different types of Error conditions (Exceptions) in PL/SQL. 14. ____________ statement acts like CALL statement in High Level Language (HLL). 15.PL/SQL is a ______________ extension of Oracle/SQL. 16.Schema is a collection of ______________ . (a)Objects (b)Database (c)Data (d)Tablespace 17.State True or False:(i) When a user account is created in an Oracle Database. Oracle allows the user to own the objects.[ _________ ] (ii)Database Administrator can create only one user in the database.[ __________ ] (iii)Oracle supports only Operating System Authentication mechanism.[ __________ ] 18.Managing users is the simple process of ______________, __________ or __________ user. 19.Oracle support authentication mechanisms _________________ and _______________. 20.Database security is divided into areas __________________ and _________________ . 21. Delimiter represents ________________ operation such as ______________ and ______________ . 22.State True or False: (i)The While Loop enables to execute a condition before a sequence of statements would be executed.[_________]

23.A PL/SQL is a _________________ language. (a)Block Structured (c)Structured (b) Programming (d) none of these

24. ____________ allows you to directly interact with the database. (a)PL/SQL (b) SQL (c)Both a & b (d)none of these

25. A _______________ is a simple or compound symbol that has a special meaning to PL/SQL. (a) comments (b)literals (c ) delimiter (d) block

26.____________ literal is a sequence of zero or more characters enclosed by single quotes. (a) comments (b)literals (c ) string (d) delimiter

27. Single line comment begins with _____ anywhere in a line. (a)/* (b) -(c ) -* (d) //*

28. We can use char datatype to store _________________ character. (a)variable length (b) fixed length (c)both a & b (d) none of these 29. The ___________ loop will allow us to executes a block of code repeatedly with some condition occurs. (a)while (b) if (c ) for (d) none of these

30. There are different types of error condition in PL/SQL, they are_________________ and ____________________ . 31. State True or False: (i)PL/SQL provides while-loop, one type for-loop and continuous loops. [____________] (ii) All type of loops is used to execute a sequence of statements multiple times. [____________] (iii) EXIT and EXIT WHEN statements enable you to escape out of the control of a loop. [ ___________]

32. The ____________ statement allows you to change the flow of control within a PL/SQL block. (a) EXIT (b) GOTO (c) EXIT WHEN (d) none of these

33. State TRUE or FALSE: (i) Oracle is more sophisticated RDBMS(Relational Database Management System) and allows a great deal of flexibility in its configuration and operation. [__________] (ii) PL/SQL is a procedural extension of Oracle-SQL. [___________] (iii)In Oracle password are not case sensitive. [___________] (iv)Each username in the databases has a profile associated to it. [___________] 34. What are the predefined resource parameters that are used to monitor and control various database resources from the following? [___________] (i) Concurrent connections to the database (ii) Maximum failed login attempts before the account is locked. (iii)Elapsed time connected. (iv) Continuous ideally time connected.

(v) CPU time used. (vi)Disk reads performed. (vii) How often a password needs to be changed. (a) i, ii and vi (b) i, ii, iii, v, vi (c ) all of the above (d) none of these

35.Match the following:(1)Database Authentication (a) includes monitoring and assigning users permission to various object of the database. (2)Data Security (b)The management of the password for the account can be handled outside of Oracle such as operating system. (3)Operating System Authentication (4)System Security (c) the DBA creates an user account in the databases for user who need access. (d) covers the user login process.

36.The DBA or user can use the __________________ command to change the password. 37. The user can change the password using SQL*Plus PASSWORD command______________ . (a)SQL>password
Changing password for user Old password-----------------New password---------------Retype new password------Password changed SQL>

(b)SQL>password
Changing password for user Old password-----------------Retype password---------------Password changed

(c) SQL>password
Changing password for user Old password-----------------New password---------------Retype new password------SQL>Password changed

(d) SQL>password
Old password-----------------New password---------------SQL>Password changed

38. State TRUE or FALSE:(i)In PL/SQL SQL statements can be used to manipulate ORACLE data and flow-of-control statements to process the data.[__________] (ii) Procedures, Functions and Anonymous block are the basic unit that make up a PL/SQL programs. [___________] (iii) A block( or sub-block) is a group of logically related declarations and statements.[_______] (iv)PL/SQL is case sensitive.[_________] (v)In SQL you can manipulate objects(DDL) and data(DML) with SQL.[___________] 39.PL/SQL supports two kind of comment styles _______________ and ________________. 40.______________ are used to assign values to the variables that are given in the ________ statement. 41. A _____________ has no internal components.

42.PL/SQL provides a variety of predefined _______________ and composite ______________. (a) function, procedure (b) procedure, scalar (c) datatype, scalar (d) scalar, datatype

43.A _____________ has internal components that can be manipulated individually. 44.In PL/SQL ______________ datatype store fixed or floating point numbers of virtually any size. 45.A PL/SQL has optional _________________ section, a part containing PL/SQL statements and an optional ________________ part. (a) block, exception-handling (b) declare, block (c) variable, declare (d) declare, exceptionhandling 46.Variable and constant are declared as ___________ . (a) <variable name>[constant]<datatype>[not null][:=<expression>]; (b) < constant >[ variable name]< expression >[not null][:=< datatype >]; (c) [<variable name><constant>]<:=<expression>>[not null][ datatype]; (d) none of these. 47.Match the following:(a)Delimiters (b)Identifiers (c)Literals (d)Reserve Words (1)Special syntactic meaning to PL/SQL and so cannot be redefined. (2)an explicit numeric, characters string of Boolean value not represented by a number. (3)A simple or compound symbol that has a special meaning to PL/SQL. (4)name PL/SQL program objects and units. 48.The ____________ name is unidentified identifier , not the name of any PL/SQL variable. 49.Values to assign a variable can be retrieved from the database using a _____________ statement. (a)PL/SQL (b)Select (c)GOTO (d) none of these

50.____________________ is raised when a select statement returns zero. 51.____________________ is raised when attempted to divide by zero.

52._______________ is raised when there is either a datatype mismatch or if the size is smaller than required size. 53._________________is raised when illegal cursor operation was attempted. 54.____________________ is raised when attempted open a cursor that was previously opened. 55.Match the following:1) 2) 3) 4) 5) I. II. III. IV. V. TOO_MANY_ROWS INVALID_NUMBER PROGRAM_ERROR STORAGE_ERROR DUP_VAL_ON_INDEX raised if PL/SQL encounters an internal problem. raised when attempted to insert or update a duplicate into a column that has a unique index. raised when a select statement returns more than one rows. raised when conversion of number to a character string failed. raised if PL/SQL runs out of memory or if memory is corrupted. (a) 1-iii,2-iv,3-i,4-v,5-ii (b) 1-iv,2-i,3-iii,4-v,5-ii (c) 1-i,2-iii,3-iv,4-v,5-ii (d) 1-iii,2-iv,3-ii,4-v,5-i

56. TRUE or FALSE:RAISE statement is executed, its stops the normal processing of PL/SQL block of code and control passes to an error handler block of the code at the end of the PL/SQL program block. [_________]

PL/SQL Functions, Procedures And Packages Ch-2


1. PL/SQL specifies _____________ and ______________ be grouped into packages. 2. State True or False: (i)Oracle 9i offers several predefined packages such as input/output routines, file handling, job scheduling etc. [___________] (ii)PL/SQL offers a mechanism to process query results in a tuple-oriented way.[_________] 3. In PL/SQL, Function can be called by using__________________________. 4. In PL/SQL, Procedure declaration resembles a function declaration except that there is no ____________________. 5.___________ can be used to define code that is executed/fired when certain actions or events occur. 6.____________ is used to recreate if trigger already exists. 7.___________ are PL/SQL constructs that enable you to process, one row at a time, the results of a multi row query. 8. There are two types of cursor, viz. ___________ cursor and ____________cursor. 9. The data that is stored in the cursor is called the ___________________. 10. Opening a cursor _____________ the query and identifies the active set that contains all the rows, which meet the query search criteria. 11. In the explicit cursor attributes of PL/SQL , ______________ evaluates to TRUE, when last fetch succeeded. 12. A _______________ is a database object that groups logically related PL/SQL, types, objects and subprograms. 13. In PL/QSL, the package specification contains _______________ declarations. 14. The package body implements the package _________________. 15.Which of the following is the correct syntax of PL/SQL Functions __________ .

(a)DECLARE name[(argument list)]RETURN datatype{IS,AS} Variable Declarations; BEGIN Program Code [EXCEPTION error handling code] END; (b) DECLARE name[(argument list)]RETURN datatype{IS,AS} Program Code [EXCEPTION error handling code] BEGIN Variable Declarations; END; (c) FUNCTION name[(argument list)]RETURN datatype{IS,AS} Variable Declarations; BEGIN Program Code [EXCEPTION error handling code] END; (d)None of these. 16.State True or False: (i)The declaration of procedures is almost identical to that of function. [__________] (ii) Procedure declaration do not have datatypes. [____________] (iii) PL/SQL code gets executed when the trigger fires. [___________] (iv) PL/SQL allows user to name private work areas and access the stored information.[_________]

17.A ___________ basically is a pointer to a query request and is used to read attribute values of selected tuples into variables. (a) procedure (b) trigger (c) cursor (d) function 18. ______________ cursor are declared and used by the user to process multiple row, returned by select statement. (a) implicit (b) explicit (c) both a & b (d) none 19. The set of rows returned by a query is called the _______________ . 20. The data that is stored in the cursor is called __________________. 21. Match the following:(a) a cursor executes the query and identifies the active set that contains all the rows, which meet the query search criteria. (ii) Opening (b) makes active set undefined. (iii) Closing (c) a cursor enables you to define the cursor and name it. 22.___________ statement retrieves the records from the databases and places it in the cursor (private SQL area). 23. Which from the following points are not true for fetch statement? [_________] (i) The fetch statement retrieves the rows from the active data set one row at a time. (ii) The fetch statement is used usually in the conjunction with the iterative process (looping statement). (iii) In iterative process the cursor advances to the next row in the active set each time the fetch command is executed. 24. _____________evaluates to TRUE if the last fetch is failed i.e.no more rows are left. 25. ____________evaluates to TRUE, if the cursor is opened, otherwise evaluates to FALSE. 26. _____________returns the number of rows fetched. 27.State TRUE or FALSE:(i)Package usually has two parts, a specification and body part.[_________] (ii) The specification is the interface to your application, it declares the types, variables, constant, exceptions, cursors and subprograms available for use.[_________] (iii) The body fully defines cursors and subprograms.[__________] 28.Unlike subprograms, packages cannot be called ____________________ or ___________. 29.Packages are created interactively with SQL*Plus using the _____________________ and _________________________ command. 30._______________ is used, to reference the types, objects and subprograms declared within a package specification. (i) Declaring

31.State TRUE or FALSE:(i)The package body can also contain private declarations, which define types and objects necessary for the internal workings of the package.[___________] (ii) Package specification-the scope of these declaration is local to your databases schema and global to the package.[___________] (iii) Package body-the scope of theses declaration is local to the package body.[___________]

Oracle Architecture Ch-3


1. A database is a centralized repository of ____________________ data. 2. The Oracle server consist of _______________________ and ________________ components. 3. Oracle 9i database product is made up of which of the following components? [_____________] (a) The Oracle Server (b) The Oracle Instance (c) The Oracle Database (d) All of these 4. Oracle 9i database product is made up of _____________ main components. 5. The ___________________________consists of physical files and memory components. 6. The ___________________________consists of the memory components of oracle and various background processes. 7. The memory components of the oracle database 9i are also known as the ___________________ ____________. 8. The instance and its components are configured using a file known as the ________________file. 9. In Oracle 9i there are two types of initialization files namely______________________ and ________________________. 10. State TRUE or FALSE:(i)The instance is associated to only a single database at any time.[____________] (ii)The parameter files hold parameters that can set sizes of various buffers and pools of the SGA.[___________] (iii)The contents of the redo log buffer are essential for instance recovery purposes.[________] (iv)Blocks that need to be modified, are modified in the memory and are written back to the disk periodically.[____________] (v)The contents of the database buffer cache are shared by multiple user processes.[_________] (vi) The large pool is an optional pool.[____________] (vii)The library cache also hold frequently accessed PL/SQL blocks.[___________] 11.Oracle instance is made up of the ___________________________and the__________________ processes. 12. SGA is made up of____________. (i)Redo Buffer Log (ii)The Database Buffer Cache (iii)The Shared Pool (iv)The Java Pool (v)The Large Pool (vi)The Streams Pool (a) i, iii, v, vi (b) i, ii, iii, iv (c) i, ii, iii, iv, v, vi (d)none of the above 13. __________________________is a circular buffer that stores all changes made in the database.

14. The size of Redo Log Buffer is determined by the ______________________initialization parameters. 15. Redo Log Buffer contains are transferred periodically from memory to online redo log files on disk by the ____________________background processes. 16. The ____________________________is an area in the memory that holds all the blocks read in the form of disk for query or modification. 17. Modified blocks that have yet been written to disk are known as_______________________. 18. The contents of database buffer cache are written to datafiles on the disk by the _________________________. 19. The size of the default database buffer cache is sized by the _____________________initialization parameter. 20. Two specific caches___________________________and____________________________form the shared pool. 21.The size of Large Pool memory area is determined by the ________________________initialization parameter. 22.Java Pool size is determined by the _________________________initialization parameter. 23.Match the following:(i)Streams Pool (ii)Library Cache (iii)Java Pool (iv)Data Dictionary Cache (v)Oracle Server (vi)Oracle Database (A)This is the database management system that is able to store, manage and manipulate data. (B)This memory area is used by the oracle streams product for its function. (C)This memory area is used by all sessions-specific java code and data within the Java Virtual Machine(JVM). (D)This is the centralized repository where the data is stored. (E)It is responsible for storing and reusing frequently used SQL statements. (F) Sometimes referred to as a Row Cache. 24. Data Dictionary Cache consist of block that holds data dictionary information read in form of __________________. 25. Reads that are made out to data dictionary information in the datafiles are also called _______________________. 26. Data Dictionary Cache is also managed using the______________________________ Algorithm, which is on a first-in-first-out basis. 27.In SGA, the contents of the memory area shared by multiple user is called as_________________.

28. The background processes of the Oracle instance are responsible for performing ______________________I/O functions. 29. The PGA is used to process __________________________and to hold logon and other session information. 30. The parameter that needs to be configured for automatic shared memory management is the ________________________ initialization parameter. 31. Write the acronyms of the following abbreviations:(a)DBWR-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ . (b)LGWR-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ . (c)CKPT-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ . (d)SMON-_ _ _ _ __ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ . (e)PMON-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ . (f)The above all are five mandatory_______________________ processes in Oracle 9i. 32. In _________processes, a user trying to access dat in the database need to make a connection with database using an appropriate tool such as____________________ and________________________ database interface tool. 33. State TRUE or FALSE:i. Server processes are created in Oracle to handle request made by the user processes.[_____] ii. Server processes are always started at server side.[________] iii. The dedicated server mode has disadvantages in OLTP environment, where there are many user accessing the database, hence large no. of server process. iv. In shared server mode environment a pool of shared server processes satisfy the required of the user processes.[__________] v. Shared Server mode a one-to-one ratio is maintained between user and server processes. [__________] vi. Shared server do not maintain a ratio 1:1as in dedicated server mode.[__________] 34. The server process communicates with the oracle server using the___________________________ ___________________. 35. In Oracle instance can operate in modes __________________________and__________________________. 36. ____________________________________ is a memory that is associated with a server process. 37. Which of the following statements is/are True about PGA:________________________. i. PGA contains data and control information held by a single server process or background process. ii. PGA is created when a user process is created and released when the user process is terminated. iii. PGA memory area is not shared by server process. iv. The contents of PGA vary in dedicated and shared server environments. v. The contents of PGA include: Private SQL area, Session memory and SQL work area.

(a) ii, iii, iv, v (b)i, ii, iv (c)ii, iv, v (d) all of the above 38. ____________________contain the data dictionary and user created data. 39. The __________________keeps the record of the names, size and locations different physical file of the database. 40._______________________entries can be used to recover the database in the event of an instance failure. 41.______________________is used to hold the name of privileged users who have been granted the SYSDBA and SYSOPER roles. 42.___________________________contains bind information and runtime memory structures. 43. Which of the following statements are TRUE for Oracle Database:__________________. i. The Oracle Database has a physical and a logical structure. ii. The physical structure of the database is made up of the operating system files that comprises the database. iii. All the data of the database is stored in the physical files. (a) i, ii (b) ii, iii (c ) i, iii (d)i , ii, iii 44. Starting up a database should be done by a ___________________________user. 45. During a proper shutdown of Oracle, three phases ____________________________to the startup are performed in the reverse order. 46. The end of the transaction is recorded in the ___________________________ files. 47.Oracle 9i products provides transparent application scalability by sharing ___________________ caches for co-ordinated data access. 48. Oracle 9i is available in ______________________editions, each of which is suitable for different development and deployment scenarios.

You might also like