4.DB2f - ans

download 4.DB2f - ans

of 9

Transcript of 4.DB2f - ans

  • 7/31/2019 4.DB2f - ans

    1/9

    1) A storage group has capability to (choose 2)a) store different databasesb) combine volumes from different devicesc) assign frequently accessed objects to fast devicesd) store db2 catalog

    2) The default database name isa) DSNDB02b) DSNDB03c) DSNDB04d) DSNDB01

    3) A index space is created using CREATE INDEXSPACE command before creating the index T/F4) A temporary table is created with the following command

    a) DECLARE GLOBAL TABLEb) DECLARE TEMPORARY TABLEc) DECLARE GLOBAL TEMPORARY TABLEd) None

    5) In the RATE table, if the following data is foundRATE-CAT RATE-PER-HOUR

    A 150

    B -100

    D NULL

    E 20

    And if the command

    SELECT MIN(RATE-PER-HOUR) from RATE-CAT, then the value selected would be

    a) NULLb) 20c) Noned) 100

    (ans: -100)

    6) The use of VALUE function in select would be toa) Substitiue a value for any nulls and not nulls returned by a columnb) substitue a value for any nulls returned by a columnc) Substitue a value for any not nulls returned by a column based on the condition setd) None

  • 7/31/2019 4.DB2f - ans

    2/9

    7) Buffer pools are the areas of Main storage to improve performance of the database bya) avoiding the wait associated with disk I/Ob) increasing the virtual storagec) decreasing the virtual storaged) avoiding the temporary store pages for tablespace and index

    8) The following are reatled to logical database design (choose 2)a) Creating databases, table space,tables etc.b) Normalizationc) Data modelingd) None

    9) The below defintion of COBOL variables for VARCHAR is correct TRUE / FALSE10 REMARKS.

    49 REMARKS-LEN PIC S9(4) USAGE COMP-3.49 REMARKS-TEXT PIC X(1920).

    (ans: FALSE)

    10)Every attribute in the entity should depend only on the key columns and not on other non-keyattributes. This explains about

    a) 1 NFb) 2 NFc) 3 NFd) 4 NF

    11)Entity integrity requires specification ofa) Primary key and Foreign keyb) Only Primary keyc) Primary key and Unquie constraintsd) Foreign key and Unquie constraints

    12)The parameter to indicate the percentage of each page to be left as free space when the tablespace is loaded or reorganized.

    a) FREEPAGEb) PCTFREEc) PAGEPCTd) PAGEFREE

  • 7/31/2019 4.DB2f - ans

    3/9

    13)When the DB2 field returns value to the host variable and if truncation happens due to insufficientlength definition of the host variable, the null indicator will hold a,

    a) 0b) Negative valuec) Positive valued) None

    14)The size of the null indicator variable isa) Full word compb) Full word comp-3c) Half word compd) Half word comp-3

    15)If null value returned by the select statement and no indicator variables are mentioned in the select,then,

    a) the program will abnormally endb) The SQL stmt will fail with RC= -305c) The SQL stmt will go through successfullyd) None

    16)Consider the following scenario withTable field: EMP-LAST-NAME VarChar(10),

    Host variables:

    01 HV-LAST-NAME.

    05 HV-LAST-NAME-TXT X(10).

    05 HV-LEN S9(4) COMP.

    EMP-LAST-NAME = CHRISTINA

    After moving to the host variable, HV-LAST NAME = CHRISTINA

    EMP-LAST-NAME = BOB

    After moving to the host variable, HV-LAST NAME = BOBISTINA

    The above improper data move can be rectified by

    a) By moving length to HV-LEN variableb) By initializing the HV-LAST-NAME-TXT variablec) By using reference modifiers with EMP-LAST-NAMEd) None

    17)Partioned table space containsa) More than one table data in a partitionb) More than one table data across segment

  • 7/31/2019 4.DB2f - ans

    4/9

    c) Only one table data across partitiond) Only one table data in a segment

    18)LOCK size can be specified at (choose 3)a) Database levelb) Tablespace levelc) Table leveld) Page level

    19)If the number of locks in one level exceeds the installation default, then DB2 locks a larger unit. Thisis called,

    a) Lock durationb) Lock escalationc) Lock suspensiond) Lock Release

    20)To acquire lock during Plan allocation the bind option will bea) ACQUIRE(ALLOCATE)b) ACQUIRE(USE)c) ACQUIRE(PLAN)d) ACQUIRE(ALLOC)

    21)The isolation level that do not allow read access to other transactions when the page is locked forupdate

    (choose 2)

    a) RRb) RSc) CSd) UR

    22)The DCLGEN member created through DB2I will contain information on,a) Table indexb) Storage variables for host languagec) Location identifierd) Index structure

    23)The SQLWARN3 of SQLCA will contain W whena) If a string was truncated when moving to host variableb) If number of columns and host variables do not matchc) If null values were excludedd) If the problem with date value inserted to the table

    24)The expansion of DCLGEN and replacment of SQL statements wi th host language equivalent calls isdone by

    a) Compilation

  • 7/31/2019 4.DB2f - ans

    5/9

    b) Precompilationc) Bindd) Linkdit

    25)The Bind task to come up with run time instructions for the SQL in DBRM is done bya) Runtime supervisorb) Optimizerc) Customizerd) None

    26)Multiple DBRMs can be bound to a Package and the poitners to the package will be included in thePlan True/ False

    27)When the DBRMs are bound to a PLAN (choose 2),a) Multiple Isolation levels are possibleb) Only one Isolation level is possiblec) Multiple release options are possbiled) Only one release option is possbile

    28)When binding the package to a plan with the following command, identify the collection idBIND PLAN(F6418PBP) -

    OWNER(F6418DB) QUALIFIER(F6418DB) -

    PKLIST(F6418.F6418ACR)

    a) F6418b) F6418ACRc) F6418PBPd) none

    29)The Package is stored ina) DB2 Catalogb) DB2 Directoryc) DB2 DBRM libraryd) PLAN_TABLE

    30)When the consistency token doesnt match between the COBOL and the PLAN, the followingSQLCODE will be given

    a) -181b) -803c) -805d) -811

    31)The message text for DSNTIAR can be declared with the maximum length ofa) 230b) 250c) 240d) 220

  • 7/31/2019 4.DB2f - ans

    6/9

    32)WHENEVER SQLWARNING will transfer the control to the paragraph coded when thea) SQLCODE isVeb) SQLCODE is +Ve inlcuding +100c) SQLCODE is +Ve but not +100d) SQLCODE isVe inlcuding +100

    33)When RollBack is executed the unit of work will be rolled back,a) to the begining of the transaction which has a commit statementb) to the previous commitc) both a & bd) none

    34)With following cursor definition,DECLARE CURSOR

    SELECT C1,C2,C3,C4,C5 from TB-ORDERS

    FOR UPDATE OF C2,C4

    a) The updates can be done on columns C1, C3, C5b) The updates can be done on columns C2, C4c) The updates can be done for all the columnsd) None

    35)The cusor can be kept open after the commit by specifying ont of the following optiona) WITH clauseb) WITH COMMIT clausec) WITH UPDATE claused) None

    36)The following clause allows to update the latest record fetched in the DB2 cursora) WHERE CURRENT OFb) WHERE CURRENT OF UPDATEc) WHERE CURRENT OF d) None

    37)The value saved in the null indicator variable when the data returned from the table is not null,a) -1b) -2c) 0d) +1

    38)In which of the following Table space type , only one tables data can be stored in the table space, a) Pagedb) Segmentedc) Partitionedd) Splitted

    39)In a Partitioned table space, when the number of page level locks exceeds, the lock is escalated toa) Table lock

  • 7/31/2019 4.DB2f - ans

    7/9

    b) Tablespace lockc) Partition lockd) Segment lock

    40)The greatest level of data concurrency is provided by which isolation level,a) Repeatable Readb) Read stabilityc) Cursor Stabilityd) UR

    41)Which of the table lock acquired on the modify type processing with Isolation level(CS) andLocksize(TABLE)

    a) Xb) IXc) Sd) IS

    42)The option that will make DB2 to execute queries in parallel engines isa) DEGREE(multiple)b) DEGREE(any)c) DEGREE(>1)d) DEGREE(+1)

    43)To monitor the access path for SQL statment and save the same to the PLAN_TABLE, the bind optionis,

    a) EXPLAIN(NO)b) EXPLAIN(YES)c)

    EXPLAIN(ACCESS)

    d) EXPLAIN(PLAN)44)The utility that will give a report on all table spaces with tables tied together by referential integrity,

    a) REPAIRb) CHECKc) REPORTd) REPORT RECOVERY

    45)The purpose of Quiesce utility is toa) To take image copy of the tablesb) To rebuild indexc) To record a point of consistency for recoveryd) To recover data from the image copy

    46)When migrating from one version of DB2 to another, the structure of DB2 catalog will be alteredusing the utility

    a) CATMAINTb) MODIFYc) RUNSTATS

  • 7/31/2019 4.DB2f - ans

    8/9

    d) ALTERCAT

    47)Consider Employee & Project tables,EMPLOYE_ID EMPLOYE_NAME EMPLOYE_PROJ

    E002 NAPOLEANBONAPARTE D001

    E003 HARSHA VARDHANA ------

    E004 SELUKUS NICKATOR D002

    E005 MERCY ------

    EMPLOYE_ID EMPLOYE_PROJ

    E002 D001

    E004 D002

    SELECT EMPLOYE_ID FROM TB_EMPLOYEE A

    WHERE NOT EXISTS (SELECT PROJEMP_EMP_ID

    FROM TB_PROJEMP WHERE PROJEMP_EMP_ID = A.EMPLOYE_ID )

    The number of records that will be retrieved by the above qurey are,

    a) 0b) 2c) 4d) 6

    48)Consider Employee & Project tables of the previous question,SELECT EMPLOYE_ID FROM TB_EMPLOYEE

    WHERE EMPLOYE_ID > ALL

    (SELECT PROJEMP_EMP_IDFROM TB_PROJEMP);

    The EMPLOYE_ID that will be retrieved for the above qurey is

    a) E005b) E003c) E004, E005d) None

    49)Which type of index organization will store pointers to the physical location of the index data,a) CLUSTERb) NON-CLUSTERc)

    MEMBER CLUSTERd) MEMBER NON-CLUSTER

    50)The access path can be determined by the DB2 optimizer based on certain indexes, if the index usedis dropped, (choose 2)

    a) PLAN will be rebound implicitlyb) The Optimizer will find another access pathc) PLAN will not be rebound

  • 7/31/2019 4.DB2f - ans

    9/9

    d) The Optimizer will not find another access path