You are on page 1of 213

1) Which of the following products is required to be installed in

order to BuIld an application on AIX, which will access a


DB2 UDB for OS/390 database?
A) DB2 Connect Personal Edition
B) DB2 Universal Database Workgroup Edition
C) DB2 Personal Developer 's Edition
D) DB2 Universal Developer 's Edition

2) Which of the following tools can be used to catalog a


database?
A) Journal
B) Alert Center
C) License Center
D) Client Configuration Assistant

3) Which of the following would you run utilities to order


data and reclaim sPace from deleted rows in a table :
A) reorg
B) db2look
C) db2move
D) runstats

4) The purpose of the use privilege is to :


A) query data in a table.
B) load data into a table.
C) create tables within a table space.
D) create table spaces within a database.

5) Which two of the following authorities can create a


database?
A) dbadm
B) sysadm
C) Dbctrl
D) Sysctrl
E) sysmaint

6) Cataloging a remote database is :


A) Performed on a PC or Unix machine to identify the server
the DB2 data
� 鐞 � is on base.
B) Performed on a PC or Unix machine to identify the DB2
database to use
Rs and applications.
C) Never performed in DB2, as only one database per node
is allowed, so Cataloging a node automatically catalogs the
database at that node.
D) Performed on a PC or Unix machine to open the catalogs
in the DB2 datAbase and present a user with a list of all
accessible tables in that databas
E.

7) J. create the doubtful :


Create distinct type kph as Michael with comparisons
Create distinct type mph as Michael with comparisons
Create table speed_limits
(route_num Smallint,
Canada_sl kph secret Null,
Us_sl mph secret Null)
Which of the following is a valid query?
A) select route_num from speed_limits where canada_sl ";
80
B) select route_num from speed_limits where canada_sl ";
Kph
C) select route_num from speed_limits where canada_sl ";
Us_sl
D) select route_num from speed_limits where canada_sl ";
Kph (80)

If, for a given table, the Control


Center does not show the choice GeneratE DDL, which of
the following describes the reason?
A) The table is a system object.
B) The table is a summary table.
C) The table is in load pending.
D) The table is a replicated table.
E) The table was created by a different user.

9) J. the tables :
Country
ID name person cities
1 Argentina 1 10
2 Canada 2 20
3 Cuba 2 10
4 Germany 1 0
7 5 5 France

Staff
ID LastName
1 Jones
2 Smith

Which of the following statements removes the rows from


the table country
That have persons in the table? staff
A) delete from country where id in (select id from staff)
B) delete from country where id in (select person from 653-
667)
C) delete from country where person in (select id from
staff)
D) delete from country where person in (select person from
653-667)

10) The table has the following column definitions stock :


� Mr. (1)
Status Char (1)
� Michael
Price Dec (7,2)

Items are indicated to be out of stock by setting status to


null and quantity
And employing
To zero. Which of the following statements updates the
table to indicat/indihome.htm> stock
E that all
The items except for those with type of "s" are affiliation
out of stock?
A) update stock set status= 'null' quantity=0, price=0
where type ">; 's'

B) update stock set (status, quantity, price) = (Null, 0, 0)


where type "
"; 's'
C) update stock set (status, quantity, price) = ( 'Null', 0, 0)
where type
">; 's'
D) update stock set status = null, set quantity=0, set price
= 0 where ty
Pe ">; 's'

11) Which of the following products can be used to store


image data in a DB2 Database?
A) Net.Data
B) Net Search
C) DB2 Avi Extenders
D) DB2 XML Extenders
E) DB2 Text Extenders

12) Which of the following cannot have an autocommit


setting?
A) Embedded SQL
B) The Command Center
C) The Command Line Processor
D) The DB2 Call Level Interface

13) Which of the following statements eliminates all but one


of each set of dUplicate rows in the final result table?
A) select * from t1 UN
B) select distinct * from t1
C) select * from distinct T1
D) Select Que (*) from t1
E) select distinct (*) from t1

14) J. the table :


Staff
ID LastName
1 Jones
2 Smith
3 "null>;
Which of the following statements removes all rows from
the table where there Is a null value for LASTNAME?
A) delete from staff where lastname is null
B) delete from staff where lastname is null Souls
C) delete from staff where lastname = 'null'
D) delete from staff where lastname = Souls' null '

15) J. the following table definitions :


English
Deptno Char (3)
Deptname Char (30)
Mgrno Michael
Admrdept Char (3)
Employee
Empno Michael
Firstname Char (30)
Mr. midinit
Lastname Char (30)
Workdept Char (3)
Which of the following statements will list every employee
's number and last Name with The employee number and
last name of their � 鐞 �, including employees withoUt a
Manager?
A) select e.empno, e.lastname, m.empno, I m.lastname
from employee e left iNner join on mgrno meaning inner
join employee m = = m.empno on e.workdept
Deptno
B) select e.empno, e.lastname, m.empno, m.lastname,
from employee e left
Outer join meaning inner join employee on mgrno m =
m.empno on e.workdept
= deptno
C) select e.empno, e.lastname, m.empno, m.lastname from
employee e right
Outer join meaning inner join employee on mgrno m =
m.empno on e.workdept
= deptno
D) select e.empno, e.lastname, m.empno, m.lastname from
employee e right
Inner join on mgrno meaning inner join employee m =
m.empno on e.workdept
= deptno

16) J. the following tables :


Names
Name Number
Wayne Gretzky 99
Jaromir Jagr 68
Bobby Orr 4
Bobby Hull 23
Brett Hull 16
Mario Lemieux 66
Steve Yzerman 19
Claude Lemieux 19
Mark Messier 11
Mats Sundin 13

Points
Name Points
Wayne Gretzky 244
Jaromir Jagr 168
Bobby Orr 129
Bobby Hull 93
Brett Hull 121
Mario Lemieux 189

PIM
Name PIM
Mats Sundin 14
Bobby Orr 12
Mark Messier 32
Brett Hull 66
Mario Lemieux 23
Joe Sakic 94
Which of the following statements will display the player 's
Names, numbers, p
Oints and
PIM for all players with an entry in all three tables?
A) select names.name, names.number, points.points,
pim.pim from names InnER join points inner join on
names.name=points.name pim on pim.name=names.namE

B) select names.name, names.number, points.points,


pim.pim from names Link innER join points pim on
names.name=points.name outer join on
pim.name=names.namE
C) select names.name, names.number, points.points,
pim.pim from names LEFT on outer join points pim
names.name=points.name left outer join on pim.name
=names.name
D) select names.name, names.number, points.points,
pim.pim from names rigHT outer join points
names.name=points.name right on outer join on
pim.naMe=names.name

17) J. the tables :


Employee
Emp_num emp_name dept
1 Adams 1
2 Jones 1
3 Smith 2
4 Williams 1

Dept
Dept_id dept_name
1 Planning
1 Support
And the statement :
Alter table employee
Add unit key (dept) references (dept_id)
On delete Cascade

How many units of work will be needed to process this


statement :
Delete from dept where dept_id=1
A) 0
B) 1
C) 2
D) 3
E) 4
F) 6

1 J. the requirements to store names, employee numbers,


and when the empLoyees were hired, which of the following
DB2 data types cannot be used to coNtain the day the
employee was hired?
A) Clob
B) Time
C) varchar
D) timestamp

19) J. the transaction :


"create table t1 (id INTEGER,CONSTRAINT chkid check
(id<100))"
"insert into t1 values (100)"
"commit"
Which of the following results from the transaction?
A) The row is inserted with a null value
B) The row is inserted with a value of 100
C) The row insertion with a value of 100 is rejected
D) The turnout called chkid is fired to validate the data

20) If a table is defined with a check constraint for one or


more columns, which of the following will perform the data
validation after the table is loadEd with the load utility.
A) Reorg
B) Check
C) Runstats
D) Image Copy
E) Data Integrity

21) J. the statement :


Create view v1 as select cl from t1 where c1= 'a'
With check option Which of the following SQL statements
will insert data into the table?
a) INSERT INTO v1 VALUES (a)
b) INSERT INTO v1 VALUES (b)
c) INSERT INTO v1 VALUES ('b')
d) INSERT INTO v1 VALUES ('a')
e) INSERT INTO v1 VALUES ('ab')
22) An update lock gets released by an application using
the repeatable read isolation level during which of the
following?
a) If the cursor accessing the row is closed.
b) If the transaction issues a ROLLBACK statement.
c) If the cursor accessing the row is moved to the next
row.
d) If the transaction changes are made via an UPDATE
statement.

23) Which of the following isolation levels is most likely to


acquire a table level lock during an index scan?
a) Read Stability
b) Repeatable Read
c) Cursor Stability
d) Uncommitted Read

24) Which of the following releases a lock by an application


using the cursor stability isolation level?
a) If the cursor accessing the row is moved to the next
row
b) If the cursor accessing the row is used to update the
row
c) If the application's current row is deleted by the
application
d) If the application's current row needs to be updated
by another applic
ation

25) Which of the following processes is NOT performed by


DB2 Warehouse Manager?
a) Query
b) Loading
c) Extraction
d) Transformation

26) Which of the following DB2 components allows


reference to Oracle and DB2
databases in a single query?
a) DB2 Query Patroller
b) DB2 Warehouse Manager
c) DB2 Relational Connect
d) DB2 Connect Enterprise Edition

27) Given the table:


STAFF
ID LASTNAME
1 Jones
2 Smith
When issuing the query SELECT * FROM staff, the row
return order will be based on which of the following?
a) An ambiguous order
b) The primary key order
c) The order that the rows were inserted into the table
d) The values for the ID column, then the LASTNAME
column

2 How many indexes will be created by the following


statement?
Create table mytab
(Col1 int not null primary key,
Col2 char(64),
Col3 char(32),
Col4 int not null,
constraint c4 unique (Col4,Col1))
a) 0
b) 1
c) 2
d) 3
e) 4

29) Given the tables:


COUNTRY
ID NAME PERSON CITIES
1 Argentina 1 10
2 Canada 2 20
3 Cuba 2 10
4 Germany 1 0
5 France 7 5

STAFF
ID LASTNAME
1 Jones
2 Smith
The statement:
INSERT INTO staff SELECT person, 'Greyson' FROM country
WHERE person >; 1
will insert how many rows into the STAFF table?
a) 0
b) 1
c) 2
d) 3

30) Given the following table definition and SQL


statements:
CREATE TABLE table1 (col1 INT, col2 CHAR(40), col3 INT)
GRANT INSERT, UPDATE, SELECT, REFERENCES ON TABLE
table1 TO USER usera

Which of the following SQL statements will revoke privileges


for user USERA on COL1 and COL2?
a) REVOKE UPDATE ON TABLE table1 FROM USER
usera
b) REVOKE ALL PRIVILEGES ON TABLE table1 FROM
USER usera
c) REVOKE ALL PRIVILEGES ON TABLE table1
COLUMNS (col1, col2) FROM USERA
d) REVOKE REFERENCES ON TABLE table1 COLUMNS
(col1, col2) FROM USER usera

31) Given, CREATE TABLE t1 (c1 CHAR(4) NOT NULL).


Which of the following can be inserted into this table?
a) 4
b) NULL
c) ‘abc’
d) ‘abcde’

32) A declared temporary table is used for which of the


following purposes:
a) backup purposes
b) storing intermediate results
c) staging area for the load utility
d) sharing result sets between applications

33) Which of the following delete rules will not allow a row
to be deleted from the parent table if a row with the
corresponding key value still exists in the child table?
a) DELETE
b) CASCADE
c) RESTRICT
d) SET NULL

34) Which of the following processing can occur for a unit of


work using an isolation level of Uncommitted Read and
scanning through the table more than once within the unit
of work?
a) Access uncommitted changes made by other
processes
b) Update uncommitted changes made by other
processes
c) Update rows of a return set and have those updates
changed by other proces
ses from one scan to the next
d) Update rows of a return set and have those updates
committed by other proc
esses from one scan to the next
35) Which of the following database authorities is required
to add a new package?
a) BINDADD
b) CREATETAB
c) CREATEPKG
d) PACKAGEADD

36) Given the successfully executed embedded SQL:


INSERT INTO staff VALUES (1, 'Colbert','Dorchester', 1)
COMMIT
INSERT INTO staff VALUES (6, 'Anders', 'Cary', 6)
INSERT INTO staff VALUES (3, 'Gaylord', 'Geneva',5)
ROLLBACK WORK

Which of the following indicates the number of new rows


that would be in the STAFF table?
a) 0
b) 1
c) 2
d) 3

37) Given the two table definitions:

ORG
deptnumb INTEGER
deptname CHAR(30)
manager INTEGER
division CHAR(30)
location CHAR(30)

STAFF
id INTEGER
name CHAR(30)
dept INTEGER
job CHAR(30)
years CHAR(30)
salary DECIMAL(10,2)
comm DECIMAL(10,2)

Which of the following statements will display each


department, alphabetically by name,and the name of the
manager of the department?
a) SELECT a.deptname, b.name FROM org a, staff b
WHERE a.manager=b.id
b) SELECT a.deptname, b.name FROM org a, staff b
WHERE b.manager=a.id
c) SELECT a.deptname, b.name FROM org a, staff b
WHERE a.manager=b.id GROUP BY a.deptname, b.name
d) SELECT a.deptname, b.name FROM org a, staff b,
WHERE b.manager=a.id GROUP BY a.deptname, b.name

3 Which of the following DDL statements creates a table


where employee ids are unique?
a) CREATE TABLE t1 (employid INTEGER)
b) CREATE TABLE t1 (employid UNIQUE INTEGER)
c) CREATE TABLE t1 (employid INTEGER NOT NULL)
d) CREATE TABLE t1 (employid INTEGER NOT NULL,
primary key (employid))
39) A client application on OS/390 must access a DB2
server on Unix, Windows or OS/2. At a minimum, which of
the following is required to be the DB2 server machine?
a) DB2 Connect Enterprise Edition
b) DB2 Universal Database Enterprise Edition
c) DB2 Connect and DB2 Universal Database
Workgroup Edition
d) DB2 Connect and DB2 Universal Database
Enterprise Edition

40) Given the statements and operations:


"CREATE TABLE t1 (c1 CHAR(1))"
Six rows are inserted with values of: a, b, c, d, e and f
"SET CONSTRAINTS FOR t1 OFF"
"ALTER TABLE t1 ADD CONSTRAINT con1 CHECK (c1 ='a')"
"SET CONSTRAINTS FOR t1 IMMEDIATE CHECKED FOR
EXCEPTION IN t1 USE t1exp"

Which of the following describes what happens to the rows


with values of b, c, d, e and f?
a) deleted from T1 only
b) deleted from T1 and written into the t1exp file
c) deleted from T1 and inserted into the table t1exp
d) deleted from T1 and written into the db2diag.log file

e) deleted from T1 and inserted into the table


syscat.checks

41) Given the requirement of providing a read-only


database, applications accessing the database should be
run with which of the following isolation levels to allow for
the most read concurrency?
a) Read stability
b) Repeatable read
c) Cursor stability
d) Uncommitted read

(1/55) Which of the following products must be installed to


provide a single Point of control for Local and remote DB2
databases?
(Select the correct response)
A. DB2 Runtime Client
B. DB2 Administration Client
C. DB2 Connect Enterprise Edition
D. DB2 Enterprise-Extended 511-525

(2/55) Which of the following tools maintains a history of all


executed stateMents/commands for the current session within
the tool?
(Select the correct response)
A. Journal
B. SQL Assist
C. DB2 Alert Center
D. DB2 Command Center

(3/55) Which of the following DB2 CLP options specify the file
that contains
The doubtful to be executed?
(Select the correct response)
A. -f
B. -b
C. -o
D. -w

(4/55) Which of the following will rebuild a package in the


database from the Existing catalog Information?
(Select the correct response)
A. Bind
B. Rebind
C. Update
D. Counterpart

(5/55) Which two of the following types of storage management


method is suppo Rted by DB2 OLAP Server?
(Select all that apply)
A. Scrap
B. Network
C. Relational
D. Hierarchical
E. Multi-dimensional
(6/55) Which of the following DB2 components can limit the 68-
98 consumptiOn of queries?
(Select the correct response)
A. DB2 Connect
B. DB2 Query Patroller
C. DB2 Performance Monitor
D. DB2 Net Search Extender

(7/55) How many DB2 Administration Server (Das) Value can be


set up per phYsical machine? (Select the correct response)
A. 0
B. 1
C. One for each instance on the physical machine
D. One for each database on the physical machine

(8/55) Which of the following must be set up to allow the Control


Center to vIew database objects? (Select the correct response)
A. ODBC
B. Java
C. DB2 Administration Server
D. Client Configuration Assistant

(9/55) Which of the following privileges is necessary to populate


the table wIth large amounts of Data?
(Select the correct response)
A. Load
B. Alter
C. Update
D. Import

(10/55) a table called employee has columns : name, meaning,


and phone_numbEr. Which Of the following can restrict access to
the phone_number column?
(Select the correct response)
A. Using a view to access the table
B. Using an index on the column
C. Using a referential constraint on the table
D. Using a table check constraint on the table
E. Revoking access from the phone_number column

(11/55) Which of the following is the best way to restrict user


access to as Ubset of columns in a Table?
(Select the correct response)
A. Only grant access to the columns within a table that a user is
alloweD to see.
B. Create a view that only includes the columns a user is allowed
to see
. Grant the user access
To the view, not the base table.
C. Create two tables : one with the columns that a user is
allowed to see
, and one that has the
Specifying columns, and use a join when all data must be
presented.
D. Create two tables : one with the columns that a user is
allowed to see
, and one that has the
Specifying columns, and use a union when all data must be
presented.

(12/55) Which of the following is the most appropriate reason to


consider revOking the select
Charges on the catalog tables from appliqu after creating a
database?
(Select the correct response)
A. To prevent users from creating tables without proper
authority.
B. Some system catalogs record user data in some columns, and
this data
May be confidential.
C. To prevent users from viewing passwords for other DB2
userids that DB
Two stores in the
Catalog tables.
D. Some catalog tables are large, so preventing users from
viewing them
Is a good way to keep users from submitting queries against the
long-running
Catalogs.

(13/55) When manually establishing communications from a


Windows NT thRough a DB2 Connect gateway to DB2 UDB for
OS/390, which of the following is merely required
To catalog?
(Select the correct response)
A. The 瀹 ㈡ 埗.
B. The DRDA databases on the server.
C. The Database Connection Service database.
D. The node where the DB2 Connect Gateway is.

(14/55) Which of the following can be used to determine the


views that are afFected by a drop Table statement?
(Select the correct response)
A. DB2 Script Center
B. DB2 Performance Monitor
C. DB2 Control Center, Show Related
D. DB2 Control Center, sampling Contents

(15/55) Using the Control Center Create Table dialog box, which
of the follow Networking dialogs allows The table creation DDL to
be viewed?
(Select the correct response)
A. Copy
B. Show SQL
C. Show Related
D. Haphazard Contents

(16/55) J. the table definition :


Create table student (name Char (30), 434-438 Michael)
To list the names of the 10 youngest 83-103, which of the
following index d
Efinition doubtful
On the activity table may improve the query performance?
(Select the correct response)
A. Create index on youngest student (age, name)
B. Create index on youngest student (name, age)
C. Create index on youngest student (name, age DESC)
D. Create index on youngest student (name DESC) include (434-
438)

(17/55) Which one of the following SQL statements sets the


default qualifier To "user1"?
(Select the correct response)
A. Set current ID = 'user1'
B. Set current user = 'user1'
C. Set current sqlid = 'user1'
D. Set current qualifier = 'user1'

(18/55) Which of the following is the implicit qualifier for a


declared tempoRary table?
(Select the correct response)
A. The schema name Syscat.
B. The schema name session.
C. The schema name Tempuser.
D. The userid specified with the bind command.
E. The userid who established the connection to the database and
students
D the temporary table.

(19/55) J. the following transaction :


Create table dwaine.mytab (col1 Int, col2 INT)
Dwaine.mytab insert into values (1,2)
Dwaine.mytab insert into values (3)
Rollback
Which of the following would be returned from the statement :
Select * from dwaine.mytab?
(Select the correct response)
A. COL1 COL2
----------- -----------
0 record (s) selected.
B. COL1 COL2
----------- -----------
12
1 record (s) selected.
C. SQLCODE -204 indicating that "DWAINE.MYTAB" is an
undefined name.
D. COL1 COL2
----------- -----------
12
43
2 record (s) selected.

(20/55) Which of the following does merely end a unit of work?


(Select the correct response)
A. Commit
B. Rollback
C. Terminate
D. Savepoint
E. Connect reset

(21/55) Which of the following is the result of the following SQL


statement :
Create index empno_ind on UN employee (empno)
(Select the correct response)
A. Excellent value for Empno must be unique.
B. Update statements on Empno will be rolled back.
C. Insert doubtful on Empno will always be faster.
D. Insert Empno doubtful on the table will result in clustered
data.

(22/55) J. the following DDL statements,


Create table t1 (a Int, b Int, c INT)
Create view v1 as select a, b, c from t1
Where a "; 250
With check option
Which of the following insert statements will fail?
(Select the correct response)
A. Insert into t1 values (200, 2, 3)
B. Insert into v1 values (200, 2, 3)
C. Insert into t1 values (300, 2, 3)
D. Insert into v1 values (300, 2, 3)

(23/55) Which of the following statements will create an index


and prevent taBle T1 from Containing two or more rows with the
same values for column C1?
(Select the correct response)
A. Create index ix4 UN on t1 (cl)
B. Create index ix1 on distinct t1 (cl)
C. Create index ix6 UN on t1 (c1,c2)
D. Create index ix3 distinct on t1 (c1,c2)

(24/55) J. the table T1, created by :


Create table t1
(
Id Michael generated by default as identity.
Cl Char (3)
)
The following SQL statements are issued :
Insert into t1 values (1, 'ABC')
Insert into t1 values (5, 'DEF')
Which of the following values are inserted into the ID column by
the followinG statement?
Insert into t1 (cl) values ( 'XYZ')
(Select the correct response)
A. 0
B. 1
C. 2
D. 5
E. 6

(25/55) J. TAB2 the following:TAB1


C1 C2 flight fees
--- --- --- ---
A 11 a 21
C 22 B 12
C 13 D 23
The following results are desired:
C1 C2 flight fees
-- -- -- --
A 11 a 21
C 13 C 22
--D 23
Which of the following joins will yield the desired results?
(Select the correct response)
A. Select * from tab1, tab2 where c1=cx
B. Select * from tab1 inner join tab2 on c1=cx
C. Select * from tab1 full outer join tab2 on c1=cx
D. Select * from tab1 right outer join tab2 on c1=cx

(26/55) J. the following update statement :


Update address2 set housenumber_buildingname= (select from
addres buildingname S1
Where address2.id = address1.id)
Where is null HOUSENUMBER_BUILDINGNAME
Which of the following describes the result of the statement?
(Select the correct response)
A. The statement will succeed.
B. The statement will fail because a subquery cannot exist in
an UPDATE statement.
C. The statement will succeed only if ADDRESS1.ID and
ADDRESS2.ID are defined as primary keys.
D. The statement will succeed if the data retrieved from the
subquery does not have duplicate
values for ADDRESS1.ID.

(27/55) Which of the following is possible once a user has been


given maintenance authority?
(Select the correct response)
A. DB2 userids can be created.
B. Views can be created on the catalogs.
C. Statistics can be collected for database objects.
D. A table can be populated by using the LOAD command.

(28/55) Given table T1 with 100 rows, which of the following


queries will retrieve 10 rows from table T1?
(Select the correct response)
A. SELECT * FROM t1 MAXIMUM 10 ROWS
B. SELECT * FROM t1 READ 10 ROWS ONLY
C. SELECT * FROM t1 OPTIMIZE FOR 10 ROWS
D. SELECT * FROM t1 FETCH FIRST 10 ROWS ONLY

(29/55) Given the two following tables:


Points
Name Points
Wayne Gretzky 244
Jaromir Jagr 168
Bobby Orr 129
Bobby Hull 93
Brett Hull 121
Mario Lemieux 189

PIM
Name PIM
Mats Sundin 14
Jaromir Jagr 18
Bobby Orr 12
Mark Messier 32
Brett Hull 66
Mario Lemieux 23
Joe Sakic 94

Which of the following statements will display the player's


Names, points and
PIM for all players?
(Select the correct response)
A. SELECT points.name, points.points, pim.name, pim.pim
FROM points INNE
R JOIN pim
ON points.name=pim.name
B. SELECT points.name, points.points, pim.name, pim.pim
FROM points FULL
OUTER
JOIN pim ON points.name=pim.name
C. SELECT points.name, points.points, pim.name, pim.pim
FROM points LEFT
OUTER
JOIN pim ON points.name=pim.name
D. SELECT points.name, points.points, pim.name, pim.pim
FROM points RIGH
T OUTER
JOIN pim ON points.name=pim.name

(30/55) Given the following table definitions:


DEPARTMENT
deptno CHAR(3)
deptname CHAR(30)
mgrno INTEGER
admrdept CHAR(3)

EMPLOYEE
empno INTEGER
firstname CHAR(30)
midinit CHAR
lastname CHAR(30)
workdept CHAR(3)

Which of the following statements will list the employee's


employee number, last name, and
department name ONLY for those employees who have a
department?
(Select the correct response)
A. SELECT e.empno, e.lastname, d.deptname FROM employee
e, department d WHERE
e.workdept = d.deptno
B. SELECT e.empno, e.lastname, d.deptname FROM employee
e LEFT OUTER JOIN
department d ON e.workdept = d.deptno
C. SELECT e.empno, e.lastname, d.deptname FROM employee
e FULL OUTER JOI
N
department d ON e.workdept = d.deptno
D. SELECT e.empno, e.lastname, d.deptname FROM
employee e RIGHT OUTER JO
IN
department d WHERE e.workdept = d.deptno

(31/55) Given the table:


COUNTRY
ID NAME PERSON CITIES
1 Argentina 1 10
2 Canada 2 20
3 Cuba 2 10
4 Germany 1 0
5 France 7 5

Which of the following clauses when added to the statement


SELECT cities, name FROM country
returns rows sorted by NAME and then sorted by the number of
cities (CITIES)?

(Select the correct response)


A. ORDER BY 2,1
B. GROUP BY 2, 1
C. ORDER BY cities, name
D. GROUP BY cities, name

(32/55) Given the following table definition:


STAFF
id INTEGER
name CHAR(20)
dept INTEGER
job CHAR(20)
years INTEGER
salary DECIMAL(10,2)
comm DECIMAL(10,2)

Which of the following statements will return all of the records


ordered by job with the salaries in descending order?
(Select the correct response)
A. SELECT * FROM staff ORDER BY salary DESC, job
B. SELECT * FROM staff GROUP BY salary DESC, job
C. SELECT * FROM staff ORDER BY job, salary DESC
D. SELECT * FROM staff GROUP BY job, salary DESC

(33/55) Given table EMPLOYEE with columns EMPNO and SALARY


and table JOB with columns ID and TITLE, what is the effect of
the statement:
UPDATE employee SET salary = salary * 1.15
WHERE salary < 15000 OR
EXISTS (SELECT 1 FROM job WHERE job.id = employee.empno
AND job.title = 'Mgr')
(Select the correct response)
A. Only managers that make less than 15,000 are given
salary increases.
B. Only non-managers that make less than 15,000 are given
salaray increases.
C. Employees that make less than 15,000 but no managers
are given salary increases.
D. Employees that make less than 15,000 and all managers
are given salary increases.

(34/55) Given the table definition:


DEFIN1:
id SMALLINT NOT NULL
name VARCHAR(30)
hired DATE

DEFIN2:
deptid SMALLINT NOT NULL
name VARCHAR(30)
started DATE

Which of the following statements will insert successfully into


table DEFIN1?
(Select the correct response)
A. INSERT INTO defin1 (id) VALUES (1)
B. INSERT INTO defin1 (name) VALUES ('Florence')
C. INSERT INTO defin1 (id, hired) AS SELECT DISTINCT 1,
CURRENT DATE
FROM defin2
D. INSERT INTO defin1 (name, hired) SELECT DISTINCT
'Florence', CURRENT
DATE FROM defin2

(35/55) With tables defined as:


Table1
col1 INT
col2 CHAR(30)

Table2
col1 INT
col2 CHAR(30)

Which of the following statements will insert all the rows in


TABLE2 into TABLE1?
(Select the correct response)
A. INSERT INTO table1 SELECT col1, col2 FROM table2
B. INSERT INTO table1 AS SELECT col1, col2 FROM table2
C. INSERT INTO table1 VALUES (table2.col1, table2.col2)
D. INSERT INTO table1 VALUES (SELECT col1, col2 FROM
table2)
E. INSERT INTO table1 (col1,col2) VALUES (SELECT col1,col2
FROM table2)

(36/55) Which of the following is the result of a successful


ROLLBACK statement?
(Select the correct response)
A. Held locks are released
B. Release-pending conditions are undone
C. Tables in LOAD PENDING are released
D. Constraint checking conditions are undone
E. Existing database connections are released

(37/55) Given the following embedded SQL programs:


Program 1:
CREATE TABLE mytab (col1 INT, col2 CHAR(24))
COMMIT
Program 2:
INSERT INTO mytab VALUES ( 20989,'Joe Smith')
INSERT INTO mytab VALUES ( 21334,'Amy Johnson')
COMMIT
DELETE FROM mytab
ROLLBACK
INSERT INTO mytab VALUES ( 23430,'Jason French')
ROLLBACK
INSERT INTO mytab VALUES ( 20993,'Samantha Jones')
COMMIT
DELETE FROM mytab WHERE col1=20993
ROLLBACK
Which of the following indicates the number of records that will
be returned
by the statement:
SELECT * FROM mytab?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3
E. 4

(38/55) Given an embedded SQL program with a single


connection, two threads and the following actions:
Thread 1: INSERT INTO mytab VALUES (...)
Thread 2: INSERT INTO mytab VALUES (...)
Thread 1: COMMIT
Thread 2: INSERT INTO mytab VALUES (...)
Thread 1: ROLLBACK
How many records will be successfully inserted and retained in
the table mytab?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3

(39/55) Given two embedded SQL programs and the following


actions:
Pgm1 Pgm2
INSERT INTO mytab VALUES (...) DELETE FROM mytab
COMMIT ROLLBACK
DELETE FROM mytab INSERT INTO mytab VALUES (...)

ROLLBACK COMMIT

If there exists one (1) row in table mytab before the programs
are executed concurrently,
how many records will be in the table once the programs
complete?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3
E. 4

(40/55) A user has a numeric data column with a maximum


value of 100,000. Which of the following data types will use the
minimum amount of storage for the column?
(Select the correct response)
A. IDENTITY
B. BIGINT
C. INTEGER
D. SMALLINT

(41/55) Which of the following DB2 data types is used to store


50 MB of binary data as a single value?
(Select the correct response)
A. BLOB
B. CLOB
C. DBCLOB
D. FOR BIT DATA
E. VARCHAR FOR BIT DATA
(42/55) Given the following column requirements:
Col1 Numeric Identifier - From 1 to 1000000
Col2 Job Code - Variable, 1 to 2 characters long
Col3 Job Description - Variable, 1 to 100 characters long
Col4 Job Length - Length of Job in seconds
Which of the following will minimize the disk space allocated to
store the records if Job Description has an average length of
45?
(Select the correct response)
A. CREATE TABLE tab1 (col1 INT, col2 CHAR(2), col3
CHAR(100), col4 INT)
B. CREATE TABLE tab1 (col1 INT, col2 VARCHAR(2), col3
CHAR(100), col4 IN
T)
C. CREATE TABLE tab1 (col1 INT, col2 CHAR(2), col3
VARCHAR(100), col4 IN
T)
D. CREATE TABLE tab1 (col1 INT, col2 VARCHAR(2), col3
VARCHAR(100), col4
INT)

(43/55) Which of the following DELETE RULES on CREATE TABLE


will delete a dependent table row if the parent table row is
deleted?
(Select the correct response)
A. ON DELETE REMOVE
B. ON DELETE CASCADE
C. ON DELETE RESTRICT
D. ON DELETE SET NULL
E. ON DELETE PROPAGATE

(44/55) Given the following table structure:


table1
emp_num INT NOT NULL PRIMARY KEY
emp_fname CHAR(30) NOT NULL
emp_lname CHAR(30) NOT NULL
emp_addr CHAR(60) NOT NULL
emp_pin CHAR(10) NOT NULL
Which of the following columns can be referenced by a foreign
key clause from another table?
(Select the correct response)
A. emp_num
B. emp_pin
C. emp_addr
D. emp_fname
E. emp_lname

(45/55) Why is a unique index not sufficient for creation of a


primary key?
(Select the correct response)
A. It is sufficient - a primary key is the same thing as a
unique index.

B. Unique indexes can be defined in ascending or descending


order. Prima
ry keys must be
ascending.
C. A unique index can be defined over a column or columns
that allow nul
ls. Primary keys cannot contain nulls.
D. A unique index can be defined over a column or columns
that allow nul
ls. This is not
allowed for primary keys because foreign keys cannot contain
nulls.

(46/55) Given the statement:


CREATE TABLE t1 (c1 CHAR(1))
Data has been inserted into the table with rows of a,b,c,d,e,f.
Given the following command is issued:
ALTER TABLE t1 ADD CONSTRAINT con1 CHECK (c1 ='a')
Which of the following occurs?
(Select the correct response)
A. Rows with c1 values of b,c,d,e,f are deleted
B. Rows with c1 values of b,c,d,e,f have c1 set to NULL
C. The ALTER command will fail as rows violate the constraint

D. The ALTER command will move the violating rows to the


exception table
(47/55) With DBADM authority on the database and given the
statements:
CREATE TABLE t1 (c1 CHAR(1))
INSERT INTO t1 VALUES ('b')
CREATE VIEW v1 AS SELECT c1 FROM t1 WHERE c1='a' WITH
CHECK OPTION
INSERT INTO v1 VALUES ('a')
INSERT INTO v1 VALUES ('b')
How many rows would be returned from the statement, SELECT
c1 FROM t1?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3

(48/55) A view is used instead of a table for users to do which of


the following?
(Select the correct response)
A. Avoid allocating more disk space per database
B. Provide users with the ability to define indexes
C. Restrict user's access to a subset of the table data
D. Avoid allocating frequently used query result tables

(49/55) Which of the following products can be used to perform a


dictionary-based search?
(Select the correct response)
A. Net.Data
B. XML Extender
C. AVI Extender
D. Text Extender

(50/55) Which two of the following modes can be used on the


lock table statement?
(Select all that apply)
A. SHARE MODE
B. EXCLUSIVE MODE
C. REPEATABLE READ MODE
D. UNCOMMITTED READ MODE
E. INTENT EXCLUSIVE MODE
(51/55) For which of the following can locks be obtained?
(Select the correct response)
A. A trigger
B. A table view
C. A table column
D. A database buffer
E. A row referenced by an index key

(52/55) Given the following table with a primary key on empid:


Emp:
Empid Name
11 Joe Smith
23 Melanie Jones
30 Robert Bruce
49 Janice Baker
66 Mario Diaz
68 Maria Diaton

Give the following statement in an embedded SQL program


bound with Repeatable Read:
Select * from Emp where empid < 55
How many rows in the table will be locked after the statement is
run?
(Select the correct response)
A. 0
B. 1
C. 4
D. 5
E. 6

(53/55) Which of the following isolation levels will lock only the
rows returned in the result set?
(Select the correct response)
A. Read Stability
B. Repeatable Read
C. Cursor Stability
D. Uncommitted Read

(54/55) Which of the following processing can occur for a unit of


work using an isolation level of Cursor Stability and allows
scanning through the table more than once within the unit of
work?
(Select the correct response)
A. Access uncommitted changes made by other processes
B. Update uncommitted changes made by other processes
C. Have updated result set rows changed by other processes
from one scan
to the next
D. Have accessed result set rows changed by other processes
from one sca
n to the next

(55/55) Given the following:


A table containing a list of all seats on an airplane. A seat
consists of a seat number and whether or not it is assigned. An
airline agent lists all the unassigned seats on the
plane. When the agent refreshes the list from the table, it should
only change if another agent unassigns a currently
assigned seat.

Which of the following isolation levels should be used for this


application?

(Select the correct response)


A. Read stability
B. Repeatable read
C. Cursor stability
D. Uncommitted read

(1/55) J. two embedded SQL programs and the following


actions :
Pgm1 Pgm2
Insert into values delete from mytab mytab
(...)
Commit rollback
Delete from mytab (. . . )
Rollback commit
If there exists one (1) row in table mytab before the programs
are executed c
Oncurrently, how many records will be in the table once the
programs complete
?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3
E. 4

(2/55) Which of the following DB2 CLP options specify the file
that contains
The doubtful to be executed?
(Select the correct response)
A. -F
B. -B
C. -O
D. -W

(3/55) a view is used instead of a table for users to do which of


the follow
Ing?
(Select the correct response)
A. Avoid allocating more disk space per database
B. Provide users with the ability to define 1978-1992
C. Restrict user 's access to a subset of the table data
D. Avoid allocating frequently used query result tables

(4/55) J. the table definition :


Create table student (name Char (30), 434-438 Michael)
To list the names of the 10 youngest 83-103, which of the
following index dEfinition doubtful on the activity table may
improve the query performance?

(Select the correct response)


A. Create index on youngest student (age, name)
B. Create index on youngest student (name, age)
C. Create index on youngest student (name, age DESC)
D. Create index on youngest student (name DESC) include (434-
438)

(5/55) J. the following update statement :


Update address2 set housenumber_buildingname=
(select from address1 buildingname
Where address2.id = address1.id)
Where is null HOUSENUMBER_BUILDINGNAME
Which of the following describes the result of the statement?
(Select the correct response)
A. The statement will succeed.
B. The statement will fail because a subquery generation exist in
an update state
Discussion.
C. The statement will succeed only if ADDRESS1.ID and
ADDRESS2.ID are defined
As primary keys.
D. The statement will succeed if the data retrieved from the
subquery does no
T have duplicate values for ADDRESS1.ID.

(6/55) J. column the following requirements :


Col1 Numeric Identifier-From 1 to 1000000
Col2 Job Code - Variable, 1 to 2 characters long
Col3 Job Description - Variable, 1 to 100 characters long
Col4 Job Length - Length of Job in seconds
Which of the following will minimize the disk space allocated to
store the re
Cords if Job Description has an average length of 45?
(Select the correct response)
A. Create table tab1 (col1 Int, col2 Char (2), col3 Char (100),
col4 INT)
B. Create table tab1 (col1 Int, col2 VARCHAR (2), col3 Char
(100), col4 INT)
C. Create table tab1 (col1 Int, col2 Char (2), col3 VARCHAR
(100), col4 INT)
D. Create table tab1 (col1 Int, col2 VARCHAR (2), col3 VARCHAR
(100), col4 INT)

(7/55) Which of the following will rebuild a package in the


database from tHe existing catalog information?
(Select the correct response)
A. Bind
B. Rebind
C. Update
D. Counterpart
(8/55) With tables defined as :
Table1
Col1 INT
Col2 Char (30)

Table2
Col1 INT
Col2 Char (30)
Which of the following statements will insert all the rows in
TABLE2 into tab
LE1?
(Select the correct response)
A. Insert into table1 select col1, col2 from table2
B. Insert into table1 as select col1, col2 from table2
C. Insert into table1 values (table2.col1, table2.col2)
D. Insert into table1 values (select col1, col2 from table2)
E. Insert into table1 (col1,col2) values (select col1,col2 from
table2)

(9/55) Ulrich an embedded SQL program with a single


connection, the two threads
And the following actions :
Thread 1 : mytab insert into values (. . . )
Thread 2 : mytab insert into values (. . . )
Thread 1 : commit
Thread 2 : mytab insert into values (. . . )
Thread 1 : rollback
How many records will be successfully inserted and retained in
the table myta
B?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3

(10/55) Which of the following can be used to determine the


views that are aFfected by a drop table statement?
(Select the correct response)
A. DB2 Script Center
B. DB2 Performance Monitor
C. DB2 Control Center, Show Related
D. DB2 Control Center, sampling Contents

(11/55) Which of the following is the implicit qualifier for a


declared temPorary table?
(Select the correct response)
A. The schema name Syscat.
B. The schema name session.
C. The schema name Tempuser.
D. The userid specified with the bind command.
E. The userid who established the connection to the database and
declared the Temporary table.

(12/55) J. table employee salary and table with columns Empno


and job wi
Ed columns ID and title, what is the effect of the statement :
Update employee set salary = salary * 1.15
Where salary "or 15000
Exists (select 1 from job where job.id employee.empno sent
job.title = = 'murder'
)
(Select the correct response)
A. Only managers that make less than 15,000 are given salary
increases.
B. Only non-managers that make less than 15,000 are given
salaray increases.
C. Employees that make less than 15,000 but no managers are
given salary incr
Eases.
D. Employees that make less than 15,000 and all managers are
given salary Inc.
Reases.

(13/55) J. the following table structure :


Table1
Emp_num INT secret null Sha key
Emp_fname Char (30) merely null
Emp_lname Char (30) merely null
Emp_addr Char (60) merely null
Emp_pin Char (10) merely null
Which of the following columns can be referenced by a foreign
key clause from
Another table?
(Select the correct response)
A. Emp_num
B. Emp_pin
C. Emp_addr
D. Emp_fname
E. Emp_lname

(14/55) Which of the following delete rules create table will


delete on a dePendent table row if the parent table row is
deleted?
(Select the correct response)
A. On delete sun
B. On delete Cascade
C. On delete restrict
D. On delete set null
E. On delete propagate

(15/55) Why is a unique site not sufficient for creation of a


primary key?

(Select the correct response)


A. It is sufficient-a primary key is the same thing as a unique
index.
B. Unique indexes can be defined in ascending or descending
order. Primary ke
Ys must be ascending.
C. A unique index can be defined over a column or columns that
allow nulls. P
Rimary keys Cohen contain nulls.
D. A unique index can be defined over a column or columns that
allow nulls. T
His is not allowed for primary keys because foreign keys Cohen
contain nulls
.

(16/55) When manually establishing communications from a


Windows NT 瀹 ㈡ 埗
Through a DB2 Connect gateway to DB2 UDB for OS/390, which
of the following iS merely required to catalog?
(Select the correct response)
A. The 瀹 ㈡ 埗.
B. The DRDA databases on the server.
C. The Database Connection Service database.
D. The node where the DB2 Connect Gateway is.

(17/55) Which two of the following types of storage management


method is bilingual
Ported by DB2 OLAP Server?
(Select all that apply)
A. Scrap
B. Network
C. Relational
D. Hierachical
E. Multi-dimensional

(18/55) Which of the following is the result of a successful


rollback stateMent?
(Select the correct response)
A. Held locks are released
B. Release-pending conditions are undone
C. Tables are released in load pending
D. Constraint checking conditions are undone
E. Existing database connections are released

(19/55) Which of the following isolation levels will install only the
rows retUrned in the result set?
(Select the correct response)
A. Read Stability
B. Repeatable Read
C. Cursor Stability
D. Uncommitted Read

(20/55) a user has a numeric data column with a maximum


value of 100,000. Tenants
Ich of the following data types will use the minimum amount of
storage for 85th
E column?
(Select the correct response)
A. Identity
B. BIGINT
C. Michael
D. Smallint

(21/55) Which of the following is the most appropriate reason to


consider rEvoking the select privilege on the catalog tables from
appliqu after creating A database?
(Select the correct response)
A. To prevent users from creating tables without proper
authority.
B. Some system catalogs record user data in some columns, and
this data may b
E confidential.
C. To prevent users from viewing passwords for other DB2
userids that DB2 sto
Movement in the catalog tables.
D. Some catalog tables are large, so preventing users from
viewing them is a
Good way to keep users from submitting long-running queries
against the catal
Ogs.

(22/55) J. the table definition :


DEFIN1
Id SMALLINT NOT NULL
Name VARCHAR(30)
Hired DATE
DEFIN2:
Deptid SMALLINT NOT NULL
Name VARCHAR(30)
Started DATE
Which of the following statements will insert successfully into
table DEFIN1?

(Select the correct response)


A. INSERT INTO defin1 (id) VALUES (1)
B. INSERT INTO defin1 (name) VALUES ('Florence')
C. INSERT INTO defin1 (id, hired) AS SELECT DISTINCT 1,
CURRENT DATE FROM def
in2
D. INSERT INTO defin1 (name, hired) SELECT DISTINCT
'Florence', CURRENT DATE
FROM defin2

(23/55) Which of the following statements will create an index


and prevent table T1 from containing two or more rows with the
same values for column C1?

(Select the correct response)


A. CREATE UNIQUE INDEX ix4 ON t1 (c1)
B. CREATE DISTINCT INDEX ix1 ON t1 (c1)
C. CREATE UNIQUE INDEX ix6 ON t1 (c1,c2)
D. CREATE DISTINCT INDEX ix3 ON t1 (c1,c2)

(24/55) A table called EMPLOYEE has columns: name,


department, and phone_number. Which of the following can limit
access to the phone_number column?
(Select the correct response)
A. Using a view to access the table
B. Using an index on the column
C. Using a referential constraint on the table
D. Using a table check constraint on the table
E. Revoking access from the phone_number column

(25/55) Which of the following is the result of the following SQL


statement
:
CREATE UNIQUE INDEX empno_ind ON employee (empno)
(Select the correct response)
A. Every value for EMPNO must be unique.
B. UPDATE statements on EMPNO will be rolled back.
C. Insert statements on EMPNO will always be faster.
D. Insert statements on the EMPNO table will result in
clustered data.

(26/55)Which of the following DB2 components can limit the


resource consumption of queries?
(Select the correct response)
A. DB2 Connect
B. DB2 Query Patroller
C. DB2 Performance Monitor
D. DB2 Net Search Extender

(27/55) Given the following table with a primary key on empid:


Emp:
Empid Name
11 Joe Smith
23 Melanie Jones
30 Robert Bruce
49 Janice Baker
66 Mario Diaz
68 Maria Diaton
Give the following statement in an embedded SQL program
bound with Repeatable
Read:
Select * from Emp where empid < 55
How many rows in the table will be locked after the statement is
run?
(Select the correct response)
A. 0
B. 1
C. 4
D. 5
E. 6

(28/55)Which of the following products can be used to perform


a dictionary-
based search?
(Select the correct response)
A. Net.Data
B. XML Extender
C. AVI Extender
D. Text Extender

(29/55)Which two of the following modes can be used on the


lock table statement?
(Select all that apply)
A. SHARE MODE
B. EXCLUSIVE MODE
C. REPEATABLE READ MODE
D. UNCOMMITTED READ MODE
E. INTENT EXCLUSIVE MODE
(30/55)Which of the following does NOT end a unit of work?
(Select the correct response)
A. COMMIT
B. ROLLBACK
C. TERMINATE
D. SAVEPOINT
E. CONNECT RESET

(31/55) Which of the following must be set up to allow the


Control Center to view database objects?
(Select the correct response)
A. ODBC
B. JAVA
C. DB2 Administration Server
D. Client Configuration Assistant

(32/55)Which of the following is the best way to restrict user


access to a subset of columns in a table?
(Select the correct response)
A. Only grant access to the columns within a table that a
user is allowed to see.
B. Create a view that only includes the columns a user is
allowed to see. Grant the user access to the view, not the base
table.
C. Create two tables: one with the columns that a user is
allowed to see, andone that has the confidential columns, and
use a join when all data must be
presented.
D. Create two tables: one with the columns that a user is
allowed to see, and
one that has the confidential columns, and use a union when all
data must be
presented.

(33/55)How many DB2 Administration Server (DAS) Instances


can be set up perphysical machine?
(Select the correct response)
A. 0
B. 1
C. One for each instance on the physical machine
D. One for each database on the physical machine

(34/55) Given the table T1, created by:


CREATE TABLE t1
(
id INTEGER GENERATED BY DEFAULT AS IDENTITY,
c1 CHAR(3)
)
The following SQL statements are issued:
INSERT INTO t1 VALUES (1, 'ABC')
INSERT INTO t1 VALUES (5, 'DEF')
Which of the following values are inserted into the ID column by
the following statement?
INSERT INTO t1(c1) VALUES ('XYZ')
(Select the correct response)
A. 0
B. 1
C. 2
D. 5
E. 6

(35/55)Given the following transaction:


CREATE TABLE dwaine.mytab (col1 INT, col2 INT)
INSERT INTO dwaine.mytab VALUES (1,2)
INSERT INTO dwaine.mytab VALUES (4,3)
ROLLBACK
Which of the following would be returned from the statement:
SELECT * FROM dwaine.mytab?

(Select the correct response)


A. COL1 COL2
--------------- --------------
0 record(s)selected.
B. COL1 COL2
--------- --------
1 2
1 record(s) selected.
C. SQLCODE -204 indicating that "DWAINE.MYTAB" is an
undefined name.
D. COL1 COL2
-------- -------
1 2
4 3
2 record(s) selected.

(36/55)Given the following:


TAB1 TAB2
C1 C2 CX CY
------ ------ ----- -----
A 11 A 21
B 12 C 22
C 13 D 23
The following results are desired:
C1 C2 CX CY
----- ----- ----- ------
A 11 A 21
C 13 C 22
--- ---- D 23
Which of the following joins will yield the desired results?
(Select the correct response)
A. SELECT * FROM tab1, tab2 WHERE c1=cx
B. SELECT * FROM tab1 INNER JOIN tab2 ON c1=cx
C. SELECT * FROM tab1 FULL OUTER JOIN tab2 ON c1=cx
D. SELECT * FROM tab1 RIGHT OUTER JOIN tab2 ON c1=cx

(37/55) Given the following embedded SQL programs:


Program 1:
CREATE TABLE mytab (col1 INT, col2 CHAR(24))
COMMIT
Program 2:
INSERT INTO mytab VALUES ( 20989,'Joe Smith')
INSERT INTO mytab VALUES ( 21334,'Amy Johnson')
COMMIT
DELETE FROM mytab
ROLLBACK
INSERT INTO mytab VALUES ( 23430,'Jason French')
ROLLBACK
INSERT INTO mytab VALUES ( 20993,'Samantha Jones')
COMMIT
DELETE FROM mytab WHERE col1=20993
ROLLBACK
Which of the following indicates the number of records that will
be returned
by the statement:
SELECT * FROM mytab?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3
E. 4

(38/55)Given the statement:


CREATE TABLE t1 (c1 CHAR(1))
Data has been inserted into the table with rows of a,b,c,d,e,f.
Given the following command is issued:
ALTER TABLE t1 ADD CONSTRAINT con1 CHECK (c1 ='a')
Which of the following occurs?
(Select the correct response)
A. Rows with c1 values of b,c,d,e,f are deleted
B. Rows with c1 values of b,c,d,e,f have c1 set to NULL
C. The ALTER command will fail as rows violate the
constraint
D. The ALTER command will move the violating rows to the
exception table

(39/55)Given the two following tables:


Points
Name Points
Wayne Gretzky 244
Jaromir Jagr 168
Bobby Orr 129
Bobby Hull 93
Brett Hull 121
Mario Lemieux 189

PIM
Name PIM
Mats Sundin 14
Jaromir Jagr 18
Bobby Orr 12
Mark Messier 32
Brett Hull 66
Mario Lemieux 23
Joe Sakic 94
Which of the following statements will display the player's
Names, points and
PIM for all players?
(Select the correct response)
A. SELECT points.name, points.points, pim.name, pim.pim
FROM points INNER JOI
N pim ON points.name=pim.name
B. SELECT points.name, points.points, pim.name, pim.pim
FROM points FULL OUTE
R JOIN pim ON points.name=pim.name
C. SELECT points.name, points.points, pim.name, pim.pim
FROM points LEFT OUTE
R JOIN pim ON points.name=pim.name
D. SELECT points.name, points.points, pim.name, pim.pim
FROM points RIGHT OUT
ER JOIN pim ON points.name=pim.name

(40/55) Which of the following products must be installed to


provide a single point of control for local and remote DB2
databases?
(Select the correct response)
A. DB2 Runtime Client
B. DB2 Administration Client
C. DB2 Connect Enterprise Edition
D. DB2 Enterprise-Extended Edition

(41/55)Which of the following tools maintains a history of all


executed statements/commands for the current session within
the tool?
(Select the correct response)
A. Journal
B. SQL Assist
C. DB2 Alert Center
D. DB2 Command Center

(42/55) Using the Control Center Create Table dialog box,


which of the following dialogs allows the table creation DDL to be
viewed?
(Select the correct response)
A. Copy
B. Show SQL
C. Show Related
D. Sample Contents

(43/55)Which of the following processing can occur for a unit


of work using an isolation level of Cursor Stability and allows
scanning through the table more than once within the unit of
work?
(Select the correct response)
A. Access uncommitted changes made by other processes
B. Update uncommitted changes made by other processes
C. Have updated result set rows changed by other processes
from one scan to t
he next
D. Have accessed result set rows changed by other
processes from one scan to
the next

(44/55)Given the table:


COUNTRY
ID NAME PERSON CITY
1 Argentina 1 10
2 Canada 2 20
3 Cuba 2 10
4 Germany 1 0
5 France 7 5
Which of the following clauses when added to the statement
SELECT cities, name FROM country returns rows sorted by NAME
and then sorted by the number of cities (CITIES)?

(Select the correct response)


A. ORDER BY 2,1
B. GROUP BY 2, 1
C. ORDER BY cities, name
D. GROUP BY cities, name

(45/55) Which of the following DB2 data types is used to store


50 MB of binary data as a single value?
(Select the correct response)
A. BLOB
B. CLOB
C. DBCLOB
D. FOR BIT DATA
E. VARCHAR FOR BIT DATA

(46/55)Which one of the following SQL statements sets the


default qualifier to "user1"?
(Select the correct response)
A. SET CURRENT ID = 'user1'
B. SET CURRENT USER = 'user1'
C. SET CURRENT SQLID = 'user1'
D. SET CURRENT QUALIFIER = 'user1'

(47/55)Which of the following privileges is necessary to


populate the table with large amounts of data?
(Select the correct response)
A. LOAD
B. ALTER
C. UPDATE
D. IMPORT

(48/55)For which of the following can locks be obtained?


(Select the correct response)
A. A trigger
B. A table view
C. A table column
D. A database buffer
E. A row referenced by an index key

(49/55)Which of the following is possible once a user has been


given maintenance authority?
(Select the correct response)
A. DB2 userids can be created.
B. Views can be created on the catalogs.
C. Statistics can be collected for database objects.
D. A table can be populated by using the LOAD command.

(50/55)With DBADM authority on the database and given the


statements:
CREATE TABLE t1 (c1 CHAR(1))
INSERT INTO t1 VALUES ('b')
CREATE VIEW v1 AS SELECT c1 FROM t1 WHERE c1='a' WITH
CHECK OPTION
INSERT INTO v1 VALUES ('a')
INSERT INTO v1 VALUES ('b')
How many rows would be returned from the statement, SELECT
c1 FROM t1?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3

(51/55) Given the following DDL statements,


CREATE TABLE t1 (a INT, b INT, c INT)
CREATE VIEW v1 AS SELECT a, b, c FROM t1
WHERE a >; 250
WITH CHECK OPTION
Which of the following INSERT statements will fail?
(Select the correct response)
A. INSERT INTO t1 VALUES (200, 2, 3)
B. INSERT INTO v1 VALUES (200, 2, 3)
C. INSERT INTO t1 VALUES (300, 2, 3)
D. INSERT INTO v1 VALUES (300, 2, 3)

(52/55)Given table T1 with 100 rows, which of the following


queries will retrieve 10 rows from table T1?
(Select the correct response)
A. SELECT * FROM t1 MAXIMUM 10 ROWS
B. SELECT * FROM t1 READ 10 ROWS ONLY
C. SELECT * FROM t1 OPTIMIZE FOR 10 ROWS
D. SELECT * FROM t1 FETCH FIRST 10 ROWS ONLY

(53/55)Given the following:


A table containing a list of all seats on an airplane. A seat
consists of a seat number and whether or not it is assigned. An
airline agent lists all the unassigned seats on the plane. When
the agent refreshes the list from the table, it should only change
if another agent unassigns a currently assigned seat.

Which of the following isolation levels should be used for this


application?
(Select the correct response)
A. Read stability
B. Repeatable read
C. Cursor stability
D. Uncommitted read

(54/55)With tables defined as:


Table1
col1 INT
col2 CHAR(30)

Table2
col1 INT
col2 CHAR(30)
Which of the following statements will insert all the rows in
TABLE2 into TAB
LE1?
(Select the correct response)
A. INSERT INTO table1 SELECT col1, col2 FROM table2
B. INSERT INTO table1 AS SELECT col1, col2 FROM table2
C. INSERT INTO table1 VALUES (table2.col1, table2.col2)
D. INSERT INTO table1 VALUES (SELECT col1, col2 FROM
table2)
E. INSERT INTO table1 (col1,col2) VALUES (SELECT
col1,col2 FROM table2)

(55/55)Given the following table definitions:


DEPARTMENT
Deptno CHAR(30)
Deptname CHAR(30)
Mgrno INTEGER
Admrdept CHAR(3)

EMPLOYEE
Empno INTEGER
Firstname CHAR(30)
Midinit CHAR
Lastname CHAR(30)
Workdept CHAR(3)
Which of the following statements will list the employee's
employee number, last name, and department name ONLY for
those employees who have a department?

(Select the correct response)


A. SELECT e.empno, e.lastname, d.deptname FROM
employee e, department d WHERE
e.workdept = d.deptno
B. SELECT e.empno, e.lastname, d.deptname FROM
employee e LEFT OUTER JOIN dep
artment d ON e.workdept = d.deptno
C. SELECT e.empno, e.lastname, d.deptname FROM
employee e FULL OUTER JOIN dep
artment d ON e.workdept = d.deptno
D. SELECT e.empno, e.lastname, d.deptname FROM
employee e RIGHT OUTER JOIN de
partment d WHERE e.workdept = d.deptno

(1/55). Which of the following output can be performed using the


alter tablesPace statement?
(Select the correct response)
A. Assign a bufferpool.
B. Change the table space name.
C. Change the type of the table space.
D. Change the page size of the table space.

(2/55). J. the tables :


Country
ID name person cities
1 Argentina 1 10
2 Canada 2 20
3 Cuba 2 10
4 Germany 1 0
7 5 5 France
Staff
ID LastName
1. Jones
2. Smiths
The statement :
Select * from staff,country
Will return how many rows?
(Select the correct response)
A.2
B.4
C.5
25,700
5,900,000

(3/55). Which of the following products can be used to generate


Extensible Ma
Rkup Language documents from DB2 tables?
(Select the correct response)
A. Net Search
B. XML Extender
C. Avi Extender
D. TXT Extender

(4/55). Which of the following SQL statements can remove all


rows from a tablE named COUNTRY?
(Select the correct response)
A.DELETE country
B.DELETE from country
C.DELETE * from country
D.DELETE Souls from country

(5/55). Which of the following tools can be used to identify


inefficient SQL
Doubtful without executing the query?
(Select the correct response)
A. QMF
B. Script Center
C. Visual Explain
D. Performance Monitor

(6/55) J. the statement :


Create table t1
(
Cl Michael secret Null,
C2 Michael,
Sha key (cl)
Unit key (c2) references t2
)
How many non-unique indexes are defined for table t1?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3

(7/55) J. two embedded SQL program executions with the


following actions :

Pgm1
Mytab insert into values (. . . )
Commit
Mytab insert into values (. . . )
Rollback

Pgm2
Mytab insert into values (. . . )
Rollback
Mytab insert into values (. . . )
Commit
How many records will be successfully inserted and retained in
the table myta
B?
(Select the correct response)

A. 1
B. 2
C. 3
D. 4
(8/55) J. the following DDL statement :
Create table newtab1 like tab1
Which of the following would occur as a result of the statement
execution?
(Select the correct response)
A NEWTAB1 has same triggers as TAB1
B NEWTAB1 is populated with TAB1 data
C NEWTAB1 has the same primary key as TAB1
D NEWTAB1 columns have same attributes as TAB1

(9/55) Which of the following describes when indexes can be


explicitly referEnced by name within an SQL statement?
(Select the correct response)
A. When the index dropping
B. When updating the index
C. When selecting on the index
D. When inserting using the index

(10/55) Which of the following can be accomplished with a single


update Details
Ement?
(Select the correct response)
A. Updating multiple tables
B. Updating a view consisting of joined tables
C. Updating multiple tables based on a where clause
D. Updating a table based on a sub-select using joined tables

(11/55) Which of the following is merely a valid data type on


create TABLE?
(Select the correct response)
A. Clob
B. Double
C. Numeric
D. DateTime

(12/55) J. the statement :


Create table t1
(
Cl Char (3)
Constraint cl
Check (cl in ( 'A01', 'B01', 'C01'))
)
DB2 verifies that the table check constraint is met during which
of the folloWing actions?

(Select the correct response)


A. Adding data using load
B. The reorg of the table
C. The insert of each row in t1
D. The creation of the index for the table

(13/55) If a DB2 Warehouse Manager toolkit is selected during


the installatiOn of DB2 UDB Version 7.1, which of the following
databases must be defined?

(Select the correct response)


A. None
B. Target Database
C. Source Database
D. Control Database

(14/55) With Dbadm authority on the database and given the


statements :
Create table t1 (cl Char (1))
Insert into t1 values ( 'b')
Create view v1 as select from t1 where cl cl = 'a'
Insert into v1 values ( 'a')
Insert into v1 values ( 'b')
How many rows would be returned from the statement, the
select from t1? cl

(Select the correct response)


A. 0
B. 1
C. 2
D. 3

(15/55) Which of the following occurs if an application due


abnormally duriNg an active unit of work?
(Select the correct response)
A. Current unit of work is committed
B. Current unit of work is rolled back
C. Current unit of work remains active
D. Current unit of work moves to pending state

(16/55) Which of the following Control Center features can be


used to update Information for the optimizer to choose the best
path to data?
(Select the correct response)
A. Show Related
B. Generate DDL
C. Run Statistics
D. Reengineer Table

(17/55) J. the following :


TAB1 TAB2
C1 C2 flight fees
-- -- -- --
A 11 a 21
B 12 B 22
C 13 C 23
The following results are desired :
C1 C2 flight fees
-- -- -- --
A 11 a 21
B 12 -- --
C 13 C 22
Which of the following joins will yield the desired results?
(Select the correct response)
A. Select * from tab1, tab2 where c1=cx
B. Select * from tab1 inner join tab2 on c1=cx
C. Select * from tab1 full outer join tab2 on c1=cx
D. Select * from tab1 left outer join tab2 on c1=cx

(18/55) J. the following table definition :


Staff
Id Michael
Name Char (20)
Dept. Michael
Job Char (20)
Years Michael
Salary Decimal (10,2)
V. Decimal (10,2)
The job description column contains these types : � 鐞 �, clerk,
and salesperson. Newt
Ch of the following statements will return the data with all
managers togethe
R, all clerks together and all salespeople together in the output?
(Select the correct response)
A. Select * from staff designs feature job
B. Select job, name from staff group by name, job
C. Select * from staff group by name, description, id, dept,
years, salary, comm.
D. Select * from staff designs feature name, description, id, dept,
years, salary, comm.]

(19/55) Which of the following types of DB2 locks allows for the
most concurRency within a table?
(Select the correct response)
A. A row lock
B. A page users
C. A field users
D. A column lock

(20/55) Which of the following cannot be used to restrict specific


values fr
Columns being inserted into a column in a particular table?
(Select the correct response)
A. View
B. Index
C. Check constraint
D. Referential constraint

(21/55) Which of the following describes why savepoints are


merely allowed insiDe an atomic unit of work?
(Select the correct response)
A. Band units of work layered multiple databases, but savepoints
are limited tO units of work which operate on a single database.
B. A savepoint implies that a subset of the work may be allowed
to succeed, wHile atomic operations must succeed or fail as a
unit.
C. A savepoint requires an explicit commit to be released, and
commit statemeDevices are not allowed in atomic operations
such as compound SQL.
D. A savepoint generation be created without an active
connection to a database,But atomic operations can contain a
connect as a sub-statement.

(22/55) J. the tables :

Tablea Tableb
Empid name empid weeknumber paycheck
1 1 1 1000.00 Joe
1 2 2 Bob 1000.00
2 1 2000.00
Tableb was defined as follows :
Create table tableb (empid Char (3), weeknumber Char (3),
paycheck Decimal (6,2)
,
Constraint const1 unit key (empid)
References tablea (empid) on delete set null)
How many rows would be deleted from tableb if the following
command is issued
:
Delete from tablea where empid = 'two'?

(Select the correct response)


A. 0
B. 1
C. 2
D. 3

(23/55) Which two of the following DB2 authorization groups are


authorized t
O create a table within database sample?
(Select all that apply)
A. Dbadm
B. Dbctrl
C. Sysadm
D. Dbmaint
E. Alterin
F. Sysmaint

(24/55) Ulrich created by the table T1 :


Create table t1
(
Id Michael secret null generated always as identity,
Cl Char (10) merely Null,
C2 Char (10)
)
Which of the following insert statements will succeed?
(Select the correct response)
A. Insert into t1 values (1, 'abc', Null)
B. Insert into t1 values (1, null, 'def')
C. Insert into t1 (cl, c2) values ( 'abc', Null)
D. Insert into t1 (cl, c2) values (null, 'def')

(25/55) J. the two following tables :


Names
Name Number
Wayne Gretzky 99
Jaromir Jagr 68
Bobby Orr 4
Bobby Hull 23
Brett Hull 16
Mario Lemieux 66
Steve Yzerman 19
Claude Lemieux 19
Mark Messier 11
Mats Sundin 13

Points
Name Points
Wayne Gretzky 244
Jaromir Jagr 168
Bobby Orr 129
Bobby Hull 93
Brett Hull 121
Mario Lemieux 189
Joe Sakic 94
Which of the following statements will display the player 's
Names, numbers an
D points for all players with an entry in both tables?
(Select the correct response)
A. SELECT names.names, names.number, points.points
FROM names INNER JOIN poin
ts ON names.name=points.name
B. SELECT names.name, names.number, points.points FROM
names FULL OUTER JOIN
points ON names.name=points.name
C. SELECT names.name, names.number, points.points
FROM names LEFT OUTER JOIN
points ON names.name=points.name
D. SELECT names.name, names.number, points.points
FROM names RIGHT OUTER JOIN
points ON names.name=points.name

(26/55) For which of the following database objects can locks be


obtained?
(Select the correct response)
A. View
B. Table
C. Trigger
D. Buffer Pool

(27/55) When granted to user1, which of the following will allow


user1 to ONLY access table data?
(Select the correct response)
A. DBADM authority
B. SYSADM authority
C. SELECT privilege on the table
D. SELECT privilege WITH GRANT OPTION on the table

(28/55) Given the following SQL statements:


CREATE TABLE tab1 (col1 INT)
CREATE TABLE tab2 (col1 INT)
INSERT INTO tab1 VALUES (NULL),(1)
INSERT INTO tab2 VALUES (NULL),(1)
SELECT COUNT(*) FROM tab1
WHERE col1 IN
(SELECT col1 FROM tab2)
Which of the following is the result of the SELECT COUNT(*)
statement?
(Select the correct response)
A. 1
B. 2
C. 3
D. 4
E. 0

(29/55) User2 has DBADM authority on database DB1. This


allows the user to do which of the following?
(Select the correct response)
A. Drop database DB1
B. Backup database DB1
C. Create tables in any database
D. Create tables in database DB1

(30/55) When establishing client-server communication,


passwords CANNOT be verified by:
(Select the correct response)
A. The DRDA DB2 server.
B. The client operating system.
C. The gateway operating system.
D. Looking in the catalog tables for the password.

(31/55) Given an application bound with cursor stability which


will be updating rows in a table and obtaining row locks, which of
the following table locks will DB2 acquire for the application
first?
(Select the correct response)
A. U – update
B. X – exclusive
C. IU - intent update
D. IX - intent exclusive

(32/55) The user USER1 is executing the statement


CREATE TABLE app1.table1 (col1 INT, col2 INT)
Which of the following privileges is required by USER1 for the
statement to be successful?
(Select the correct response)
A. CREATEIN for the database
B. CREATEIN for the schema app1
C. CREATEIN for the schema user1
D. CREATEIN for the table table1

(33/55) Which of the following can occur once connected to a


database or DRDA server with an explicit authorization name?
(Select the correct response)
A. Omit a user's password.
B. Change a user's password if the server supports this
function.
C. Omit the name of the database or DRDA server if it is
local.
D. Use the commit option on the connect statement to
commit in-doubt units of
work from a previous connection that was terminated.

(34/55) Given the two following table definitions:


ORG
Deptnumb INTEGER
Deptname CHAR(30)
Manager INTEGER
Division CHAR(30)
Location CHAR(30)

STAFF
Id INTEGER
Name CHAR(30)
Dept INTEGER
Job CHAR(20)
Years INTEGER
Salary DECIMAL(10,2)
Comm. DECIMAL(10,2)
Which of the following statements will display each department,
by name, and the total salary of all employees in the
department?
(Select the correct response)
A. SELECT a.deptname, SUM(b.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt ORDER BY a.deptname
B. SELECT b.deptname, SUM(a.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt ORDER BY a.deptname
C. SELECT a.deptname, SUM(b.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt GROUP BY a.deptname
D. SELECT b.deptname, SUM(a.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt GROUP BY a.deptname

(35/55) Given the following:


A table containing a list of all seats on an airplane. A seat
consists of a s
eat number and whether or not it is assigned. An airline agent
lists all the
unassigned seats on the plane. When the agent refreshes the list
from the tab
le, the list should not change.

Which of the following isolation levels should be used for this


application?

(Select the correct response)


A. Read stability
B. Repeatable read
C. Cursor stability
D. Uncommitted read

(36/55) The DB2 Administration Server (DAS) is required for


which of the fol
lowing?
(Select the correct response)
A. For the administrator user id to install or remove DB2
B. For the remote clients to use the Control Center against
the instance
C. For checking authorities in the database manager
configuration for SYSADM
D. For maintaining authorities added and removed by the
SQL GRANT and REVOKE
commands respectively

(37/55) Given the following scenario: An application uses a 15


digit value to uniquely identify customer transactions. This
number is also used for arithmetic operations. Which of the
following is the most efficient DB2 data type
for the column definition for this purpose?
(Select the correct response)
A. CHAR
B. CLOB
C. INTEGER
D. NUMERIC(15,2)
E. DECIMAL(15,0)

(38/55) Given a table T1, with a column C1 char(3), that


contains strings in
upper and lower case letters, which of the following queries will
find all r
ows where C1 is the string 'ABC' in any case?
(Select the correct response)
A. SELECT * FROM t1 WHERE c1 = 'ABC'
B. SELECT * FROM t1 WHERE UCASE(c1) = 'ABC'
C. SELECT * FROM t1 WHERE IGNORE_CASE(c1 = 'ABC')
D. SELECT * FROM t1 WHERE c1 = 'ABC' WITH OPTION
CASE INSENSITIVE

(39/55) Which two of the following SQL data types should be


used to store binary data?
(Select all that apply)
A. CLOB
B. BLOB
C. VARCHAR
D. GRAPHIC
E. VARCHAR FOR BIT DATA

(40/55) In which of the following locations are the referential


constraints stored?
(Select the correct response)
A. The user tables.
B. The explain tables.
C. SYSIBM.SYSTRIGGERS.
D. The system catalog tables.

(41/55) Which of the following is the result of the following SQL


statement:

ALTER TABLE table1 ADD col2 INT WITH DEFAULT


(Select the correct response)
A. The statement fails with a negative SQL code.
B. The statement fails because no default value is specified.
C. A new column called COL2 is added to TABLE1 and
populated with zeros.
D. A new column called COL2 is added to TABLE1 and
populated with nulls.

(42/55) A user creates the table TABLE1. Which of the following


statements would explicitly give USER1 the ability to read rows
from the table?
(Select the correct response)
A. GRANT VIEW TO user1 ON TABLE table1
B. GRANT READ TO user1 ON TABLE table1
C. GRANT SELECT ON TABLE table1 TO user1
D. GRANT ACCESS ON TABLE table1 TO user1

(43/55) Which of the following tools allows the DBA to set limits,
and be alerted if these limits are exceeded?
(Select the correct response)
A. DB2 Index Wizard
B. DB2 Script Center
C. DB2 Command Center
D. DB2 Performance Monitor

(44/55) Given the following embedded SQL programs:


Program 1:
Create table mytab (col1 int, col2 char(24))
Commit
Program 2:
Insert into mytab values ( 20989,'Joe Smith')
Commit
Insert into mytab values ( 21334,'Amy Johnson')
Delete from mytab
Commit
Insert into mytab values ( 23430,'Jason French')
Rollback
Insert into mytab values ( 20993,'Samantha Jones')
Commit
Delete from mytab where col1=20993
Rollback
Which of the following records will be returned by the statement
SELECT * FROM mytab?
(Select the correct response)
A. 20989, Joe Smith
B. 21334, Amy Johnson
C. 23430, Jason French
D. 20993, Samantha Jones
E. No records are returned

(45/55) Which of the following DB2 components allows the


analysis of multidimensional databases?
(Select the correct response)
A. DB2 Runtime Client
B. DB2 Control Center
C. DB2 OLAP Starter Kit
D. DB2 Spatial Extender
E. DB2 Performance Monitor

(46/55) Which of the following DB2 UDB isolation levels will


NOT lock any rows during read processing?
(Select the correct response)
A. Read Stability
B. Repeatable Read
C. Uncommited Read
D. Cursor Stability

(47/55) Given the following table definition:


STAFF
Id INTEGER
Name CHAR(20)
Dept INTEGER
Job CHAR(20)
Years INTEGER
Salary DECIMAL(10,2)
Comm DECIMAL(10,2)
Which of the following SQL statements will return the total
number of employees in each department and the corresponding
department id under the following conditions:
Only return departments with at least one employee receiving a
commission greater than 5000. The result should be sorted by
the department count from most to least.
(Select the correct response)
A. SELECT dept, COUNT(id) FROM staff WHERE comm >;
5000 GROUP BY dept ORDER BY 2 DESC
B. SELECT dept, COUNT(*) FROM staff GROUP BY dept
HAVING comm >; 5000 ORDER BY 2 DESC
C. SELECT dept, COUNT(*) FROM staff WHERE comm >;
5000 GROUP BY dept, comm ORDER BY 2 DESC
D. SELECT dept, comm, COUNT(id) FROM staff WHERE
comm >; 5000 GROUP BY dept, comm ORDER BY 3 DESC

(48/55) Which of the following utilities can examine a table and


its indexes and update the system catalogs with the table's
statistical information?
(Select the correct response)
A. runstats
B. getstats
C. check index
D. chkstats

(49/55) Which of the following Control Center options shows the


dependencies between a specific view and its tables?
(Select the correct response)
A. Show SQL
B. Show Related
C. Sample Contents
D. Customize Columns

(50/55) Given the table COUNTRY and the statements below


COUNTRY
ID NAME PERSON_ID CITIES
1 Argentina 1 10
2 Canada 2 20
3 Cuba 2 10]
4 Germany 1 0
5 France 7 5
DECLARE c1 CURSOR WITH HOLD FOR SELECT * FROM country
ORDER BY person_id, nam
e
OPEN c1
FETCH c1
FETCH c1
COMMIT
FETCH c1
Which of the following is the last name obtained from the table?
(Select the correct response)
A. Cuba
B. France
C. Canada
D. Germany
E. Argentina

(51/55) To set up a client that can access DB2 UDB through


DB2 Connect Enterprise Edition, which of the following is the
minimum software client that must be installed?
(Select the correct response)
A. DB2 Runtime Client
B. DB2 Personal Edition
C. DB2 Administration Client
D. DB2 Application Developer's Client

(52/55) Which of the following authorities should be given to the


DB2 Administration Server (DAS) Instance owner at the
administered instance?
(Select the correct response)
A. DBADM
B. SYSADM
C. SYSCTRL
D. SYSMAINT

(53/55) For a clustering index to be effective in keeping the data


in order,which of the following parameters must be set correctly
for the index?
(Select the correct response)
A. FREE ROWS
B. PERCENT FREE
C. CLUSTERRATIO
D. CLUSTER FACTOR

(54/55) Which of the following processing can occur for a unit of


work using an isolation level of Read Stability and scanning
through the table more than once within the unit of work?
(Select the correct response)
A. Access uncommitted changes made by other processes
B. Update uncommitted changes made by other processes
C. Rows added to a result set by other processes from one
scan to the next
D. Rows changed in a result set by other processes from one
scan to the next

(55/55) Given a table T1, with a column C1 char(3), that


contains strings in
upper and lower case letters, which of the following queries will
find all r
ows where C1 is the string 'ABC' in any case?
(Select the correct response)
A. SELECT * FROM t1 WHERE c1 = 'ABC'
B. SELECT * FROM t1 WHERE UCASE(c1) = 'ABC'
C. SELECT * FROM t1 WHERE IGNORE_CASE(c1 = 'ABC')
D. SELECT * FROM t1 WHERE c1 = 'ABC' WITH OPTION
CASE INSENSITIVE

(1/55) When granted to user1, which of the following will allow


user1 to only
Access table data?
(Select the correct response)
A. Dbadm authority
B. Sysadm authority
C. Select privilege on the table
D. Select privilege with grant option on the table

(2/55) J. the statement :


Create table t1
(
Cl Michael secret Null,
C2 Michael,
Sha key (cl)
Unit key (c2) references t2
)
How many non-unique indexes are defined for table t1?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3

(3/55) Which two of the following groups are authorized to DB2


authorization
Create a database table within sample?
(Select all that apply)

A. Dbadm
B. Dbctrl
C. Sysadm
D. Dbmaint
E. Alterin
F. Sysmaint

(4/55) J. the following table definition :


Staff
Id Michael
Name Char (20)
Dept Michael
Mr. job (20)
Years Michael
Salary Decimal (10,2)
Environmental Decimal (10,2)

The job description column contains these types : � 鐞 �, clerk,


and salesperson. Newt
Ch of the following statements will return the data with all
managers togethe
R, all clerks together and all salespeople together in the output?
(Select the correct response)
A. Select * from staff designs feature job
B. Select job, name from staff group by name, job
C. Select * from staff group by name, description, id, dept,
years, salary, comm

D. Select * from staff designs feature name, description, id, dept,


years, salary, comm

(5/55) Which of the following describes why savepoints are


merely allowed inside an atomic unit of work?
(Select the correct response)
A. Band units of work layered multiple databases, but savepoints
are limi
Ted to units of work which operate on a single database.
B. A savepoint implies that a subset of the work may be allowed
to succeEd, while atomic operations must succeed or fail as a
unit.
C. A savepoint requires an explicit commit to be released, and
commit stAtements are not allowed in atomic operations such as
compound SQL.
D. A savepoint generation be created without an active
connection to a databAse, but atomic operations can contain a
connect as a sub-statement.

(6/55) J. the two following tables :


Names
Name Number
Wayne Gretzky 99
Jaromir Jagr 68
Bobby Orr 4
Bobby Hull 23
Brett Hull 16
Mario Lemieux 66
Steve Yzerman 19
Claude Lemieux 19
Mark Messier 11
Mats Sundin 13

Points
Name Points
Wayne Gretzky 244
Jaromir Jagr 168
Bobby Orr 129
Bobby Hull 93
Brett Hull 121
Mario Lemieux 189
Joe Sakic 94

Which of the following statements will display the player 's


Names, numbers an
D points for all players with an entry in both tables?
(Select the correct response)
A. Select names.names, names.number, points.points from
names inner join
Points on names.name=points.name
B. Select names.name, names.number, points.points from names
full outer
Join points on names.name=points.name
C. Select names.name, names.number, points.points from left
outer names
Join points on names.name=points.name
D. Select names.name, names.number, points.points names
right from outer
Join points on names.name=points.name

(7/55) J. the following scenario : An application uses a 15 digit


value to
Uniquely identify oriented transactions. This number is also used
for arithm
Etic operations. Which of the following is the most efficient DB2
data type f
Or the definition for this column purpose?
(Select the correct response)
A. Mr.
B. Clob
C. Michael
D. Numeric (15,2)
E. Decimal (15,0)

(8/55) Which of the following can be accomplished with a single


update stateMent?
(Select the correct response)
A. Updating multiple tables
B. Updating a view consisting of joined tables
C. Updating multiple tables based on a where clause
D. Updating a table based on a sub-select using joined tables

(9/55) J. the tables:COUNTRY


ID name person cities
1 Argentina 1 10
2 Canada 2 20
3 Cuba 2 10
4 Germany 1 0
7 5 5 France

Staff
ID LastName
1 Jones
2 Smith

The statement :
Select * from staff, country
Will return how many rows?
(Select the correct response)
A. 2
B. 4
C. 5
D. 7
E. 10

(10/55) a user creates the table TABLE1. Which of the following


statements w
Ould explicitly give USER1 the ability to read rows from the
table?
(Select the correct response)
A. Mr. view on table table1 table user1
B. Mr. � WTO user1 on table table1
C. Grant select on table table1 table user1
D. Grant access on table table1 table user1

(11/55) J. the following :


A table containing a list of all known on an airplane. A seat
consists of as
Eat number and whether or not it is assigned. An airline agent
lists all the
Unassigned known on the incident. When the agent refreshes the
list from the tab
Le, the list should not change.

Which of the following isolation levels should be used for this


application?

(Select the correct response)


A. Read stability
B. Repeatable read
C. Cursor stability
D. Uncommitted read

(12/55) Which of the following options Control Center shows the


dependencies
Between a specific view and its tables?
(Select the correct response)
A. Show SQL
B. Show Related
C. Haphazard Contents
D. Customize Columns

(13/55) J. TAB2 the following:TAB1


C1 C2 flight fees
-- -- -- --
A 11 a 21
C 22 B 12
C 13 D 23

The following results are desired:C1 C2 flight fees


-- -- -- --
A 11 a 21
B 12--
C 13 C 22
Which of the following joins will yield the desired results?
(Select the correct response)
A. Select * from tab1, tab2 where c1=cx
B. Select * from tab1 inner join tab2 on c1=cx
C. Select * from tab1 full outer join tab2 on c1=cx
D. Select * from tab1 left outer join tab2 on c1=cx
(14/55) To set up a 瀹 ㈡ 埗 that can access DB2 UDB through
DB2 Connect Enter
Prise Edition, which of the following is the minimum software 瀹
㈡ 埗 that Dayr
T be installed?
(Select the correct response)
A. DB2 Runtime Client
B. DB2 Personal Edition
C. DB2 Administration Client
D. DB2 Application Developer 's Client

(15/55) The user is executing the statement USER1


Create table app1.table1 (col1 Int, col2 INT)
Which of the following privileges is required by USER1 for the
statement to b
E successful?
(Select the correct response)
A. Createin for the database
B. Createin for the schema app1
C. Createin for the schema user1
D. Createin for the table table1

(16/55) Which of the following DB2 components allows the


analysis of multidi
Mensional databases?
(Select the correct response)
A. DB2 Runtime Client
B. DB2 Control Center
C. DB2 OLAP Starter Kit
D. DB2 Spatial Extender
E. DB2 Performance Monitor

(17/55) Which of the following tools can be used to identify


inefficient SQL
Doubtful without executing the query?
(Select the correct response)
A. QMF
B. Script Center
C. Visual Explain
D. Performance Monitor

(18/55) When establishing client-server communication,


passwords cannot be v
Erified by :
(Select the correct response)
A. The DRDA DB2 server.
B. The 瀹 ㈡ 埗 鐞 嬪  system.
C. The gateway 鐞 嬪  system.
D. Life in the catalog tables for the password.

(19/55) Which two of the following SQL data types should be


used to store bi
Nary data?
(Select all that apply)
A. Clob
B. Blob
C. Varchar
D. Graphic
E. Varchar for bit data

(20/55) Which of the following occurs if an application due


abnormally duri
Ng an active unit of work?
(Select the correct response)
A. Current unit of work is committed
B. Current unit of work is rolled back
C. Current unit of work remains active
D. Current unit of work moves to pending state

(21/55) Which of the following products can be used to generate


Extensible M
Arkup Language documents from DB2 tables?
(Select the correct response)
A. Net Search
B. XML Extender
C. Avi Extender
D. Text Extender

(22/55) Which of the following SQL statements can remove all


rows from a tab
Le named COUNTRY?
(Select the correct response)
A. Delete country
B. Delete from country
C. Delete * from country
D. Delete from country Souls

(23/55) J. the statement :


Create table t1
(
Cl Char (3)
Constraint cl
Check (cl in ( 'A01', 'B01', 'C01'))
)
DB2 verifies that the table check constraint is met during which
of the follo
Wing actions?
(Select the correct response)
A. Adding data using load
B. The reorg of the table
C. The insert of each row in t1
D. The creation of the index for the table

(24/55) J. the following DDL statement :


Create table newtab1 like tab1
Which of the following would occur as a result of the statement
execution?
(Select the correct response)
A. NEWTAB1 has same triggers as TAB1
B. NEWTAB1 is populated with TAB1 data
C. NEWTAB1 has the same primary key as TAB1
D. NEWTAB1 columns have same attributes as TAB1

(25/55) Which of the following authorities should be given to the


DB2 Admini
stration Server (DAS) Instance owner at the administered
instance?
(Select the correct response)
A. DBADM
B. SYSADM
C. SYSCTRL
D. SYSMAINT

(26/55) Which of the following is the result of the following SQL


statement:
ALTER TABLE table1 ADD col2 INT WITH DEFAULT
(Select the correct response)
A. The statement fails with a negative SQL code.
B. The statement fails because no default value is specified.
C. A new column called COL2 is added to TABLE1 and
populated with zeros.

D. A new column called COL2 is added to TABLE1 and


populated with nulls.

E. A new column called COL2, which cannot contain nulls, is


added to TAB
LE1.

(27/55) Given the following table definition:


STAFF
id INTEGER
name CHAR(20)
dept INTEGER
job CHAR(20)
years INTEGER
salary DECIMAL(10,2)
comm DECIMAL(10,2)

Which of the following SQL statements will return the total


number of employe
es in each department and the corresponding department id
under the following
conditions:
Only return departments with at least one employee receiving a
commission gre
ater than 5000. The result should be sorted by the department
count from most
to least.
(Select the correct response)
A. SELECT dept, COUNT(id) FROM staff WHERE comm >;
5000 GROUP BY dept ORD
ER BY 2 DESC
B. SELECT dept, COUNT(*) FROM staff GROUP BY dept
HAVING comm >; 5000 ORD
ER BY 2 DESC
C. SELECT dept, COUNT(*) FROM staff WHERE comm >; 5000
GROUP BY dept, com
m ORDER BY 2 DESC
D. SELECT dept, comm, COUNT(id) FROM staff WHERE comm
>; 5000 GROUP BY de
pt, comm ORDER BY 3 DESC

(28/55) Which of the following Control Center features can be


used to update
information for the optimizer to choose the best path to data?
(Select the correct response)
A. Show Related
B. Generate DDL
C. Run Statistics
D. Reorganize Table

(29/55) Which of the following can occur once connected to a


database or DRD
A server with an explicit authorization name?
(Select the correct response)
A. Omit a user's password.
B. Change a user's password if the server supports this
function.
C. Omit the name of the database or DRDA server if it is local.

D. Use the commit option on the connect statement to


commit in-doubt uni
ts of work from a previous connection that was terminated.

(30/55) If a DB2 Warehouse Manager toolkit is selected during


the installati
on of DB2 UDB Version 7.1, which of the following databases
must be defined?

(Select the correct response)


A. None
B. Target Database
C. Source Database
D. Control Database

(31/55) Which of the following CANNOT be used to restrict


specific values fr
om being inserted into a column in a particular table?
(Select the correct response)
A. view
B. index
C. check constraint
D. referential constraint

(32/55) For which of the following database objects can locks be


obtained?
(Select the correct response)
A. View
B. Table
C. Trigger
D. Buffer Pool

(33/55) Which of the following types of DB2 locks allows for the
most concur
rency within a table?
(Select the correct response)
A. A row lock
B. A page lock
C. A field lock
D. A column lock

(34/55) Given the following embedded SQL programs:


Program 1:
Create table mytab (col1 int, col2 char(24))
Commit
Program 2:
Insert into mytab values ( 20989,'Joe Smith')
Commit
Insert into mytab values ( 21334,'Amy Johnson')
Delete from mytab
Commit
Insert into mytab values ( 23430,'Jason French')
Rollback
Insert into mytab values ( 20993,'Samantha Jones')
Commit
Delete from mytab where col1=20993
Rollback
Which of the following records will be returned by the statement
SELECT * FROM mytab?
(Select the correct response)
A. 20989, Joe Smith
B. 21334, Amy Johnson
C. 23430, Jason French
D. 20993, Samantha Jones
E. No records are returned

(35/55) Given a table T1, with a column C1 char(3), that


contains strings in
upper and lower case letters, which of the following queries will
find all r
ows where C1 is the string 'ABC' in any case?
(Select the correct response)
A. SELECT * FROM t1 WHERE c1 = 'ABC'
B. SELECT * FROM t1 WHERE UCASE(c1) = 'ABC'
C. SELECT * FROM t1 WHERE IGNORE_CASE(c1 = 'ABC')
D. SELECT * FROM t1 WHERE c1 = 'ABC' WITH OPTION CASE
INSENSITIVE

(36/55) In which of the following locations are the referential


constraints
stored?
(Select the correct response)
A. The user tables.
B. The explain tables.
C. SYSIBM.SYSTRIGGERS.
D. The system catalog tables.

(37/55) Given the table T1 created by:


CREATE TABLE t1
(
id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY,
c1 CHAR(10) NOT NULL,
c2 CHAR(10)
)
Which of the following INSERT statements will succeed?
(Select the correct response)
A. INSERT INTO t1 VALUES (1, 'abc', NULL)
B. INSERT INTO t1 VALUES (1, NULL, 'def')
C. INSERT INTO t1 (c1, c2) VALUES ('abc', NULL)
D. INSERT INTO t1 (c1, c2) VALUES (NULL, 'def')

(38/55) For a clustering index to be effective in keeping the data


in order,
which of the following parameters must be set correctly for the
index?
(Select the correct response)
A. FREE ROWS
B. PERCENT FREE
C. CLUSTERRATIO
D. CLUSTER FACTOR

(39/55) Which of the following is NOT a valid data type on


CREATE TABLE?
(Select the correct response)
A. CLOB
B. DOUBLE
C. NUMERIC
D. DATETIME

(40/55) User2 has DBADM authority on database DB1. This


allows the user to d
o which of the following?
(Select the correct response)
A. Drop database DB1
B. Backup database DB1
C. Create tables in any database
D. Create tables in database DB1

(41/55) Which of the following describes when indexes can be


explicitly refe
renced by name within an SQL statement?
(Select the correct response)
A. When dropping the index
B. When updating the index
C. When selecting on the index
D. When inserting using the index

(42/55) The DB2 Administration Server (DAS) is required for


which of the following?
(Select the correct response)
A. For the administrator user id to install or remove DB2
B. For the remote clients to use the Control Center against
the instance

C. For checking authorities in the database manager


configuration for SYSADM
D. For maintaining authorities added and removed by the SQL
GRANT and REVOKE commands respectively

(43/55) Which of the following tasks can be performed using the


ALTER TABLES
PACE statement?
(Select the correct response)
A. Assign a bufferpool.
B. Change the table space name.
C. Change the type of the table space.
D. Change the page size of the table space.

(44/55) Given the tables:

TABLEA TABLEB
empid name empid weeknumber paycheck
1 JOE 1 1 1000.00
2 BOB 1 2 1000.00
2 1 2000.00

TABLEB was defined as follows:


CREATE TABLE tableb (empid CHAR(3), weeknumber CHAR(3),
paycheck DECIMAL(6,2)
,
CONSTRAINT const1 FOREIGN KEY (empid)
REFERENCES tablea (empid) ON DELETE SET NULL)
How many rows would be deleted from tableb if the following
command is issued
:
DELETE FROM tablea WHERE empid = '2'?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3

(45/55) Given an embedded SQL program with a single


connection, two threads
and the following actions:
Thread 1: INSERT INTO mytab VALUES (...)
Thread 2: INSERT INTO mytab VALUES (...)
Thread 1: ROLLBACK
Thread 2: INSERT INTO mytab VALUES (...)
Thread 1: COMMIT
How many records will be successfully inserted into the table
mytab?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3

(46/55) Given the two following table definitions:


ORG
deptnumb INTEGER
deptname CHAR(30)
manager INTEGER
division CHAR(30)
location CHAR(30)

STAFF
id INTEGER
name CHAR(30)
dept INTEGER
job CHAR(20)
years INTEGER
salary DECIMAL(10,2)
comm DECIMAL(10,2)

Which of the following statements will display each department,


by name, and
the total salary of all employees in the department?
(Select the correct response)
A. SELECT a.deptname, SUM(b.salary) FROM org a, staff b
WHERE a.deptnumb
=b.dept ORDER BY a.deptname
B. SELECT b.deptname, SUM(a.salary) FROM org a, staff b
WHERE a.deptnumb
=b.dept ORDER BY a.deptname
C. SELECT a.deptname, SUM(b.salary) FROM org a, staff b
WHERE a.deptnumb
=b.dept GROUP BY a.deptname
D. SELECT b.deptname, SUM(a.salary) FROM org a, staff b
WHERE a.deptnumb
=b.dept GROUP BY a.deptname

(47/55) Which of the following processing can occur for a unit of


work using an isolation level of Read Stability and scanning
through the table more than once within the unit of work?
(Select the correct response)
A. Access uncommitted changes made by other processes
B. Update uncommitted changes made by other processes
C. Rows added to a result set by other processes from one
scan to the next
D. Rows changed in a result set by other processes from one
scan to the next

(48/55) Which of the following DB2 UDB isolation levels will NOT
lock any rows during read processing?
(Select the correct response)
A. Read Stability
B. Repeatable Read
C. Uncommited Read
D. Cursor Stability

(49/55) With DBADM authority on the database and given the


statements:
CREATE TABLE t1 (c1 CHAR(1))
INSERT INTO t1 VALUES ('b')
CREATE VIEW v1 AS SELECT c1 FROM t1 WHERE c1 ='a'
INSERT INTO v1 VALUES ('a')
INSERT INTO v1 VALUES ('b')
How many rows would be returned from the statement, SELECT
c1 FROM t1?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3

(50/55) Which of the following tools allows the DBA to set limits,
and be alerted if these limits are exceeded?
(Select the correct response)
A. DB2 Index Wizard
B. DB2 Script Center
C. DB2 Command Center
D. DB2 Performance Monitor

(51/55) Which of the following utilities can examine a table and


its indexes and update the system catalogs with the table's
statistical information?
(Select the correct response)
A. runstats
B. getstats
C. check index
D. chkstats

(52/55) Given the following SQL statements:


CREATE TABLE tab1 (col1 INT)
CREATE TABLE tab2 (col1 INT)
INSERT INTO tab1 VALUES (NULL),(1)
INSERT INTO tab2 VALUES (NULL),(1)
SELECT COUNT(*) FROM tab1
WHERE col1 IN
(SELECT col1 FROM tab2)
Which of the following is the result of the SELECT COUNT(*)
statement?
(Select the correct response)
A. 1
B. 2
C. 3
D. 4
E. 0
(53/55) Given an application bound with cursor stability which
will be updat
ing rows in a table and obtaining row locks, which of the
following table loc
ks will DB2 acquire for the application first?
(Select the correct response)
A. U - update
B. X - exclusive
C. IU - intent update
D. IX - intent exclusive

(54/55) Given the table COUNTRY and the statements below:


COUNTRY
ID NAME PERSON_ID CITIES
1 Argentina 1 10
2 Canada 2 20
3 Cuba 2 10
4 Germany 1 0
5 France 7 5

DECLARE c1 CURSOR WITH HOLD FOR SELECT * FROM country


ORDER BY person_id, nam
e
OPEN c1
FETCH c1
FETCH c1
COMMIT
FETCH c1
Which of the following is the last name obtained from the table?
(Select the correct response)
A. Cuba
B. France
C. Canada
D. Germany
E. Argentina

(55/55) Given two embedded SQL program executions with the


following actions
:
Pgm1
INSERT INTO mytab VALUES (...)
COMMIT
INSERT INTO mytab VALUES (...)
ROLLBACK

Pgm2
INSERT INTO mytab VALUES (...)

ROLLBACK
INSERT INTO mytab VALUES (...)
COMMIT
How many records will be successfully inserted and retained in
the table mytab?
(Select the correct response)
A. 1
B. 2
C. 3
D. 4

1. With Dbadm authority on the database and given the


statements :
Create table t1 (cl Char (1))
Insert into t1 values ( 'b')
Create view v1 as select cl from t1 where c1= 'a' with check
option
Insert into v1 values ( 'a')
INSERT INTO v1 VALUES ('b')
How many rows would be returned from the statement, the
select from t1? cl
(Select the correct response)
A.0
B.1
C.2
D.3

2. Which of the following Control Center features can be used to


update infor
Mation for the optimizer to choose the best path to data?
(Select the correct response)
A Show Related
B. Generate DDL
C. Run Statistics
D. Reengineer Table

3. J. the tables :
Tablea Tableb
Empid name empid weeknumber paycheck
1 1 1 1000.00 Joe
1 2 2 Bob 1000.00
2 1 1000.00
Tableb was defined as follows :
Create table tableb (empid Char (3), weeknumber Char (3),
paycheck Decimal (6,2)
,
Constraint const1 unit key (empid)
References tablea (empid) on delete set null)
How many rows would be deleted from tableb if the following
command is issued
:
Delete from tablea where empid = 'two'?
(Select the correct response)
A.0
B.1
C.2
D.3

4. Which of the following DB2 UDB isolation levels will merely


install any rows dur
Networking read processing?
(Select the correct response)
A. Read Stability
B. Repeatable Read
C. Uncommited Read
D. Cursor Stability

5. Which of the following processing can occur for a unit of work


is using an
Olation level of Read Stability and scanning through the table
more than once
Within the unit of work?
(Select the correct response)
A. Access uncommitted changes made by other processes
B. Update uncommitted changes made by other processes
C. Rows added to a result set by other processes from one scan
to the next
D. Rows changed in a result set by other processes from one
scan to the next

6. Which of the following describes when indexes can be explicitly


referenced
By name within an SQL statement?
(Select the correct response)
A. When the index dropping
B. When updating the index
C. When selecting on the index
D. When inserting using the index

7. Ulrich an embedded SQL program with a single connection, the


two threads and 85th
E following actions :
Thread 1 : mytab insert into values (. . . )
Thread 2 : mytab insert into values (. . . )
Thread 1 : commit
Thread 2 : mytab insert into values (. . . )
Thread 1 : rollback
How many records will be successfully inserted and retained in
the table myta
B?
(Select the correct response)
A.0
B.1
C.2
D.3

8. A user creates the table TABLE1. Which of the following


statements would e
Xplicitly give USER1 the ability to read rows from the table?
(Select the correct response)
A. Mr. view on table table1 table user1
B. Mr. � WTO user1 on table table1
C. Grant select on table table1 table user1
D. Grant access on table table1 table user1
9. J. the following :
TAB1 TAB2
C1 C2 flight fees
--- --- --- ---
A 11 a 21
C 22 B 12
C 13 D 23
The following results are desired :
C1 C2 flight fees
-- -- -- --
A 11 a 21
B 12 -- --
C 13 C 22
Which of the following joins will yield the desired results?
(Select the correct response)
A. Select * from tab1, tab2 where c1=cx
B. Select * from tab1 inner join tab2 on c1=cx]
C. Select * from tab1 full outer join tab2 on c1=cx
D. Select * from tab1 left outer join tab2 on c1=cx

10. J. the following scenario : An application uses a 15 digit value


to uni
Quely identify oriented transactions. This number is also used for
arithmetic
Operations. Which of the following is the most efficient DB2 data
type for t
He definition for this column purpose?
(Select the correct response)
A. Mr.
B. Clob
C. Michael
D. Numeric (15,2)
E. Decimal (15,0)

11. Ulrich created by the table T1 :


Create table t1
(
Id Michael secret null generated always as identity,
Cl Char (10) merely Null,
C2 Char (10)
)
Which of the following INSERT statements will succeed?
(Select the correct response)
A. Insert into t1 values (1, 'abc', Null)
B. Insert into t1 values (1, null, 'def')
C. Insert into t1 (cl, c2) values ( 'abc', Null)
D. Insert into t1 (cl, c2) values (null, 'def')

12. Which of the following tools allows the DBA to set limits, and
be alerted
If these limits are exceeded?
(Select the correct response)
A. DB2 Index Wizard
B. DB2 Script Center
C. DB2 Command Center
D. DB2 Performance Monitor

13. To set up a 瀹 ㈡ 埗 that can access DB2 UDB through DB2


Connect Enterprise
511-525, which of the following is the minimum that must be
software 瀹 ㈡ 埗
Installed?
(Select the correct response)
A DB2 Runtime Client
B. DB2 Personal Edition
C. DB2 Administration Client
D. DB2 Application Developer 's Client

14. Which of the following describes why savepoints are merely


allowed inside an
Atomic unit of work?
(Select the correct response)
A. Band units of work layered multiple databases, but savepoints
are limited t
O units of work which operate on a single database.
B. A savepoint implies that a subset of the work may be allowed
to succeed, w
Hile atomic operations must succeed or fail as a unit.
C. A savepoint requires an explicit commit to be released, and
commit stateme
Devices are not allowed in atomic operations such as compound
SQL.
D. A savepoint generation be created without an active
connection to a database,
But atomic operations can contain a connect as a sub-statement.

15. J. the following table definition :


Staff
Id Michael
Name Char (20)
Dept. Michael
Job Char (20)
Years Michael
Salary Decimal (10,2)
V.. Decimal (10,2)
The job description column contains these types : � 鐞 �, clerk,
and salesperson. Newt
Ch of the following statements will return the data with all
managers togethe
R, all clerks together and all salespeople together in the output?
(Select the correct response)
A. Select * from staff designs feature job
B. Select job, name from staff group by name, job
C. Select * from staff group by name, description, id, dept,
years, salary, comm.
D. Select * from staff designs feature name, description, id, dept,
years, salary, comm.

16. The user is executing the statement USER1


Create table app1.table1 (col1 Int, col2 INT)
Which of the following privileges is required by USER1 for the
statement to b
E successful?
(Select the correct response)
A. Createin for the database
B. Createin for the schema app1
C. Createin for the schema user1
D. Createin for the table table1

17. Which of the following DB2 components allows the analysis of


multidimensi
Onal databases?
(Select the correct response)
A. DB2 Runtime Client
B. DB2 Control Center
C. DB2 OLAP Starter Kit
D. DB2 Spatial Extender
E. DB2 Performance Monitor

18. Which of the following utilities can examine a table and its
indexes and
Update the system catalogs with the table 's statistical
information?
(Select the correct response
A. Runstats
B. Getstats
C. Check index
D. Chkstats

19. In which of the following locations are the referential


constraints store
D?
(Select the correct response)
A. The user tables.
B. The explain tables.
C. SYSIBM.SYSTRIGGERS.
D. The system catalog tables.

20. Which two of the following SQL data types should be used to
store binary
Data?
(Select all that apply
A. Clob
B. Blob
C. Varchar
D. Graphic
E. Varchar for bit data

21. J. the two following tables :


Names
Name number
Wayne Gretzky 99
Jaromir Jagr 68
Bobby Orr 4
Bobby Hull 23
Brett Hull 16
Mario Lemieux 66
Steve Yzerman 19
Claude Lemieux 19
Mark Messier 11
Mats Sundin 13

Points
Name points
Wayne Gretzky 244
Jaromir Jagr 168
Bobby Orr 129
Bobby Hull 93
Brett Hull 121
Mario Lemieux 189
Joe Sakic 94
Which of the following statements will display the player 's
Names, numbers an
D points for all players with an entry in both tables?
(Select the correct response)
A. Select names.names, names.number, points.points from
names inner join poin
T on names.name=points.name
B. Select names.name, names.number, points.points from names
full outer join
Points on names.name=points.name
C. Select names.name, names.number, names points.points from
left outer join
Points on names.name=points.name
D. Select names.name, names.number, points.points names
right from outer join
Points on names.name=points.name

22. Which two of the following DB2 authorization groups are


authorized to cre
ate a table within database sample?
(Select all that apply)
A DBADM
B. DBCTRL
C. SYSADM
D. DBMAINT
E. ALTERIN
F. SYSMAINT

23. Which of the following is the result of the following SQL


statement:
ALTER TABLE table1 ADD col2 INT WITH DEFAULT
(Select the correct response)
A The statement fails with a negative SQL code
B. The statement fails because no default value is specified..
C A new column called COL2 is added to TABLE1 and populated
with zeros.
D. A new column called COL2 is added to TABLE1 and populated
with nulls.
E. A new column called COL2, which cannot contain nulls, is
added to TABLE1.

24. Which of the following authorities should be given to the DB2


Administration Server (DAS) Instance owner at the administered
instance?
(Select the correct response)
A. DBADM
B. SYSADM
C. SYSCTRL
D. SYSMAINT

25. Which of the following products can be used to generate


Extensible Markup
Language documents from DB2 tables?
(Select the correct response)
A. Net Search
B. XML Extender
C. AVI Extender
D. Text Extender.

26. Which of the following can be accomplished with a single


UPDATE statement
?
(Select the correct response)
A. Updating multiple tables
B. Updating a view consisting of joined tables
C. Updating multiple tables based on a WHERE clause
D. Updating a table based on a sub-select using joined tables

27. Given two embedded SQL program executions with the


following actions:
Pgm1
INSERT INTO mytab VALUES (...)
COMMIT
INSERT INTO mytab VALUES (...)
ROLLBACK

Pgm2
INSERT INTO mytab VALUES (...)
ROLLBACK
INSERT INTO mytab VALUES (...)
COMMIT
How many records will be successfully inserted and retained in
the table myta
b?
(Select the correct response)
A.1
B.2
C.3
D.4

28. Given the following:


A table containing a list of all seats on an airplane. A seat
consists of a s
eat number and whether or not it is assigned. An airline agent
lists all the
unassigned seats on the plane. When the agent refreshes the list
from the tab
le, the list should not change.
Which of the following isolation levels should be used for this
application?

(Select the correct response)


A. Read stability
B. Repeatable read
C. Cursor stability
D. Uncommitted read

29. Which of the following Control Center options shows the


dependencies betw
een a specific view and its tables?
(Select the correct response
A. Show SQL
B. Show Related
C. Sample Contents
D. Customize Columns

30. Given the following SQL statements:


CREATE TABLE tab1 (col1 INT)
CREATE TABLE tab2 (col1 INT)
INSERT INTO tab1 VALUES (NULL),(1)
INSERT INTO tab2 VALUES (NULL),(1)
SELECT COUNT(*) FROM tab1
WHERE col1 IN
(SELECT col1 FROM tab2)
Which of the following is the result of the SELECT COUNT(*)
statement?
(Select the correct response)
A.1
B.2
C.3
D.4
E.0

31. Given the table:


COUNTRY
ID NAME PERSON CITIES
1 Argentina 1 10
2 Canada 2 20
3 Cuba 2 10
4 Germany 1 0
5 France 7 5
DECLARE c1 CURSOR WITH HOLD FOR SELECT * FROM country
ORDER BY person_id, nam
e
OPEN c1
FETCH c1
FETCH c1
COMMIT
FETCH c1
Which of the following is the last name obtained from the table?
(Select the correct response)
A. Cuba
B. France
C. Canada
D. Germany
E. Argentina

32. Given the following table definition:


STAFF
Id INTEGER
Name CHAR(20)
Dept INTEGER
Job CHAR(20)
Years INTEGER
Salary DECIMAL(10,2)
Comm. DECIMAL(10,2)
Which of the following SQL statements will return the total
number of employe
es in each department and the corresponding department id
under the following
conditions:
Only return departments with at least one employee receiving a
commission gre
ater than 5000. The result should be sorted by the department
count from most
to least.
(Select the correct response)
A. SELECT dept, COUNT(id) FROM staff WHERE comm >;
5000 GROUP BY dept ORDER BY
2 DESC
B. SELECT dept, COUNT(*) FROM staff GROUP BY dept
HAVING comm >; 5000 ORDER BY
2 DESC
C. SELECT dept, COUNT(*) FROM staff WHERE comm >;
5000 GROUP BY dept, comm ORD
ER BY 2 DESC
D. SELECT dept, comm, COUNT(id) FROM staff WHERE
comm >; 5000 GROUP BY dept, c
omm ORDER BY 3 DESC

33. Given the statement:


CREATE TABLE t1
(
c1 CHAR(3)
CONSTRAINT c1
CHECK (c1 IN ('A01','B01','C01'))
)
DB2 verifies that the table check constraint is met during which
of the follo
wing actions?
(Select the correct response)
A. Adding data using load
B. The reorg of the table
C. The insert of each row in t1
D. The creation of the index for the table

34. Which of the following can occur once connected to a


database or DRDA ser
ver with an explicit authorization name?
(Select the correct response)
A. Omit a user's password.
B. Change a user's password if the server supports this function.
C. Omit the name of the database or DRDA server if it is local.
D. Use the commit option on the connect statement to commit
in-doubt units of
work from a previous connection that was terminated.

35. User2 has DBADM authority on database DB1. This allows the
user to do which of the following?
(Select the correct response)
A. Drop database DB1
B. Backup database DB1
C. Create tables in any database
D. Create tables in database DB1

36. When establishing client-server communication, passwords


CANNOT be verified by:
(Select the correct response)
A. The DRDA DB2 server.
B. The client operating system.
C. The gateway operating system.
D. Looking in the catalog tables for the password.

37. Given the table:


COUNTRY
ID NAME PERSON CITIES
1 Argentina 1 10
2 Canada 2 20
3 Cuba 2 10
4 Germany 1 0
5 France 7 5
STAFF
ID LASTNAME
1 Jones
2 Smith
The statement:
SELECT * FROM staff, country
will return how many rows?
(Select the correct response)
A.2
B.4
C.5
D.7
E10

38.For a clustering index to be effective in keeping the data in


order, whic
h of the following parameters must be set correctly for the
index?
(Select the correct response)
A. FREE ROWS
B. PERCENT FREE
C. CLUSTERRATIO
D. CLUSTER FACTOR

39. Given the two following table definitions:


ORG
Deptnumb INTEGER
Deptname CHAR(30)
Manager INTEGER
Division CHAR(30)
Location CHAR(30)

STAFF
Id INTEGER
Name CHAR(30)
Dept INTEGER
Job CHAR(20)
Years INTEGER
Salary DECIMAL(10,2)
Comm. DECIMAL(10,2)
Which of the following statements will display each department,
by name, and
the total salary of all employees in the department?
(Select the correct response)
A. SELECT a.deptname, SUM(b.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt ORDER BY a.deptname
B. SELECT b.deptname, SUM(a.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt ORDER BY a.deptname
C. SELECT a.deptname, SUM(b.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt GROUP BY a.deptname
D. SELECT b.deptname, SUM(a.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt GROUP BY a.deptname

40. Which of the following occurs if an application ends


abnormally during an
active unit of work?
(Select the correct response)
A. Current unit of work is committed
B. Current unit of work is rolled back
C. Current unit of work remains active
D. Current unit of work moves to pending state

41. For which of the following database objects can locks be


obtained?
(Select the correct response)
A. View
B. Table
C. Trigger
D. Buffer Pool

42. Given the following DDL statement:


CREATE TABLE newtab1 LIKE tab1
Which of the following would occur as a result of the statement
execution?
(Select the correct response)
A. NEWTAB1 has same triggers as TAB1
B. NEWTAB1 is populated with TAB1 data
C. NEWTAB1 has the same primary key as TAB1
D. NEWTAB1 columns have same attributes as TAB1

43. When granted to user1, which of the following will allow


user1 to ONLY ac
cess table data?
(Select the correct response)
A. DBADM authority
B. SYSADM authority
C. SELECT privilege on the table
D. SELECT privilege WITH GRANT OPTION on the table

44. Which of the following tools can be used to identify inefficient


SQL stat
ements without executing the query?
(Select the correct response)
A. QMF
B. Script Center
C. Visual Explain
D. Performance Monitor

45. Which of the following CANNOT be used to restrict specific


values from be
ing inserted into a column in a particular table?
(Select the correct response)
A. view
B. index
C. check constraint
D. referential constraint

46. Which of the following types of DB2 locks allows for the most
concurrency
within a table?
(Select the correct response
A. A row lock
B. A page lock
C. A field lock
D. A column lock

47. The DB2 Administration Server (DAS) is required for which of


the following?
(Select the correct response)]
A. For the administrator user id to install or remove DB2
B. For the remote clients to use the Control Center against the
instance
C. For checking authorities in the database manager
configuration for SYSADM
D. For maintaining authorities added and removed by the SQL
GRANT and REVOKE commands respectively

48. Given the statement:


CREATE TABLE t1
(
c1 INTEGER NOT NULL,
c2 INTEGER,
PRIMARY KEY(c1),
FOREIGN KEY(c2) REFERENCES t2
)
How many non-unique indexes are defined for table t1?
(Select the correct response)
A.0
B.1
C.2
D.3

49. Given the following embedded SQL programs:


Program 1:
Create table mytab (col1 int, col2 char(24))
Commit
Program 2:
Insert into mytab values ( 20989,'Joe Smith')
Commit
Insert into mytab values ( 21334,'Amy Johnson')
Delete from mytab
Commit
Insert into mytab values ( 23430,'Jason French')
Rollback
Insert into mytab values ( 20993,'Samantha Jones')
Commit
Delete from mytab where col1=20993
Rollback
Which of the following records will be returned by the statement
SELECT * FROM mytab?
(Select the correct response)
A. 20989, Joe Smith
B. 21334, Amy Johnson
C. 21334, Amy Johnson
D. 20993, Samantha Jones
E. No records are returned

50. Given an application bound with cursor stability which will be


updating r
ows in a table and obtaining row locks, which of the following
table locks wi
ll DB2 acquire for the application first?
(Select the correct response)
A. U – update
B. X – exclusive
C. IU - intent update
D. IX - intent exclusive

51 . Which of the following is NOT a valid data type on CREATE


TABLE?
(Select the correct response)
A. CLOB
B. DOUBLE
C. NUMERIC
D. DATETIME

52. If a DB2 Warehouse Manager toolkit is selected during the


installation of
DB2 UDB Version 7.1, which of the following databases must be
defined?
(Select the correct response)
A. None
B. Target Database
C. Source Database
D. Control Database

53. Which of the following SQL statements can remove all rows
from a table na
med COUNTRY?
(Select the correct response)
A. DELETE country
B. DELETE FROM country
C. DELETE * FROM country
D. DELETE ALL FROM country

54. Which of the following tasks can be performed using the


ALTER TABLESPACE
statement?
(Select the correct response)
A. Assign a bufferpool.
B. Change the table space name.
C. Change the type of the table space.
D. Change the page size of the table space.

55.To set up a client that can access DB2 UDB through DB2
Connect Enterprise
Edition, which of the following is the minimum software client
that must be
installed?
(Select the correct response)
A. DB2 Runtime Client
B. DB2 Personal Edition
C. DB2 Administration Client
D. DB2 Application Developer's Client

1. J. the following table with a primary key on empid :


Emp :
Empid Name
11 Joe Smith
23 Melanie Jones
30 Robert Bruce
Janice Baker 49
66 Mario Diaz
68 Maria Diaton
Give the following statement in an embedded SQL program
bound with Repeatable
Read :
Select * from Emp where empid "55
How many rows in the table will be locked after the statement is
run?
A.0
B.1
C.4
1,479
1,100,300

2. Ulrich an embedded SQL program with a single connection, the


two threads and 85th
E following actions :
Thread 1 : mytab insert into values (. . . )
Thread 2 : mytab insert into values (. . . )
Thread 1 : commit
Thread 2 : mytab insert into values (. . . )
Thread 1 : rollback
How many records will be successfully inserted and retained in
the table myta
B?
(Select the correct response)
A.0
B.1
C.2
D.3

3. With Dbadm authority on the database and given the


statements :
Create table t1 (cl Char (1))
Insert into t1 values ( 'b')
Create view v1 as select cl from t1 where c1= 'a' with check
option
Insert into v1 values ( 'a')
Insert into v1 values ( 'b')
How many rows would be returned from the statement, the
select from t1? cl
(Select the correct response)
A.0
B.1
C.2
D.3

4. J. the following table definition :


Staff
Id Michael
Name Char (20)
Dept. Michael
Job Char (20)
Years Michael
Salary Decimal (10,2)
V.. Decimal (10,2)
Which of the following statements will return all of the records
ordered by j
Summer with the salaries in descending order?
(Select the correct response
A. Select * from staff designs by salary Desc, job
B. Select * from staff group by salary Desc, job
C. Select * from staff designs feature job, salary DESC
D. Select * from staff group by job, the salary DESC

5. Which of the following is the result of a successful rollback


statement?
(Select the correct response)
A.Held locks are released
B. Release-pending conditions are undone
C. Tables are released in load pending
D. Constraint checking conditions are undone
E. Existing database connections are released

6. Which of the following processing can occur for a unit of work


is using an
Olation level of Cursor Stability and allows scanning through the
table more
Than once within the unit of work?
(Select the correct response)
A. Access uncommitted changes made by other processes
B. Update uncommitted changes made by other processes
C. Have updated result set rows changed by other processes
from one scan to t
He next
D. Have accessed result set rows changed by other processes
from one scan to
The next

7. J. the following :
A table containing a list of all known on an airplane. A seat
consists of as
Eat number and whether or not it is assigned. An airline agent
lists all the
Unassigned known on the incident. When the agent refreshes the
list from the tab
Le, it should only change if another agent unassigns a currently
assigned sea
T.
Which of the following isolation levels should be used for this
application?

(Select the correct response)


A. Read stability
B. Repeatable read
C. Cursor stability
D. Uncommitted read

8. J. column the following requirements :


Col1 Numeric Identifier-From 1 to 1000000
Col2 Job Code - Variable, 1 to 2 characters long
Col3 Job Description - Variable, 1 to 100 characters long
Col4 Job Length - Length of Job in seconds
Which of the following will minimize the disk space allocated to
store the re
Cords if Job Description has an average length of 45?
(Select the correct response)
A. Create table tab1 (col1 Int, col2 Char (2), col3 Char (100),
col4 INT)
B. B. Create table tab1 (col1 Int, col2 VARCHAR (2), col3 Char
(100), col4 INT)
C. Create table tab1 (col1 Int, col2 Char (2), col3 VARCHAR
(100), col4 INT)
D. Create table tab1 (col1 Int, col2 VARCHAR (2), col3 VARCHAR
(100), col4 INT)

9. Which of the following DB2 components can limit the resource


consumption o
F queries?
(Select the correct response)
A. DB2 Connect
B. DB2 Query Patroller
C. DB2 Performance Monitor
D. DB2 Net Search Extender

10. J. the table definition :


DEFIN1 :
Id smallint secret null
Name VARCHAR (30)
Hired date
DEFIN2 :
Deptid smallint secret null
Name VARCHAR (30)
Started date
Which of the following statements will insert successfully into
table DEFIN1?
(Select the correct response)
A. Insert into defin1 (id) values (1)
B. Insert into defin1 (name) values ( 'Florence')
C. Insert into defin1 (id, hired) as select distinct 1, current date
from defIn2
D. Insert into defin1 (name, hired) select distinct 'Florence',
current date From defin2

11. Which of the following isolation levels will install only the
rows returned In the result set?
A. Read Stability
B. Repeatable Read
C. Cursor Stability
D. Uncommitted Read
12. J. the following table definitions
English
Deptno Char (3)
Deptname Char (30)
Mgrno Michael
Admrdept Char (3)

Employee
Empno Michael
Firstname Char (30)
Mr. Midinit
Lastname Char (30)
Workdept Char (3)
Which of the following statements will list the employee 's
employee number, lAst name, and meaning name only for those
employees who have a department?
A. Select e.empno, e.lastname, d.deptname from employee e,
meaning d where
E.workdept = d.deptno
B. Select e.empno, e.lastname, d.deptname from employee e left
outer join depArtment d = d.deptno on e.workdept
C. Select e.empno, e.lastname, d.deptname from employee e full
outer join depArtment d = d.deptno on e.workdept
D. Select e.empno, e.lastname, d.deptname from employee e
right outer join de
Where e.workdept partment d = d.deptno

13. A view is used instead of a table for users to do which of the


following?

(Select the correct response)


A. Avoid allocating more disk space per database
B. Provide users with the ability to define 1978-1992
C. Restrict user 's access to a subset of the table data
D. Avoid allocating frequently used query result tables

14. J. the table :


Country
ID name person cities
1 Argentina 1 10
2 Canada 2 20
3 Cuba 2 10
4 Germany 1 0
7 5 5 France
Which of the following clauses when added to the statement
Select cities, name from country
Returns rows sorted by name and then sorted by the number of
cities (cities)?

(Select the correct response)


A. Designs feature 2
B. Group by 2, 1
C. Designs feature cities, name
D. Group by cities, name

15. Which of the following tools maintains a history of all


executed statemenTs/commands for the current session within
the tool?
(Select the correct response
A. Journal
B. SQL Assist
C. DB2 Alert Center
D. DB2 Command Center

16. J. table T1 with 100 rows, which of the following queries will
retrievE 10 rows from table T1?
(Select the correct response)
A. Select * from t1 maximum 10 rows
B. Select * from t1 � 10 rows only
C. Select * from t1 optimize for 10 rows
D. Select * from t1 fetch 10 rows only die

17. J. the table T1, created by :


Create table t1
(
Id Michael generated by default as identity.
Cl Char (3)
)
The following SQL statements are issued :
Insert into t1 values (1, 'ABC')
Insert into t1 values (5, 'DEF')
Which of the following values are inserted into the ID column by
the followinG statement?
Insert into t1 (cl) values ( 'XYZ')
(Select the correct response)
A.0
B.1
C.2
1,479
1,100,300

18. Which of the following products can be used to perform a


dictionary-based Search?
(Select the correct response)
A. Net.Data
B. XML Extender
C. Avi Extender
D. Text Extender

19. Which of the following statements will create an index and


prevent table
T1 from containing two or more rows with the same values for
column C1?
(Select the correct response)
A. Create index ix4 UN on t1 (cl)
B. Create index ix1 on distinct t1 (cl)
C. Create index ix6 UN on t1 (c1,c2)
D. Create index ix3 distinct on t1 (c1,c2)

20. How many DB2 Administration Server (Das) Value can be set
up per phys
Ical machine?
(Select the correct response)
A.0
B.1
C. One for each instance on the physical machine
D. One for each database on the physical machine

21. Why is a unique site not sufficient for creation of a primary


key?
(Select the correct response)
A. It is sufficient-a primary key is the same thing as a unique
index.
B. Unique indexes can be defined in ascending or descending
order. Primary ke
Ys must be ascending.
C. A unique index can be defined over a column or columns that
allow nulls. P
rimary keys cannot contain nulls.
D. A unique index can be defined over a column or columns that
allow nulls. T
his is not allowed for primary keys because foreign keys cannot
contain nulls
.

22. Which of the following will rebuild a package in the database


from the ex
isting catalog information?
(Select the correct response)
A. bind
B. rebind
C. update
D. rebuild

23. Which of the following DELETE RULES on CREATE TABLE will


delete a depende
nt table row if the parent table row is deleted?
(Select the correct response
A. ON DELETE REMOVE
B. ON DELETE CASCADE
C. ON DELETE RESTRICT
D. ON DELETE SET NULL
E. ON DELETE PROPAGATE

24. Which of the following is the best way to restrict user access
to a subset of columns in a table?
(Select the correct response)
A. Only grant access to the columns within a table that a user is
allowed to see.
B. Create a view that only includes the columns a user is allowed
to see. Grant the user access to the view, not the base table.
C. Create two tables: one with the columns that a user is allowed
to see, and one that has the confidential columns, and use a join
when all data must be presented.
D. Create two tables: one with the columns that a user is allowed
to see, and one that has the confidential columns, and use a
union when all data must be presented.

25. Given the following DDL statements,


CREATE TABLE t1 (a INT, b INT, c INT)
CREATE VIEW v1 AS SELECT a, b, c FROM t1
WHERE a >; 250
WITH CHECK OPTION
Which of the following INSERT statements will fail?
(Select the correct response)
A. INSERT INTO t1 VALUES (200, 2, 3)
B. INSERT INTO v1 VALUES (200, 2, 3)
C. INSERT INTO t1 VALUES (300, 2, 3)
D. INSERT INTO v1 VALUES (300, 2, 3)

26. Which two of the following types of storage management


method is supporte
d by DB2 OLAP Server ?
(Select all that apply)
A. Object
B. Network
C. Relational
D. Hierachical
E. Multi-dimensional

27. For which of the following can locks be obtained?


(Select the correct response)
A. A trigger
B. A table view
C. A table column
D. A database buffer
E. A row referenced by an index key

28. Which of the following privileges is necessary to populate the


table with
large amounts of data?
(Select the correct response)
A. LOAD
B. ALTER
C. UPDATE
D. IMPORT

29. When manually establishing communications from a Windows


NT client through a DB2 Connect gateway to DB2 UDB for
OS/390, which of the following is NOT required to catalog?
(Select the correct response
A. The client.
B. The database on the DRDA server.
C. The Database Connection Service database.
D. The node where the DB2 Connect Gateway is.

30. Given the statement:


CREATE TABLE t1 (c1 CHAR(1))
Data has been inserted into the table with rows of a,b,c,d,e,f.
Given the following command is issued:
ALTER TABLE t1 ADD CONSTRAINT con1 CHECK (c1 ='a')
Which of the following occurs?
(Select the correct response)
A. Rows with c1 values of b,c,d,e,f are deleted
B. Rows with c1 values of b,c,d,e,f have c1 set to NULL
C. The ALTER command will fail as rows violate the
constraint
D. The ALTER command will move the violating rows to the
exception table

31. Using the Control Center Create Table dialog box, which of
the following
dialogs allows the table creation DDL to be viewed?
(Select the correct response
A. Copy
B. Show SQL
C. Show Related
D. Sample Contents

32. Which of the following DB2 CLP options specify the file that
contains the
statements to be executed?
(Select the correct response)
A. –f
B.-b
C.-o
D.-w

33. A user has a numeric data column with a maximum value of


100,000. Which o
f the following data types will use the minimum amount of
storage for the col
umn?
(Select the correct response)
A. IDENTITY
B. BIGINT
C. INTEGER
D. SMALLINT

34. Which two of the following modes can be used on the lock
table statement?

(Select all that apply)


A. SHARE MODE
B. EXCLUSIVE MODE
C. REPEATABLE READ MODE
D. UNCOMMITTED READ MODE
E. INTENT EXCLUSIVE MODE

35. Which of the following must be set up to allow the Control


Center to view
database objects?
(Select the correct response)
A. ODBC
B. JAVA
C. DB2 Administration Server
D. Client Configuration Assistant

36. Which of the following is possible once a user has been given
maintenance
authority?
A. DB2 userids can be created.
B. Views can be created on the catalogs.
C. Statistics can be collected for database objects
D. A table can be populated by using the LOAD command.
37. Given the two following tables:
Points
Name Points
Wayne Gretzky 244
Jaromir Jagr 168
Bobby Orr 129
Bobby Hull 93
Brett Hull 121
Mario Lemieux 189

PIM
Name PIM
Mats Sundin 14
Jaromir Jagr 18
Bobby Orr 12
Mark Messier 32
Brett Hull 66
Mario Lemieux 23
Joe Sakic 94
Which of the following statements will display the player's
Names, points and
PIM for all players?
(Select the correct response)
A. SELECT points.name, points.points, pim.name, pim.pim
FROM points INNER JOI
N pim ON points.name=pim.name
B. SELECT points.name, points.points, pim.name, pim.pim
FROM points FULL OUTE
R JOIN pim ON points.name=pim.name
C. SELECT points.name, points.points, pim.name, pim.pim
FROM points LEFT OUTE
R JOIN pim ON points.name=pim.name
D. SELECT points.name, points.points, pim.name, pim.pim
FROM points RIGHT OUT
ER JOIN pim ON points.name=pim.name

38. Given the following table structure:


table1
emp_num INT NOT NULL PRIMARY KEY
emp_fname CHAR(30) NOT NULL
emp_lname CHAR(30) NOT NULL
emp_addr CHAR(60) NOT NULL
emp_pin CHAR(10) NOT NULL
Which of the following columns can be referenced by a foreign
key clause from
another table?
(Select the correct response)
A. emp_num
B. emp_pin
C. emp_addr
D. emp_fname
E. emp_lname

39. Which of the following is the result of the following SQL


statement:
CREATE UNIQUE INDEX empno_ind ON employee (empno)
(Select the correct response)
A. Every value for EMPNO must be unique.
B. UPDATE statements on EMPNO will be rolled back.
C. Insert statements on EMPNO will always be faster.
D. Insert statements on the EMPNO table will result in
clustered data.

40. Given the table definition:


CREATE TABLE student (name CHAR(30), age INTEGER)
To list the names of the 10 youngest students, which of the
following index d
efinition statements on the student table may improve the query
performance?

(Select the correct response)


A. CREATE INDEX youngest ON student (age, name)
B. CREATE INDEX youngest ON student (name, age)
C. CREATE INDEX youngest ON student (name, age DESC)
D. CREATE INDEX youngest ON student (name DESC)
INCLUDE (age)

41. Which of the following DB2 data types is used to store 50 MB


of binary da
ta as a single value?
(Select the correct response)
A. BLOB
B. CLOB
C. DBCLOB
D. FOR BIT DATA
E. VARCHAR FOR BIT DATA

42. With tables defined as:


Table1
col1 INT
col2 CHAR(30)

Table2
col1 INT
col2 CHAR(30)
Which of the following statements will insert all the rows in
TABLE2 into TAB
LE1?
(Select the correct response)
A. INSERT INTO table1 SELECT col1, col2 FROM table2
B. INSERT INTO table1 AS SELECT col1, col2 FROM table2
C. INSERT INTO table1 VALUES (table2.col1, table2.col2)
D. INSERT INTO table1 VALUES (SELECT col1, col2 FROM
table2)
E. INSERT INTO table1 (col1,col2) VALUES (SELECT
col1,col2 FROM table2)

43. Given the following UPDATE statement:


UPDATE address2 SET housenumber_buildingname=
(SELECT buildingname FROM address1
WHERE address2.id = address1.id)
WHERE HOUSENUMBER_BUILDINGNAME IS NULL
Which of the following describes the result of the statement?
(Select the correct response)
A. The statement will succeed.
B. The statement will fail because a subquery cannot exist in
an UPDATE state
ment.
C. The statement will succeed only if ADDRESS1.ID and
ADDRESS2.ID are defined
as primary keys.
D. The statement will succeed if the data retrieved from the
subquery does no
t have duplicate values for ADDRESS1.ID.

44. Given the following embedded SQL programs:


Program 1:
CREATE TABLE mytab (col1 INT, col2 CHAR(24))
COMMIT
Program 2:
INSERT INTO mytab VALUES ( 20989,'Joe Smith')
INSERT INTO mytab VALUES ( 21334,'Amy Johnson')
COMMIT
DELETE FROM mytab
ROLLBACK
INSERT INTO mytab VALUES ( 23430,'Jason French')
ROLLBACK
INSERT INTO mytab VALUES ( 20993,'Samantha Jones')
COMMIT
DELETE FROM mytab WHERE col1=20993
ROLLBACK
Which of the following indicates the number of records that will
be returned
by the statement:
SELECT * FROM mytab?
(Select the correct response)
A.0
B.1
C.2
D.3
E.4

45. Which of the following is the most appropriate reason to


consider revokin
g the SELECT privilege on the catalog tables from PUBLIC after
creating a dat
abase?
(Select the correct response
A. To prevent users from creating tables without proper
authority.
B. Some system catalogs record user data in some columns, and
this data may b
e confidential.
C. To prevent users from viewing passwords for other DB2
userids that DB2 sto
res in the catalog tables.
D. Some catalog tables are large, so preventing users from
viewing them is a
good way to keep users from submitting long-running queries
against the catal
ogs.

46. Which of the following is the implicit qualifier for a declared


temporary
table?
(Select the correct response)
A. The schema name SYSCAT.
B. The schema name SESSION.
C. The schema name TEMPUSER.
D. The userid specified with the BIND command.
E. The userid who established the connection to the database and
declared the
temporary table.

47. Given table EMPLOYEE with columns EMPNO and SALARY and
table JOB with col
umns ID and TITLE, what is the effect of the statement:
UPDATE employee SET salary = salary * 1.15
WHERE salary < 15000 OR
EXISTS (SELECT 1 FROM job WHERE job.id = employee.empno
AND job.title = 'Mgr'
)
(Select the correct response)
A. Only managers that make less than 15,000 are given
salary increases.
B. Only non-managers that make less than 15,000 are given
salaray increases.
C. Employees that make less than 15,000 but no managers
are given salary incr
eases.
D. Employees that make less than 15,000 and all managers
are given salary inc
reases.

48. Which one of the following SQL statements sets the default
qualifier to "
user1"?
(Select the correct response)
A. SET CURRENT ID = 'user1'
B. SET CURRENT USER = 'user1'
C. SET CURRENT SQLID = 'user1'
D. SET CURRENT QUALIFIER = 'user1'

49. A table called EMPLOYEE has columns: name, department,


and phone_number.
Which of the following can limit access to the phone_number
column?
(Select the correct response)
A. Using a view to access the table
B. Using an index on the column
C. Using a referential constraint on the table
D. Using a table check constraint on the table
E. Revoking access from the phone_number column

50. Which of the following can be used to determine the views


that are affect
ed by a DROP TABLE statement?
(Select the correct response)
A. DB2 Script Center
B. DB2 Performance Monitor
C DB2 Control Center, Show Related
D. DB2 Control Center, Sample Contents

51. Given two embedded SQL programs and the following


actions:
Pgm1 Pgm2
INSERT INTO mytab VALUES (...) DELETE FROM mytab
COMMIT ROLLBACK
DELETE FROM mytab INSERT INTO mytab VALUES
(...)
ROLLBACK COMMIT
If there exists one (1) row in table mytab before the programs
are executed c
oncurrently, how many records will be in the table once the
programs complete
?
(Select the correct response)
A.0
B.1
C.2
D.3
E.4

52. Given the following transaction:


CREATE TABLE dwaine.mytab (col1 INT, col2 INT)
INSERT INTO dwaine.mytab VALUES (1,2)
INSERT INTO dwaine.mytab VALUES (4,3)
ROLLBACK
Which of the following would be returned from the statement:
SELECT * FROM dwaine.mytab?
(Select the correct response)
A. COL1 COL2
----------- -----------
0 record(s) selected.
B. COL1 COL2
----------- -----------
1 2
1 record(s) selected.

C. SQLCODE -204 indicating that "DWAINE.MYTAB" is an


undefined name.
D. COL1 COL2
----------- -----------
1 2
4 3
2 record(s) selected.

53. Which of the following does NOT end a unit of work?


(Select the correct response)
A. COMMIT
B. ROLLBACK
C. TERMINATE
D. SAVEPOINT
E. CONNECT RESET

54. Given the following:


TAB1 TAB2
C1 C2 CX CY
--- --- --- ---
A 11 A 21
B 12 C 22
C 13 D 23
The following results are desired:
C1 C2 CX CY
-- -- -- --
A 11 A 21
C 13 C 22
-- -- D 23
Which of the following joins will yield the desired results?
(Select the correct response)
A. SELECT * FROM tab1, tab2 WHERE c1=c0078
B. SELECT * FROM tab1 INNER JOIN tab2 ON c1=cx
C. SELECT * FROM tab1 FULL OUTER JOIN tab2 ON c1=cx
D. SELECT * FROM tab1 RIGHT OUTER JOIN tab2 ON c1=cx

55. Which of the following products must be installed to provide a


single poi
nt of control for local and remote DB2 databases?
(Select the correct response
A. DB2 Runtime Client
B. DB2 Administration Client
C. DB2 Connect Enterprise Edition
D. DB2 Enterprise-Extended Edition

(1/55) Which two of the following types of storage management


method is supp
Orted by DB2 OLAP Server?
(Select all that apply)
A. Scrap
B. Network
C. Relational
D. Hierachical
E. Multi-dimensional

(2/55) Which of the following DB2 data types is used to store 50


MB of binar
Y data as a single value?
(Select the correct response)
A. Blob
B. Clob
C. DBCLOB
D. For bit data
E. Varchar for bit data

(3/55) Which of the following must be set up to allow the Control


Center to
View database objects?
(Select the correct response)
A. ODBC
B. Java
C. DB2 Administration Server
D. Client Configuration Assistant

(4/55) Which of the following DB2 CLP options specify the file
that contains
The doubtful to be executed?
(Select the correct response)
A. -f
B. -b
C. -0
D. -w

(5/55) Which of the following delete rules create table will delete
on a dep
Endent table row if the parent table row is deleted?
(Select the correct response)
A. On delete sun
B. On delete Cascade
C. On delete restrict
D. On delete set null
E. On delete propagate

(6/55) With Dbadm authority on the database and given the


statements :
Create table t1 (cl Char (1))
Insert into t1 values ( 'b')
Create view v1 as select cl from t1 where c1= 'a' with check
option
Insert into v1 values ( 'a')
Insert into v1 values ( 'b')
How many rows would be returned from the statement, the
select from t1? cl
(Select the correct response)
A. 0
B. 1
C. 2
D. 3

(7/55) For which of the following can be obtained? locks


(Select the correct response)
A. A turnout
B. A table view
C. A table column
D. A database buffer
E. A row referenced by an index key

(8/55) J. the statement :


Create table t1 (cl Char (1))
Data has been inserted into the table with rows of a,b,c,d,e,f. J.
the fol
Lowing command is issued :
Alter table t1 add constraint con1 check (cl = 'a')
Which of the following occurs?
(Select the correct response)
A. Rows with cl values of b,c,d,e,f are deleted
B. Rows with cl values of b,c,d,e,f have cl set to null
C. The alter command will fail as rows violate the constraint
D. The alter command will move the violating rows to the
exception table

(9/55) How many DB2 Administration Server (Das) Value can be


set up per
Physical machine?
(Select the correct response)
A. 0
B. 1
C. One for each instance on the physical machine
D. One for each database on the physical machine

(10/55) Which of the following is the result of a successful


rollback statem
Ent?
(Select the correct response)
A. Held locks are released
B. Release-pending conditions are undone
C. Tables are released in load pending
D. Constraint checking conditions are undone
E. Existing database connections are released

(11/55) Which of the following is the most appropriate reason to


consider re
Voking the select privilege on the catalog tables from appliqu
after creating
A database?
(Select the correct response)
A. To prevent users from creating tables without proper
authority.
B. Some system catalogs record user data in some columns, and
this data may b
E confidential.
C. To prevent users from viewing passwords for other DB2
userids that DB2 sto
Movement in the catalog tables.
D. Some catalog tables are large, so preventing users from
viewing them is a
Good way to keep users from submitting long-running queries
against the catal
Ogs.

(12/55) When manually establishing communications from a


Windows NT 瀹 ㈡ 埗 t
Hrough a DB2 Connect gateway to DB2 UDB for OS/390, which
of the following is
Merely required to catalog?
(Select the correct response)
A. The 瀹 ㈡ 埗.
B. The DRDA databases on the server.
C. The Database Connection Service database.
D. The node where the DB2 Connect Gateway is.

(13/55) Which of the following will rebuild a package in the


database from t
He existing catalog information?
(Select the correct response)
A. Bind
B. Rebind
C. Update
D. Counterpart

(14/55) a user has a numeric data column with a maximum


value of 100,000. Tenants
Ich of the following data types will use the minimum amount of
storage for 85th
E column?
(Select the correct response)
A. Identity
B. BIGINT
C. Michael
D. Smallint

(15/55) Which of the following products can be used to perform a


dictionary-
Based search?
(Select the correct response)
A. Net.Data
B. XML Extender
C. Avi Extender
D. Text Extender

(16/55) J. the following transaction :


Create table dwaine.mytab (col1 Int, col2 INT)
Dwaine.mytab insert into values (1,2)
Dwaine.mytab insert into values (3)
Rollback
Which of the following would be returned from the statement :
Select * from dwaine.mytab?

(Select the correct response)


A. COL1 COL2
-------------- -------------
0 Records 121-160
B. COL1 COL2
------ -------
12
1 covers selected
C. SQLCODE -204 indicating that "DWAINE.MYTAB" is an
undefined name.
D. COL1 COL2
------- --------
12
43
2 records selected

(17/55) Which of the following privileges is necessary to populate


the table
With large amounts of data?
(Select the correct response)
A. Load
B. Alter
C. Update
D. Import

(18/55) J. the following table with a primary key on empid :


Emp :
Empid Name
11 Joe Smith
23 Melanie Jones
30 Robert Bruce
Janice Baker 49
66 Mario Diaz
68 Maria Diaton
Give the following statement in an embedded SQL program
bound with Repeatable
Read :
Select * from Emp where empid "55
How many rows in the table will be locked after the statement is
run?
(Select the correct response)
A. 0
B. 1
C. 4
D. 5
E. 6
(19/55) J. the following update statement :
Update address2 set housenumber_buildingname=
(select from address1 buildingname
Where address2.id = address1.id)
Where is null HOUSENUMBER_BUILDINGNAME
Which of the following describes the result of the statement?

(Select the correct response)


A. The statement will succeed.
B. The statement will fail because a subquery generation exist in
an update state
Discussion.
C. The statement will succeed only if ADDRESS1.ID and
ADDRESS2.ID are defined
As primary keys.
D. The statement will succeed if the data retrieved from the
subquery does no
T have duplicate values for ADDRESS1.ID.

(20/55) J. two embedded SQL programs and the following


actions :
Pgm1 Pgm2
Mytab insert into values (. . . ) delete from mytab
Commit rollback
Delete from mytab mytab insert into values (. . . )
Rollback commit
If there exists one (1) row in table mytab before the programs
are executed c
Oncurrently, how many records will be in the table once the
programs complete
?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3
E. 4

(21/55) J. the following embedded SQL programs :


Program 1 :
Create table mytab (col1 Int, col2 Char (24))
Commit
Program 2 :
Mytab insert into values (20,989, 'Joe Smith')
Mytab insert into values (21334, 'Amy Johnson')
Commit
Delete from mytab
Rollback
Mytab insert into values (23,430, 'Jason French')
Rollback
Mytab insert into values (20,993, 'Samantha Jones')
Commit
Delete from mytab where col1=20993
Rollback
Which of the following indicates the number of records that will
be returned
By the statement :
Select * from mytab?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3
E. 4

(22/55) Which of the following DB2 components can limit the


resource consump
Komeveb of queries?
(Select the correct response)
A. DB2 Connect
B. DB2 Query Patroller
C. DB2 Performance Monitor
D. DB2 Net Search Extender

(23/55) Which of the following products must be installed to


provide a singl
E point of control for local and remote DB2 databases?
(Select the correct response)
A. DB2 Runtime Client
B. DB2 Administration Client
C. DB2 Connect Enterprise Edition
D. DB2 Enterprise-Extended 511-525

(24/55) Which of the following is possible once a user has been


given mainte
Accepted authority?
(Select the correct response)
A. DB2 userids can be created.
B. Views can be created on the catalogs.
C. Statistics can be collected for database objects.
D. A table can be populated by using the load command.

(25/55) J. the table T1, created by :


Create table t1
(
Id Michael generated by default as identity.
Cl Char (3)
)
The following SQL statements are issued :
Insert into t1 values (1, 'ABC')
Insert into t1 values (5, 'DEF')
Which of the following values are inserted into the ID column by
the followin
G statement?
Insert into t1 (cl) values ( 'XYZ')
(Select the correct response)
A. 0
B. 1
C. 2
D. 5
E. 6

(26/55) Which of the following Control Center features can be


used to update
information for the optimizer to choose the best path to data?
(Select the correct response)
A. Show Related
B. Generate DDL
C. Run Statistics
D. Reorganize Table
(27/55)Which of the following tools allows the DBA to set
limits, and be al
erted if these limits are exceeded?
(Select the correct response)
A. DB2 Index Wizard
B. DB2 Script Center
C. DB2 Command Center
D. DB2 Performance Monitor

(28/55)Which of the following can be accomplished with a


single UPDATE stat
ement?
(Select the correct response)
A. Updating multiple tables
B. Updating a view consisting of joined tables
C. Updating multiple tables based on a WHERE clause
D. Updating a table based on a sub-select using joined
tables

(29/55)Given the statement:


CREATE TABLE t1
(
c1 CHAR(3)
CONSTRAINT c1
CHECK (c1 IN ('A01','B01','C01'))
)
DB2 verifies that the table check constraint is met during which
of the follo
wing actions?
(Select the correct response)
A. Adding data using load
B. The reorg of the table
C. The insert of each row in t1]
D. The creation of the index for the table

(30/55)Given the following embedded SQL programs:


Program 1:
Create table mytab (col1 int, col2 char(24))
Commit
Program 2:
Insert into mytab values ( 20989,'Joe Smith')
Commit
Insert into mytab values ( 21334,'Amy Johnson')
Delete from mytab
Commit
Insert into mytab values ( 23430,'Jason French')
Rollback
Insert into mytab values ( 20993,'Samantha Jones')
Commit
Delete from mytab where col1=20993
Rollback
Which of the following records will be returned by the statement
SELECT * FROM mytab?
(Select the correct response)
A. 20989, Joe Smith
B. 21334, Amy Johnson
C. 23430, Jason French
D. 20993, Samantha Jones
E. No records are returned

(31/55)In which of the following locations are the referential


constraints
stored?
(Select the correct response)
A. The user tables.
B. The explain tables.
C. SYSIBM.SYSTRIGGERS.
D. The system catalog tables.

(32/55)Which of the following SQL statements can remove all


rows from a tab
le named COUNTRY?
(Select the correct response)
A. DELETE country
B. DELETE FROM country
C. DELETE * FROM country
D. DELETE ALL FROM country

(33/55)Given two embedded SQL program executions with the


following actions
:
Pgm1
INSERT INTO mytab VALUES (...)
COMMIT
INSERT INTO mytab VALUES (...)
ROLLBACK

Pgm2
INSERT INTO mytab VALUES (...)
ROLLBACK
INSERT INTO mytab VALUES (...)
COMMIT
How many records will be successfully inserted and retained in
the table myta
b?
(Select the correct response)
A. 1
B. 2
C. 3
D. 4

(34/55)With DBADM authority on the database and given the


statements:
CREATE TABLE t1 (c1 CHAR(1))
INSERT INTO t1 VALUES ('b')
CREATE VIEW v1 AS SELECT c1 FROM t1 WHERE c1 ='a'
INSERT INTO v1 VALUES ('a')
INSERT INTO v1 VALUES ('b')
How many rows would be returned from the statement, SELECT
c1 FROM t1?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3

(35/55)Given the table T1 created by:


CREATE TABLE t1
(
id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY,
c1 CHAR(10) NOT NULL,
c2 CHAR(10)
)
Which of the following INSERT statements will succeed?
(Select the correct response)
A. INSERT INTO t1 VALUES (1, 'abc', NULL)
B. INSERT INTO t1 VALUES (1, NULL, 'def')
C. INSERT INTO t1 (c1, c2) VALUES ('abc', NULL)
D. INSERT INTO t1 (c1, c2) VALUES (NULL, 'def')

(36/55)Which of the following products can be used to


generate Extensible M
arkup Language documents from DB2 tables?
(Select the correct response)
A. Net Search
B. XML Extender
C. AVI Extender
D. Text Extender

(37/55)Which of the following describes why savepoints are


NOT allowed insi
de an atomic unit of work?
(Select the correct response)
A. Atomic units of work span multiple databases, but
savepoints are limited t
o units of work which operate on a single database.
B. A savepoint implies that a subset of the work may be
allowed to succeed, w
hile atomic operations must succeed or fail as a unit.
C. A savepoint requires an explicit commit to be released,
and commit stateme
nts are not allowed in atomic operations such as compound SQL.
D. A savepoint cannot be created without an active
connection to a database,
but atomic operations can contain a CONNECT as a sub-
statement.

(38/55)Which of the following DB2 UDB isolation levels will


NOT lock any ro
ws during read processing?
(Select the correct response)
A. Read Stability
B. Repeatable Read
C. Uncommited Read
D. Cursor Stability

(39/55)For which of the following database objects can locks


be obtained?
(Select the correct response)
A. View
B. Table
C. Trigger
D. Buffer Pool

(40/55)Which of the following utilities can examine a table and


its indexes
and update the system catalogs with the table's statistical
information?
(Select the correct response)
A. runstats
B. getstats
C. check index
D. chkstats

(41/55)Given the statement:


CREATE TABLE t1
(
c1 INTEGER NOT NULL,
c2 INTEGER,
PRIMARY KEY(c1),
FOREIGN KEY(c2) REFERENCES t2
)
How many non-unique indexes are defined for table t1?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3

(42/55)Given the following scenario: An application uses a 15


digit value t
o uniquely identify customer transactions. This number is also
used for arith
metic operations. Which of the following is the most efficient DB2
data type
for the column definition for this purpose?
(Select the correct response)
A. CHAR
B. CLOB
C. INTEGER
D. NUMERIC(15,2)
E. DECIMAL(15,0)

(43/55)Which of the following is NOT a valid data type on


CREATE TABLE?
(Select the correct response)
A. CLOB
B. DOUBLE
C. NUMERIC
D. DATETIME

(44/55)The user USER1 is executing the statement


CREATE TABLE app1.table1 (col1 INT, col2 INT)
Which of the following privileges is required by USER1 for the
statement to b
e successful?
(Select the correct response)
A. CREATEIN for the database
B. CREATEIN for the schema app1
C. CREATEIN for the schema user1
D. CREATEIN for the table table1

(45/55)Which of the following Control Center options shows


the dependencies
between a specific view and its tables?
(Select the correct response)
A. Show SQL
B. Show Related
C. Sample Contents
D. Customize Columns

(46/55)Which of the following occurs if an application ends


abnormally duri
ng an active unit of work?
(Select the correct response)
A. Current unit of work is committed
B. Current unit of work is rolled back
C. Current unit of work remains active
D. Current unit of work moves to pending state

(47/55)Which of the following can occur once connected to a


database or DRD
A server with an explicit authorization name?
(Select the correct response)
A. Omit a user's password.
B. Change a user's password if the server supports this
function.
C. Omit the name of the database or DRDA server if it is
local.
D. Use the commit option on the connect statement to
commit in-doubt units of
work from a previous connection that was terminated.

(48/55)Which of the following tasks can be performed using


the ALTER TABLES
PACE statement?
(Select the correct response)
A. Assign a bufferpool.
B. Change the table space name.
C. Change the type of the table space.
D. Change the page size of the table space.

(49/55)For a clustering index to be effective in keeping the


data in order,
which of the following parameters must be set correctly for the
index?
(Select the correct response)
A. FREE ROWS
B. PERCENT FREE
C. CLUSTERRATIO
D. CLUSTER FACTOR

(50/55)Which of the following CANNOT be used to restrict


specific values fr
om being inserted into a column in a particular table?
(Select the correct response)
A. view
B. index
C. check constraint
D. referential constraint

(51/55)Given an embedded SQL program with a single


connection, two threads
and the following actions:
Thread 1: INSERT INTO mytab VALUES (...)
Thread 2: INSERT INTO mytab VALUES (...)
Thread 1: ROLLBACK
Thread 2: INSERT INTO mytab VALUES (...)
Thread 1: COMMIT
How many records will be successfully inserted into the table
mytab?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3

(52/55)Given a table T1, with a column C1 char(3), that


contains strings in
upper and lower case letters, which of the following queries will
find all r
ows where C1 is the string 'ABC' in any case?
(Select the correct response)
A. SELECT * FROM t1 WHERE c1 = 'ABC'
B. SELECT * FROM t1 WHERE UCASE(c1) = 'ABC'
C. SELECT * FROM t1 WHERE IGNORE_CASE(c1 = 'ABC')
D. SELECT * FROM t1 WHERE c1 = 'ABC' WITH OPTION
CASE INSENSITIVE

(53/55)Given an embedded SQL program with a single


connection, two threads
and the following actions:
Thread 1: INSERT INTO mytab VALUES (...)
Thread 2: INSERT INTO mytab VALUES (...)
Thread 1: ROLLBACK
Thread 2: INSERT INTO mytab VALUES (...)
Thread 1: COMMIT
How many records will be successfully inserted into the table
mytab?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3

(54/55)If a DB2 Warehouse Manager toolkit is selected during


the installati
on of DB2 UDB Version 7.1, which of the following databases
must be defined?

(Select the correct response)


A. None
B. Target Database
C. Source Database
D. Control Database

(55/55)User2 has DBADM authority on database DB1. This


allows the user to d
o which of the following?
(Select the correct response)
A. Drop database DB1
B. Backup database DB1
C. Create tables in any database
D. Create tables in database DB1

(1/55) J. the following :


TAB1 TAB2
C1 C2 flight fees
---- ---- ----- -----
A 11 a 21
B 12 B 22
C 13 C 23
The following results are desired :
C1 C2 flight fees
---- ---- ---- -----
A 11 a 21
B 12 ----- -----
C 13 C 22
Which of the following joins will yield the desired results?
(Select the correct response)
A. Select * from tab1, tab2 where c1=cx
B. Select * from tab1 inner join tab2 on c1=cx
C. Select * from tab1 full outer join tab2 on c1=cx
D. Select * from tab1 left outer join tab2 on c1=cx

(2/55) Which of the following SQL statements can remove all


rows from a tabl
E named COUNTRY?
(Select the correct response)
A. Delete country
B. Delete from country
C. Delete * from country
D. Delete from country Souls

(3/55) When establishing client-server communication,


passwords cannot be ve
Rified by :
(Select the correct response)
A. The DRDA DB2 server.
B. The 瀹 ㈡ 埗 鐞 嬪  system.
C. The gateway 鐞 嬪  system.
D. Life in the catalog tables for the password.

(4/55) Which of the following occurs if an application due


abnormally durin
G an active unit of work?
(Select the correct response)
A. Current unit of work is committed
B. Current unit of work is rolled back
C. Current unit of work remains active
D. Current unit of work moves to pending state

(5/55) Which of the following Control Center features can be


used to update
Information for the optimizer to choose the best path to data?
(Select the correct response)
A. Show Related
B. Generate DDL
C. Run Statistics
D. Reengineer Table

(6/55) When granted to user1, which of the following will allow


user1 to ONL
Y access table data?
(Select the correct response)
A. Dbadm authority
B. Sysadm authority
C. Select privilege on the table
D. Select privilege with grant option on the table

(7/55) With Dbadm authority on the database and given the


statements :
Create table t1 (cl Char (1))
Insert into t1 values ( 'b')
Create view v1 as select from t1 where cl cl = 'a'
Insert into v1 values ( 'a')
Insert into v1 values ( 'b')
How many rows would be returned from the statement, the
select from t1? cl
(Select the correct response)
A. 0
B. 1
C. 2
D. 3

(8/55) J. a table T1, with a column C1 char (3), that contains


strings in
Differential and lower case letters, which of the following queries
will find all ro
Ws where C1 is the string 'ABC' in any case?
(Select the correct response)
A. Select * from t1 where cl = 'ABC'
B. Select * from t1 where UCASE (cl) = 'ABC'
C. Select * from t1 where IGNORE_CASE (cl = 'ABC')
D. Select * from t1 where cl = 'ABC' insensitive case with option

(9/55) Ulrich an embedded SQL program with a single


connection, a two threads
Division the following actions :
Thread 1 : mytab insert into values (. . . )
Thread 2 : mytab insert into values (. . . )
Thread 1 : rollback
Thread 2 : mytab insert into values (. . . )
Thread 1 : commit
How many records will be successfully inserted into the table
mytab?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3

(10/55) Which of the following describes why savepoints are


merely allowed insi
De an atomic unit of work?
(Select the correct response)
A. Band units of work layered multiple databases, but are limited
savepoints
To units of work which operate on a single database.
B. A savepoint implies that a subset of the work may be allowed
to succeed.
While atomic operations must succeed or fail as a unit.
C. A savepoint requires an explicit commit to be released, and
commit statem
Ents are not allowed in atomic operations such as compound
SQL.
D. A savepoint generation be created without an active
connection to a database,
But atomic operations can contain a connect as a sub-statement.

(11/55) J. the following DDL statement :


Create table newtab1 like tab1
Which of the following would occur as a result of the statement
execution?
(Select the correct response)
A. NEWTAB1 has same triggers as TAB1
B. NEWTAB1 is populated with TAB1 data
C. NEWTAB1 has the same primary key as TAB1
D. NEWTAB1 columns have same attributes as TAB1

(12/55) The DB2 Administration Server (Das) is required for


which of the fol
Lowing?
(Select the correct response)
A. For the $ user id to install or remove DB2
B. For the remote clients to use the Control Center against the
Tamil
C. For checking authorities in the database configuration for
sysadm � 鐞 �
D. For maintaining authorities added and removed by the SQL
Grant and revoke
Commands respectively

(13/55) Which of the following types of DB2 locks allows for the
most concur
Rency within a table?
(Select the correct response)
A. A row lock
B. A page users
C. A field users
D. A column lock

(14/55) Which of the following is merely a valid data type on


create TABLE?
(Select the correct response)
A. Clob
B. Double
C. Numeric
D. DateTime

(15/55) Which of the following utilities can examine a table and


its indexes
And update the system catalogs with the table 's statistical
information?
(Select the correct response)
A. Runstats
B. Getstats
C. Check index
D. Chkstats

(16/55) J. the following :


A table containing a list of all known on an airplane. A seat
consists of as
Eat number and whether or not it is assigned. An airline agent
lists all the
Unassigned known on the incident. When the agent refreshes the
list from the tab
Le, the list should not change.

Which of the following isolation levels should be used for this


application?

(Select the correct response)


A. Read stability
B. Repeatable read
C. Cursor stability
D. Uncommitted read

(17/55) Which of the following options Control Center shows the


dependencies
Between a specific view and its tables?
(Select the correct response)
A. Show SQL
B. Show Related
C. Haphazard Contents
D. Customize Columns

(18/55) J. the following table definition :


Staff
Id Michael
Name Char (20)
Dept Michael
Mr. job (20)
Years Michael
Salary Decimal (10,2)
Comm. Decimal (10,2)
Which of the following SQL statements will return the total
number of employe
Es in each hygiene and the corresponding meaning id under the
following
Conditions :
Only return departments with at least one employee receiving a
commission gre
Ater than 5000. The result should be sorted by the hygiene count
from most
To least.
(Select the correct response)
A. Select dept, count (id) from staff where comm "; 5000 group
by dept tape B
Y 2 DESC
B. Select dept, count (*) from staff group by dept having comm
"; 5000 tape B
Y 2 DESC
C. Select dept, count (*) from staff where comm "; 5000 group
by dept, Environmental III
Der by 2 DESC
D. Select dept, Environmental, count (id) from staff where comm
"; 5000 group by dept.
Environmental designs feature three copies

(19/55) For which of the following database objects can be


obtained? locks
(Select the correct response)
A. View
B. Table
C. Trigger
D. Buffer Pool

(20/55) J. the tables :


Country
ID name person cityes
1 Argentina 1 10
2 Canada 2 20
Cuba 3 3 10
4 Germany 1 0
Germany 7 5 5

Staff
ID LastName
1 Jones
2 Smiths
The statement :
Select * from staff, country
Will return how many rows?
(Select the correct response)
A. 2
B. 4
C. 5
D. 7
E. 10

(21/55) a user creates the table TABLE1. Which of the following


statements w
Ould explicitly give USER1 the ability to read rows from the
table?
(Select the correct response)
A. Mr. view on table table1 table user1
B. Mr. � WTO user1 on table table1
C. Grant select on table table1 table user1
D. Grant access on table table1 table user1

(22/55) Which of the following tools can be used to identify


inefficient SQL
Doubtful without executing the query?
(Select the correct response)
A. QMF
B. Script Center
C. Visual Explain
D. Performance Monitor

(23/55) Which of the following describes when indexes can be


explicitly refe
Renced by name within an SQL statement?
(Select the correct response)
A. When the index dropping
B. When updating the index
C. When selecting on the index
D. When inserting using the index

(24/55) For a clustering index to be effective in keeping the data


in order
, which of the following parameters must be set correctly for the
index?
(Select the correct response)
A. Free rows
B. Percent free
C. Clusterratio
D. Soho factor

(25/55) The user is executing the statement USER1


Create table app1.table1 (col1 Int, col2 INT)
Which of the following privileges is required by USER1 for the
statement to b
E successful?
(Select the correct response)
A. CREATEIN for the database
B. CREATEIN for the schema app1
C. CREATEIN for the schema user1
D. CREATEIN for the table table1

(26/55) Given the statement:


CREATE TABLE t1
(
c1 INTEGER NOT NULL,
c2 INTEGER,
PRIMARY KEY(c1),
FOREIGN KEY(c2) REFERENCES t2
)
How many non-unique indexes are defined for table t1?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3

(27/55) To set up a client that can access DB2 UDB through


DB2 Connect Ente
rprise Edition, which of the following is the minimum software
client that mu
st be installed?
(Select the correct response)
A. DB2 Runtime Client
B. DB2 Personal Edition
C. DB2 Administration Client
D. DB2 Application Developer's Client
(28/55)Which of the following CANNOT be used to restrict
specific values fr
om being inserted into a column in a particular table?
(Select the correct response)
A. view
B. index
C. check constraint
D. referential constraint

(29/55) Which of the following can be accomplished with a


single UPDATE sta
tement?
(Select the correct response)
A. Updating multiple tables
B. Updating a view consisting of joined tables
C. Updating multiple tables based on a WHERE clause
D. Updating a table based on a sub-select using joined
tables

(30/55)User2 has DBADM authority on database DB1. This


allows the user to d
o which of the following?
(Select the correct response)
A. Drop database DB1
B. Backup database DB1
C. Create tables in any database
D. Create tables in database DB1

(31/55)Given the two following tables:


Names
Names Number
Wayne Gretzky 99
Jaromir Jagr 68
Bobby Orr 4
Bobby Hull 23
Brett Hull 16
Mario Lemieux 66
Steve Yzerman 19
Claude Lemieux 19
Mark Messier 11
Mats Sundin 13

POINTS
Names Points
Wayne Gretzky 244
Jaromir Jagr 168
Bobby Orr 129
Bobby Hull 93
Brett Hull 121
Mario Lemieux 189
Joe Sakic 94

Which of the following statements will display the player's


Names, numbers an
d points for all players with an entry in both tables?
(Select the correct response)
A. SELECT names.names, names.number, points.points
FROM names INNER JOIN poin
ts ON names.name=points.name
B. SELECT names.name, names.number, points.points FROM
names FULL OUTER JOIN
points ON names.name=points.name
C. SELECT names.name, names.number, points.points
FROM names LEFT OUTER JOIN
points ON names.name=points.name
D. SELECT names.name, names.number, points.points
FROM names RIGHT OUTER JOIN
points ON names.name=points.name

(32/55) Which of the following can occur once connected to a


database or DR
DA server with an explicit authorization name?
(Select the correct response)
A. Omit a user's password.
B. Change a user's password if the server supports this
function.
C. Omit the name of the database or DRDA server if it is
local.
D. Use the commit option on the connect statement to
commit in-doubt units of
work from a previous connection that was terminated.
(33/55)Which of the following DB2 components allows the
analysis of multidi
mensional databases?
(Select the correct response)
A. DB2 Runtime Client
B. DB2 Control Center
C. DB2 OLAP Starter Kit
D. DB2 Spatial Extender
E. DB2 Performance Monitor

(34/55)Which of the following DB2 UDB isolation levels will


NOT lock any ro
ws during read processing?
(Select the correct response)
A. Read Stability
B. Repeatable Read
C. Uncommited Read
D. Cursor Stability

(35/55)Which of the following authorities should be given to


the DB2 Admini
stration Server (DAS) Instance owner at the administered
instance?
(Select the correct response)
A. DBADM
B. SYSADM
C. SYSCTRL
D. SYSMAINT

(36/55)Which of the following products can be used to


generate Extensible M
arkup Language documents from DB2 tables?
(Select the correct response)
A. Net Search
B. XML Extender
C. AVI Extender
D. Text Extender

(37/55)Which of the following processing can occur for a unit


of work using
an isolation level of Read Stability and scanning through the table
more tha
n once within the unit of work?
(Select the correct response)
A. Access uncommitted changes made by other processes
B. Update uncommitted changes made by other processes
C. Rows added to a result set by other processes from one
scan to the next
D. Rows changed in a result set by other processes from one
scan to the next

(38/55)Which two of the following SQL data types should be


used to store bi
nary data?
(Select all that apply)
A. CLOB
B. BLOB
C. VARCHAR
D. GRAPHIC
E. VARCHAR FOR BIT DATA

(39/55) Given an application bound with cursor stability which


will be upda
ting rows in a table and obtaining row locks, which of the
following table lo
cks will DB2 acquire for the application first?
(Select the correct response)
A. U – update
B. X – exclusive
C. IU - intent update
D. IX - intent exclusive

(40/55)Which of the following is the result of the following SQL


statement:

ALTER TABLE table1 ADD col2 INT WITH DEFAULT

(Select the correct response)


A. The statement fails with a negative SQL code.
B. The statement fails because no default value is specified.
C. A new column called COL2 is added to TABLE1 and
populated with zeros.
D. A new column called COL2 is added to TABLE1 and
populated with nulls.
E. A new column called COL2, which cannot contain nulls, is
added to TABLE1.

(41/55)In which of the following locations are the referential


constraints
stored?
(Select the correct response)
A. The user tables.
B. The explain tables.
C. SYSIBM.SYSTRIGGERS.
D. The system catalog tables.

(42/55)If a DB2 Warehouse Manager toolkit is selected during


the installati
on of DB2 UDB Version 7.1, which of the following databases
must be defined?

(Select the correct response)


A. None
B. Target Database
C. Source Database
D. Control Database

(43/55)Given the two following table definitions:


ORG
Deptnumb INTEGER
Deptname CHAR(30)
Manager INTEGER
Division CHAR(30)
Location CHAR(30)

STAFF
Id INTEGER
Name CHAR(30)
Dept INTEGER
Job CHAR(20)
Years INTEGER
Salary DECIMAL(10,2)
Comm DECIMAL(10,2)
Which of the following statements will display each department,
by name, and
the total salary of all employees in the department?
(Select the correct response)
A. SELECT a.deptname, SUM(b.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt ORDER BY a.deptname
B. SELECT b.deptname, SUM(a.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt ORDER BY a.deptname
C. SELECT a.deptname, SUM(b.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt GROUP BY a.deptname
D. SELECT b.deptname, SUM(a.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt GROUP BY a.deptname

(44/55)Given the following scenario: An application uses a 15


digit value t
o uniquely identify customer transactions. This number is also
used for arith
metic operations. Which of the following is the most efficient DB2
data type
for the column definition for this purpose?
(Select the correct response)
A. CHAR
B. CLOB
C. INTEGER
D. NUMERIC(15,2)]
E. DECIMAL(15,0)

(45/55)Which of the following tools allows the DBA to set


limits, and be al
erted if these limits are exceeded?
(Select the correct response)
A. DB2 Index Wizard
B. DB2 Script Center
C. DB2 Command Center
D. DB2 Performance Monitor
(46/55) Given the statement:
CREATE TABLE t1
(
c1 CHAR(3)
CONSTRAINT c1
CHECK (c1 IN ('A01','B01','C01'))
)
DB2 verifies that the table check constraint is met during which
of the follo
wing actions?
(Select the correct response)
A. Adding data using load
B. The reorg of the table
C. The insert of each row in t1
D. The creation of the index for the table

(47/55)Given the following SQL statements:


CREATE TABLE tab1 (col1 INT)
CREATE TABLE tab2 (col1 INT)
INSERT INTO tab1 VALUES (NULL),(1)
INSERT INTO tab2 VALUES (NULL),(1)
SELECT COUNT(*) FROM tab1
WHERE col1 IN
(SELECT col1 FROM tab2)
Which of the following is the result of the SELECT COUNT(*)
statement?
(Select the correct response)
A. 1
B. 2
C. 3
D. 4
E. 0

(48/55)Given two embedded SQL program executions with the


following actions
:
Pgm1
INSERT INTO mytab VALUES (...)
COMMIT
INSERT INTO mytab VALUES (...)
ROLLBACK

Pgm2
INSERT INTO mytab VALUES (...)
ROLLBACK
INSERT INTO mytab VALUES (...)
COMMIT
How many records will be successfully inserted and retained in
the table myta
b?
(Select the correct response)
A. 1
B. 2
C. 3
D. 4

(49/55)Given the table T1 created by:


CREATE TABLE t1
(
id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY,
c1 CHAR(10) NOT NULL,
c2 CHAR(10)
)
Which of the following INSERT statements will succeed?
(Select the correct response)
A. INSERT INTO t1 VALUES (1, 'abc', NULL)
B. INSERT INTO t1 VALUES (1, NULL, 'def')
C. INSERT INTO t1 (c1, c2) VALUES ('abc', NULL)
D. INSERT INTO t1 (c1, c2) VALUES (NULL, 'def')

(50/55)Which of the following tasks can be performed using


the ALTER TABLES
PACE statement?
(Select the correct response)
A. Assign a bufferpool.
B. Change the table space name.
C. Change the type of the table space.
D. Change the page size of the table space.

(51/55)A view is used instead of a table for users to do which


of the follo
wing?
(Select the correct response)
A. Avoid allocating more disk space per database
B. Provide users with the ability to define indexes
C. Restrict user's access to a subset of the table data
D. Avoid allocating frequently used query result tables

(52/55)Given the following table definitions:


DEPARTMENT
Deptno CHAR(3)
Deptno CHAR(30)
Mgrno INTEGER
Admrdept CHAR(3)

EMPLOYEE
Empno INTEGER
Firstname CHAR(30)
Midinit CHAR
Lastname CHAR(30)
Workdept CHAR(3)
Which of the following statements will list the employee's
employee number, l
ast name, and department name ONLY for those employees who
have a department?
(Select the correct response)
A. SELECT e.empno, e.lastname, d.deptname FROM
employee e, department d WHERE
e.workdept = d.deptno
B. SELECT e.empno, e.lastname, d.deptname FROM
employee e LEFT OUTER JOIN dep
artment d ON e.workdept = d.deptno
C. SELECT e.empno, e.lastname, d.deptname FROM
employee e FULL OUTER JOIN dep
artment d ON e.workdept = d.deptno
D. SELECT e.empno, e.lastname, d.deptname FROM
employee e RIGHT OUTER JOIN de
partment d WHERE e.workdept = d.deptno

(53/55)A table called EMPLOYEE has columns: name,


department, and phone_num
ber. Which of the following can limit access to the phone_number
column?
(Select the correct response)
A. Using a view to access the table
B. Using an index on the column
C. Using a referential constraint on the table
D. Using a table check constraint on the table
E. Revoking access from the phone_number column

(54/55)Given the following:


A table containing a list of all seats on an airplane. A seat
consists of a s
eat number and whether or not it is assigned. An airline agent
lists all the
unassigned seats on the plane. When the agent refreshes the list
from the tab
le, it should only change if another agent unassigns a currently
assigned sea
t.
Which of the following isolation levels should be used for this
application?

(Select the correct response)


A. Read stability
B. Repeatable read
C. Cursor stability
D. Uncommitted read

(55/55)Given table EMPLOYEE with columns EMPNO and


SALARY and table JOB wit
h columns ID and TITLE, what is the effect of the statement:
UPDATE employee SET salary = salary * 1.15
WHERE salary < 15000 OR
EXISTS (SELECT 1 FROM job WHERE job.id = employee.empno
AND job.title = 'Mgr'
)
(Select the correct response)
A. Only managers that make less than 15,000 are given
salary increases.
B. Only non-managers that make less than 15,000 are given
salaray increases.
C. Employees that make less than 15,000 but no managers
are given salary incr
eases.
D. Employees that make less than 15,000 and all managers
are given salary inc
reases.

1. With Dbadm authority on the database and given the


statements :
Create table t1 (cl Char (1))
Insert into t1 values ( 'b')
Create view v1 as select cl from t1 where c1= 'a' with check
option
Insert into v1 values ( 'a')
Insert into v1 values ( 'b')
How many rows would be returned from the statement, the
select from t1? cl
(Select the correct response)
A.0
B.1
C.2
D.3

2. Which of the following statements will create an index and


prevent table t
One from containing two or more rows with the same values for
column C1?
(Select the correct response)
A. Create index ix4 UN on t1 (cl)
B. Create index ix1 on distinct t1 (cl)
C. Create index ix6 UN on t1 (c1,c2)
D. Create index ix3 distinct on t1 (c1,c2)

3. A user has a numeric data column with a maximum value of


100,000. Which of
The following data types will use the minimum amount of storage
for the colu
Mn?
(Select the correct response)
A. Identity
B. BIGINT
C. Michael
D. Smallint

4. J. the table T1, created by :


Create table t1
(
Id Michael generated by default as identity.
Cl Char (3)
)
The following SQL statements are issued :
Insert into t1 values (1, 'ABC')
Insert into t1 values (5, 'DEF')
Which of the following values are inserted into the ID column by
the followin
G statement?
Insert into t1 (cl) values ( 'XYZ')
(Select the correct response)
A.0
B.1
C.2
1,479
1,100,300

5. Which of the following is the implicit qualifier for a declared


temporary
Table?
(Select the correct response)
A. The schema name Syscat.
B. The schema name session.
C. The schema name Tempuser.
D. The userid specified with the bind command.
E. The userid who established the connection to the database and
declared the
Temporary table.

6. Which of the following is the best way to restrict user access


to a subset
Of columns in a table?
(Select the correct response)
A. Only grant access to the columns within a table that a user is
allowed to
See.
B. Create a view that only includes the columns a user is allowed
to see. Gra
Ntw@had.gov.hk the user access to the view, not the base table.

C. Create two tables : one with the columns that a user is


allowed to see, and
One that has the cover columns, and use a join when all data
must be
Presented.
D. Create two tables : one with the columns that a user is
allowed to see, and
One that has the cover columns, and use a union when all data
must be
Presented.

7. Which of the following is the result of a successful rollback


statement?
(Select the correct response)
A. Held locks are released
B. Release-pending conditions are undone
C. Tables are released in load pending
D. Constraint checking conditions are undone
E. Existing database connections are released

8. Which of the following two modes can be used on the lock


table statement?

(Select all that apply)


A. Share mode
B. Exclusive mode
C. Repeatable � mode
D. Uncommitted � mode
E. Intent exclusive mode

9. Which of the following must be set up to allow the Control


Center to view
Database objects?
(Select the correct response)
A. ODBC
B. Java
C. DB2 Administration Server
D. Client Configuration Assistant

10. Which of the following tools maintains a history of all


executed statemen
Ts/commands for the current session within the tool?
(Select the correct response)
A. Journal
B. SQL Assist
C. DB2 Alert Center
D. DB2 Command Center

11. J. the two following tables :


Points
Name Points
Wayne Gretzky 244
Jaromir Jagr 168
Bobby Orr 129
Bobby Hull 93
Brett Hull 121
Mario Lemieux 189

PIM
Name PIM
Mats Sundin 14
Jaromir Jagr 18
Bobby Orr 12
Mark Messier 32
Brett Hull 66
Mario Lemieux 23
Joe Sakic 94
Which of the following statements will display the player 's
Names, points and
PIM for all players?
(Select the correct response)
A. Select points.name, points.points, pim.name, pim.pim from
points inner Joi
N pim on points.name=pim.name
B. Select points.name, points.points, pim.name, pim.pim from
points full oute
R join pim on points.name=pim.name
C. Select points.name, points.points, pim.name, pim.pim from
points left oute
R join pim on points.name=pim.name
D. Select points.name, points.points, pim.name, pim.pim from
points right Link
ER join pim on points.name=pim.name

12. J. the following :


TAB1 TAB2
C1 C2 flight fees
--- --- --- ---
A 11 a 21
C 22 B 12
C 13 D 23
The following results are desired :
C1 C2 flight fees
-- -- -- --
A 11 a 21
C 13 C 22
-- -- D 23
Which of the following joins will yield the desired results?
(Select the correct response)
A. Select * from tab1, tab2 where c1=c0078
B. Select * from tab1 inner join tab2 on c1=cx
C. Select * from tab1 full outer join tab2 on c1=cx
D. Select * from tab1 right outer join tab2 on c1=cx

13. J. two embedded SQL programs and the following actions :


Pgm1 Pgm2
Mytab insert into values (. . . ) delete from mytab
Commit rollback
Delete from mytab mytab insert into values (. . . )
Rollback commit
If there exists one (1) row in table mytab before the programs
are executed c
Oncurrently, how many records will be in the table once the
programs complete
?
(Select the correct response)
A.0
B.1
C.2
D.3
Objective E.4

14 Which of the following DB2 data types is used to store 50 MB


of binary dat
A as a single value?
(Select the correct response)
A. Blob
B. Clob
C. DBCLOB
D. For bit data
E. Varchar for bit data

15. J. the following table definition :


Staff
Id Michael
Name Char (20)
Dept. Michael
Job Char (20)
Years Michael
Salary Decimal (10,2)
V.. Decimal (10,2)
Which of the following statements will return all of the records
ordered by j
Summer with the salaries in descending order?
(Select the correct response
A. Select * from staff designs by salary Desc, job
B. Select * from staff group by salary Desc, job
C. Select * from staff designs feature job, salary DESC
D. Select * from staff group by job, the salary DESC

16. J. the following table definitions


English
Deptno Char (3)
Deptname Char (30)
Mgrno Michael
Admrdept Char (3)

Employee
Empno Michael
Firstname Char (30)
Mr. Midinit
Lastname Char (30)
Workdept Char (3)
Which of the following statements will list the employee 's
employee number, l
Ast name, and meaning name only for those employees who
have a department?
A. Select e.empno, e.lastname, d.deptname from employee e,
meaning d where
E.workdept = d.deptno
B. Select e.empno, e.lastname, d.deptname from employee e left
outer join dep
Artment d = d.deptno on e.workdept
C. Select e.empno, e.lastname, d.deptname from employee e full
outer join dep
Artment d = d.deptno on e.workdept
D. Select e.empno, e.lastname, d.deptname from employee e
right outer join de
Where e.workdept partment d = d.deptno

17. J. the statement :


Create table t1 (cl Char (1))
Data has been inserted into the table with rows of a,b,c,d,e,f. J.
the fol
Lowing command is issued :
Alter table t1 add constraint con1 check (cl = 'a')
Which of the following occurs?
(Select the correct response)
A. Rows with cl values of b,c,d,e,f are deleted
B. Rows with cl values of b,c,d,e,f have cl set to null
C. The alter command will fail as rows violate the constraint
D. The alter command will move the violating rows to the
exception table

18. J. the following table structure :


Table1
Emp_num INT secret null Sha key
Emp_fname Char (30) merely null
Emp_lname Char (30) merely null
Emp_addr Char (60) merely null
Emp_pin Char (10) merely null
Which of the following columns can be referenced by a foreign
key clause from
Another table?
(Select the correct response)
A. Emp_num
B. Emp_pin
C. Emp_addr
D. Emp_fname
E. Emp_lname

19. Which of the following products can be used to perform a


dictionary-based
Search?
(Select the correct response)
A. Net.Data
B. XML Extender
C. Avi Extender
D. Text Extender

20. Which of the following DB2 components can limit the


resource consumption
Of queries?
(Select the correct response)
A. DB2 Connect
B. DB2 Query Patroller
C. DB2 Performance Monitor
D. DB2 Net Search Extender

21. J. the table :


Country
ID name person cities
1 Argentina 1 10
2 Canada 2 20
3 Cuba 2 10
4 Germany 1 0
7 5 5 France
Which of the following clauses when added to the statement
SELECT cities, name FROM country
returns rows sorted by NAME and then sorted by the number of
cities (CITIES)?
(Select the correct response)
A. ORDER BY 2,1
B. GROUP BY 2, 1
C. ORDER BY cities, name
D. GROUP BY cities, name

22. Which of the following will rebuild a package in the database


from the ex
isting catalog information?
(Select the correct response)
A. bind
B. rebind
C. update
D. rebuild

23. Given the following column requirements:


Col1 Numeric Identifier - From 1 to 1000000
Col2 Job Code - Variable, 1 to 2 characters long
Col3 Job Description - Variable, 1 to 100 characters long
Col4 Job Length - Length of Job in seconds
Which of the following will minimize the disk space allocated to
store the re
cords if Job Description has an average length of 45?
(Select the correct response)
A. CREATE TABLE tab1 (col1 INT, col2 CHAR(2), col3
CHAR(100), col4 INT)
B. B. CREATE TABLE tab1 (col1 INT, col2 VARCHAR(2), col3
CHAR(100), col4 INT)
C. CREATE TABLE tab1 (col1 INT, col2 CHAR(2), col3
VARCHAR(100), col4 INT)
D. CREATE TABLE tab1 (col1 INT, col2 VARCHAR(2), col3
VARCHAR(100), col4 INT)

24. Given the following UPDATE statement:


UPDATE address2 SET housenumber_buildingname=
(SELECT buildingname FROM address1
WHERE address2.id = address1.id)
WHERE HOUSENUMBER_BUILDINGNAME IS NULL
Which of the following describes the result of the statement?
(Select the correct response)
A. The statement will succeed.
B. The statement will fail because a subquery cannot exist in
an UPDATE state
ment.
C. The statement will succeed only if ADDRESS1.ID and
ADDRESS2.ID are defined
as primary keys.
D. The statement will succeed if the data retrieved from the
subquery does no
t have duplicate values for ADDRESS1.ID.

25. Which of the following processing can occur for a unit of work
using an i
solation level of Cursor Stability and allows scanning through the
table more
than once within the unit of work?
(Select the correct response)
A. Access uncommitted changes made by other processes
B. Update uncommitted changes made by other processes
C. Have updated result set rows changed by other processes
from one scan to t
he next
D. Have accessed result set rows changed by other processes
from one scan to
the next

26. How many DB2 Administration Server (DAS) Instances can


be set up per phys
ical machine?
(Select the correct response)
A.0
B.1
C. One for each instance on the physical machine
D. One for each database on the physical machine

27. A table called EMPLOYEE has columns: name, department,


and phone_number.
Which of the following can limit access to the phone_number
column?
(Select the correct response)
A. Using a view to access the table
B. Using an index on the column
C. Using a referential constraint on the table
D. Using a table check constraint on the table
E. Revoking access from the phone_number column

28. Given the following transaction:


CREATE TABLE dwaine.mytab (col1 INT, col2 INT)
INSERT INTO dwaine.mytab VALUES (1,2)
INSERT INTO dwaine.mytab VALUES (4,3)
ROLLBACK
Which of the following would be returned from the statement:
SELECT * FROM dwaine.mytab?
(Select the correct response)
A. COL1 COL2
----------- -----------
0 record(s) selected.
B. COL1 COL2
----------- -----------
1 2
1 record(s) selected.

C. SQLCODE -204 indicating that "DWAINE.MYTAB" is an


undefined name.
D. COL1 COL2
----------- -----------
1 2
4 3

29. Given the table definition:


CREATE TABLE student (name CHAR(30), age INTEGER)
To list the names of the 10 youngest students, which of the
following index d
efinition statements on the student table may improve the query
performance?

(Select the correct response)


A. CREATE INDEX youngest ON student (age, name)
B. CREATE INDEX youngest ON student (name, age)
C. CREATE INDEX youngest ON student (name, age DESC)
D. CREATE INDEX youngest ON student (name DESC)
INCLUDE (age)
30. Which of the following privileges is necessary to populate the
table with
large amounts of data?
(Select the correct response)
A. LOAD
B. ALTER
C. UPDATE
D. IMPORT

31. Which of the following DB2 CLP options specify the file that
contains the
statements to be executed?
(Select the correct response)
A. –f
B.-b
C.-o
D.-w

32. Given the following table with a primary key on empid:


Emp:
Empid Name
11 Joe Smith
23 Melanie Jones
30 Robert Bruce
49 Janice Baker
66 Mario Diaz
68 Maria Diaton
Give the following statement in an embedded SQL program
bound with Repeatable
Read:
Select * from Emp where empid < 55
How many rows in the table will be locked after the statement is
run?
A.0
B.1
C.4
D.5
E.6

33. Given table T1 with 100 rows, which of the following queries
will retriev
e 10 rows from table T1?
(Select the correct response)
A. SELECT * FROM t1 MAXIMUM 10 ROWS
B. SELECT * FROM t1 READ 10 ROWS ONLY
C. SELECT * FROM t1 OPTIMIZE FOR 10 ROWS
D. SELECT * FROM t1 FETCH FIRST 10 ROWS ONLY

34. Which of the following DELETE RULES on CREATE TABLE will


delete a depende
nt table row if the parent table row is deleted?
(Select the correct response
A. ON DELETE REMOVE
B. ON DELETE CASCADE
C. ON DELETE RESTRICT
D. ON DELETE SET NULL
E. ON DELETE PROPAGATE

35. Which of the following isolation levels will lock only the rows
returned
in the result set?
A. Read Stability
B. Repeatable Read
C. Cursor Stability
D. Uncommitted Read

36. Using the Control Center Create Table dialog box, which of
the following
dialogs allows the table creation DDL to be viewed?
(Select the correct response
A. Copy
B. Show SQL
C. Show Related
D. Sample Contents

37. Which of the following does NOT end a unit of work?


(Select the correct response)
A. COMMIT
B. ROLLBACK
C. TERMINATE
D. SAVEPOINT
E. CONNECT RESET

38. Given the following embedded SQL programs:


Program 1:
CREATE TABLE mytab (col1 INT, col2 CHAR(24))
COMMIT
Program 2:
INSERT INTO mytab VALUES ( 20989,'Joe Smith')
INSERT INTO mytab VALUES ( 21334,'Amy Johnson')
COMMIT
DELETE FROM mytab
ROLLBACK
INSERT INTO mytab VALUES ( 23430,'Jason French')
ROLLBACK
INSERT INTO mytab VALUES ( 20993,'Samantha Jones')
COMMIT
DELETE FROM mytab WHERE col1=20993
ROLLBACK
Which of the following indicates the number of records that will
be returned
by the statement:
SELECT * FROM mytab?
(Select the correct response)
A.0
B.1
C.2
D.3
E.4

39. Given an embedded SQL program with a single connection,


two threads and t
he following actions:
Thread 1: INSERT INTO mytab VALUES (...)
Thread 2: INSERT INTO mytab VALUES (...)
Thread 1: COMMIT
Thread 2: INSERT INTO mytab VALUES (...)
Thread 1: ROLLBACK
How many records will be successfully inserted and retained in
the table myta
b?
(Select the correct response)
A.0
B.1
C.2
D.3

40. Which two of the following types of storage management


method is supporte
d by DB2 OLAP Server ?
(Select all that apply)
A. Object
B. Network
C. Relational
D. Hierachical
E. Multi-dimensional

41. Given table EMPLOYEE with columns EMPNO and SALARY and
table JOB with col
umns ID and TITLE, what is the effect of the statement:
UPDATE employee SET salary = salary * 1.15
WHERE salary < 15000 OR
EXISTS (SELECT 1 FROM job WHERE job.id = employee.empno
AND job.title = 'Mgr'
)
(Select the correct response)
A. Only managers that make less than 15,000 are given
salary increases.
B. Only non-managers that make less than 15,000 are given
salaray increases.
C. Employees that make less than 15,000 but no managers
are given salary incr
eases.
D. Employees that make less than 15,000 and all managers
are given salary inc
reases.

42. When manually establishing communications from a Windows


NT client throug
h a DB2 Connect gateway to DB2 UDB for OS/390, which of the
following is NOT
required to catalog?
(Select the correct response
A. The client.
B. The database on the DRDA server.
C. The Database Connection Service database.
D. The node where the DB2 Connect Gateway is.

43. Which of the following is the most appropriate reason to


consider revokin
g the SELECT privilege on the catalog tables from PUBLIC after
creating a dat
abase?
(Select the correct response
A. To prevent users from creating tables without proper
authority.
B. Some system catalogs record user data in some columns, and
this data may b
e confidential.
C. To prevent users from viewing passwords for other DB2
userids that DB2 sto
res in the catalog tables.
D. Some catalog tables are large, so preventing users from
viewing them is a
good way to keep users from submitting long-running queries
against the catal
ogs.

44. For which of the following can locks be obtained?


(Select the correct response)
A. A trigger
B. A table view
C. A table column
D. A database buffer
E. A row referenced by an index key

45. With tables defined as:


Table1
col1 INT
col2 CHAR(30)

Table2
col1 INT
col2 CHAR(30)
Which of the following statements will insert all the rows in
TABLE2 into TAB
LE1?
(Select the correct response)
A. INSERT INTO table1 SELECT col1, col2 FROM table2
B. INSERT INTO table1 AS SELECT col1, col2 FROM table2
C. INSERT INTO table1 VALUES (table2.col1, table2.col2)
D. INSERT INTO table1 VALUES (SELECT col1, col2 FROM
table2)
E. INSERT INTO table1 (col1,col2) VALUES (SELECT
col1,col2 FROM table2)

47. Which of the following products must be installed to provide a


single poi
nt of control for local and remote DB2 databases?
(Select the correct response
A. DB2 Runtime Client
B. DB2 Administration Client
C. DB2 Connect Enterprise Edition
D. DB2 Enterprise-Extended Edition

48. Which one of the following SQL statements sets the default
qualifier to "
user1"?
(Select the correct response)
A. SET CURRENT ID = 'user1'
B. SET CURRENT USER = 'user1'
C. SET CURRENT SQLID = 'user1'
D. SET CURRENT QUALIFIER = 'user1'

49. Which of the following can be used to determine the views


that are affect
ed by a DROP TABLE statement?
(Select the correct response)
A. DB2 Script Center
B. DB2 Performance Monitor
C DB2 Control Center, Show Related
D. DB2 Control Center, Sample Contents

50. A view is used instead of a table for users to do which of the


following?
(Select the correct response)
A. Avoid allocating more disk space per database
B. Provide users with the ability to define indexes
C. Restrict user's access to a subset of the table data
D. Avoid allocating frequently used query result tables

51. Which of the following processing can occur for a unit of work
using an i
solation level of Read Stability and scanning through the table
more than onc
e within the unit of work?
(Select the correct response)
A. Access uncommitted changes made by other processes
B. Update uncommitted changes made by other processes
C. Rows added to a result set by other processes from one scan
to the next
D. Rows changed in a result set by other processes from one
scan to the next

52. Given the tables:


TABLEA TABLEB
Empid name empid weeknumber paycheck
1 JOE 1 1 1000.00
2 BOB 1 2 1000.00
2 1 1000.00
TABLEB was defined as follows:
CREATE TABLE tableb (empid CHAR(3), weeknumber CHAR(3),
paycheck DECIMAL(6,2)
,
CONSTRAINT const1 FOREIGN KEY (empid)
REFERENCES tablea (empid) ON DELETE SET NULL)
How many rows would be deleted from tableb if the following
command is issued
:
DELETE FROM tablea WHERE empid = '2'?
(Select the correct response)
A.0
B.1
C.2
D.3
53. To set up a client that can access DB2 UDB through DB2
Connect Enterprise
Edition, which of the following is the minimum software client
that must be
installed?
(Select the correct response)
A. DB2 Runtime Client
B. DB2 Personal Edition
C. DB2 Administration Client
D. DB2 Application Developer's Client

54. Given the following table definition:


STAFF
Id INTEGER
Name CHAR(20)
Dept INTEGER
Job CHAR(20)
Years INTEGER
Salary DECIMAL(10,2)
Comm. DECIMAL(10,2)
Which of the following statements will return all of the records
ordered by j
ob with the salaries in descending order?
(Select the correct response
E. SELECT * FROM staff ORDER BY salary DESC, job
F. SELECT * FROM staff GROUP BY salary DESC, job
G. SELECT * FROM staff ORDER BY job, salary DESC
H. SELECT * FROM staff GROUP BY job, salary DESC

55. Given the table:


COUNTRY
ID NAME PERSON CITIES
1 Argentina 1 10
2 Canada 2 20
3 Cuba 2 10
4 Germany 1 0
5 France 7 5
Which of the following clauses when added to the statement
SELECT cities, name FROM country
returns rows sorted by NAME and then sorted by the number of
cities (CITIES)?

(Select the correct response)


E. ORDER BY 2,1
F. GROUP BY 2, 1
G. ORDER BY cities, name
H. GROUP BY cities, name

1. Which of the following is the result of the following SQL


statement :
Create index empno_ind on UN employee (empno)
(Select the correct response)
A. Excellent value for Empno must be unique.
B. Update statements on Empno will be rolled back.
C. Insert doubtful on Empno will always be faster.
D. Insert Empno doubtful on the table will result in clustered
data.

2. Which of the following will rebuild a package in the database


from the exi
Sting catalog information?
(Select the correct response)
A. Bind
B. Rebind
C. Update
D. Counterpart

3. Why is a unique site not sufficient for creation of a primary


key?
(Select the correct response)
A. It is sufficient-a primary key is the same thing as a unique
index.
B. Unique indexes can be defined in ascending or descending
order. Primary k
Eys must be ascending.
C. A unique index can be defined over a column or columns that
allow nulls. P
Rimary keys Cohen contain nulls.
D. A unique index can be defined over a column or columns that
allow nulls. T
His is not allowed for primary keys because foreign keys Cohen
contain nulls
.

4. Which of the following statements will create an index and


prevent table t
One from containing two or more rows with the same values for
column C1?
(Select the correct response)
A. Create index ix4 UN on t1 (cl)
B. Create index ix1 on distinct t1 (cl)
C. Create index ix6 UN on t1 (c1,c2)
D. Create index ix3 distinct on t1 (c1,c2)

5. Which of the following DB2 data types is used to store 50 MB


of binary dat
A as a single value?
(Select the correct response)
A. Blob
B. Clob
C. DBCLOB
D. For bit data
E. Varchar for bit data

6. J. the following update statement :


Update address2 set housenumber_buildingname=
(select from address1 buildingname
Where address2.id = address1.id)
Where is null HOUSENUMBER_BUILDINGNAME
Which of the following describes the result of the statement?
(Select the correct response)
A. The statement will succeed.
B. The statement will fail because a subquery generation exist in
an update state
Discussion.
C. The statement will succeed only if ADDRESS1.ID and
ADDRESS2.ID are defined
As primary keys.
D. The statement will succeed if the data retrieved from the
subquery does no
T have duplicate values for ADDRESS1.ID.
7. Which two of the following types of storage management
method is supported
By DB2 OLAP Server?
(Select all that apply)
A. Scrap
B. Network
C. Relational
D. Hierachical
E. Multi-dimensional

8. J. the table :
Country
ID name person cities
1 Argentina 1 10
2 Canada 2 20
3 Cuba 2 10
4 Germany 1 0
7 5 5 France
Which of the following clauses when added to the statement
Select cities, name from country
Returns rows sorted by name and then sorted by the number of
cities (cities)?

(Select the correct response)


A. Designs feature 2
B. Group by 2, 1
C. Designs feature cities, name
D. Group by cities, name

9. A view is used instead of a table for users to do which of the


following?

(Select the correct response)


A. Avoid allocating more disk space per database
B. Provide users with the ability to define 1978-1992
C. Restrict user 's access to a subset of the table data
D. Avoid allocating frequently used query result tables

10. Which of the following must be set up to allow the Control


Center to view
Database objects?
(Select the correct response)
A. ODBC
B. Java
C. DB2 Administration Server
D. Client Configuration Assistant

11. Which of the following does merely end a unit of work?


(Select the correct response)
A. Commit
B. Rollback
C. Terminate
D. Savepoint
E. Connect reset

12. J. the statement :


Create table t1 (cl Char (1))
Data has been inserted into the table with rows of a,b,c,d,e,f. J.
the fol
Lowing command is issued :
Alter table t1 add constraint con1 check (cl = 'a')
Which of the following occurs?
(Select the correct response)
A. Rows with cl values of b,c,d,e,f are deleted
B. Rows with cl values of b,c,d,e,f have cl set to null
C. The alter command will fail as rows violate the constraint
D. The alter command will move the violating rows to the
exception table

13. Which of the following DB2 CLP options specify the file that
contains the
Doubtful to be executed?
(Select the correct response)
A. -f
B. -b
C. -o
D. -w

14. Which of the following is the best way to restrict user access
to a subse
T of columns in a table?
(Select the correct response)
A. Only grant access to the columns within a table that a user is
allowed to
See.
B. Create a view that only includes the columns a user is allowed
to see. Gra
Ntw@had.gov.hk the user access to the view, not the base table.

C. Create two tables : one with the columns that a user is


allowed to see, and
One that has the cover columns, and use a join when all data
must be
Presented.
D. Create two tables : one with the columns that a user is
allowed to see, and
One that has the cover columns, and use a union when all data
must be
Presented.

15. J. the following embedded SQL programs :


Program 1 :
Create table mytab (col1 Int, col2 Char (24))
Commit
Program 2 :
Mytab insert into values (20,989, 'Joe Smith')
Mytab insert into values (21334, 'Amy Johnson')
Commit
Delete from mytab
Rollback
Mytab insert into values (23,430, 'Jason French')
Rollback
Mytab insert into values (20,993, 'Samantha Jones')
Commit
Delete from mytab where col1=20993
Rollback
Which of the following indicates the number of records that will
be returned
By the statement :
Select * from mytab?
(Select the correct response)
A. .
B.1
C.2
D.3
Objective E.4

16. When manually establishing communications from a Windows


NT 瀹 ㈡ 埗 throug
Ha DB2 Connect gateway to DB2 UDB for OS/390, which of the
following is merely
Required to catalog?
(Select the correct response)
A. The 瀹 ㈡ 埗.
B. The DRDA databases on the server.
C. The Database Connection Service database.
D. The node where the DB2 Connect Gateway is.

17. Which of the following products can be used to perform a


dictionary-based
Search?
(Select the correct response)
A. Net.Data
B. XML Extender
C. Avi Extender
D. Text Extender

18. J. the following DDL statements,


Create table t1 (a Int, b Int, c INT)
Create view v1 as select a, b, c from t1
Where a "; 250
With check option
Which of the following insert statements will fail?
(Select the correct response)
A. Insert into t1 values (200, 2, 3)
B. Insert into v1 values (200, 2, 3)
C. Insert into t1 values (300, 2, 3)
D. Insert into v1 values (300, 2, 3)

19. J. the two following tables :


Points
Name Points
Wayne Gretzky 244
Jaromir Jagr 168
Bobby Orr 129
Bobby Hull 93
Brett Hull 121
Mario Lemieux 189

PIM
Name PIM
Mats Sundin 14
Jaromir Jagr 18
Bobby Orr 12
Mark Messier 32
Brett Hull 66
Mario Lemieux 23
Joe Sakic 94
Which of the following statements will display the player 's
Names, points and
PIM for all players?
(Select the correct response)
A. Select points.name, points.points, pim.name, pim.pim from
points inner Joi
N pim on points.name=pim.name
B. Select points.name, points.points, pim.name, pim.pim from
points full oute
R join pim on points.name=pim.name
C. Select points.name, points.points, pim.name, pim.pim from
points left oute
R join pim on points.name=pim.name
D. Select points.name, points.points, pim.name, pim.pim from
points right Link
ER join pim on points.name=pim.name

20. Which of the following is the implicit qualifier for a declared


temporary
Table?
(Select the correct response)
A. The schema name Syscat.
B. The schema name session.
C. The schema name Tempuser.
D. The userid specified with the bind command.
E. The userid who established the connection to the database and
declared the
Temporary table.

21. Which of the following SQL statements can remove all rows
from a table na
Med COUNTRY?
(Select the correct response
A. Delete country
B. Delete from country
C. Delete * from country
D. Delete from country Souls

22. Which of the following occurs if an application during an


abnormally 82,000
Active unit of work?
(Select the correct response)
A. Current unit of work is committed
B. Current unit of work is rolled back
C. Current unit of work remains active
D. Current unit of work moves to pending state

23.A user creates the table TABLE1. Which of the following


statements would
explicitly give USER1 the ability to read rows from the table?
(Select the correct response)
A. GRANT VIEW TO user1 ON TABLE table1
B. GRANT READ TO user1 ON TABLE table1
C. GRANT SELECT ON TABLE table1 TO user1
D. GRANT ACCESS ON TABLE table1 TO user1

24.Which of the following tools can be used to identify


inefficient SQL stat
ements without executing the query?
(Select the correct response)
A. QMF
B. Script Center
C. Visual Explain
D. Performance Monitor

25.The DB2 Administration Server (DAS) is required for which


of the followin
g?
(Select the correct response)
A. For the administrator user id to install or remove DB2
B. For the remote clients to use the Control Center against
the instance
C. For checking authorities in the database manager
configuration for SYSADM
D. For maintaining authorities added and removed by the
SQL GRANT and REVOKE
commands respectively

26.Which of the following authorities should be given to the DB2


Administrat
ion Server (DAS) Instance owner at the administered instance?
(Select the correct response)
A. DBADM
B. SYSADM
C. SYSCTRL
D. SYSMAINT

27.Which two of the following DB2 authorization groups are


authorized to cre
ate a table within database sample?
(Select all that apply)
A. DBADM
B. DBCTRL
C. SYSADM
D. DBMAINT
E. ALTERIN
F. SYSMAINT

28.Given the following:


A table containing a list of all seats on an airplane. A seat
consists of a s
eat number and whether or not it is assigned. An airline agent
lists all the
unassigned seats on the plane. When the agent refreshes the list
from the tab
le, the list should not change.
Which of the following isolation levels should be used for this
application?

(Select the correct response)


A. Read stability
B. Repeatable read
C. Cursor stability
D. Uncommitted read

29.Which of the following is the result of the following SQL


statement:
ALTER TABLE table1 ADD col2 INT WITH DEFAULT
(Select the correct response)
A. The statement fails with a negative SQL code.
B. The statement fails because no default value is specified.
C. A new column called COL2 is added to TABLE1 and
populated with zeros.
D. A new column called COL2 is added to TABLE1 and
populated with nulls.
E. A new column called COL2, which cannot contain nulls, is
added to TABLE1.

30.To set up a client that can access DB2 UDB through DB2
Connect Enterprise
Edition, which of the following is the minimum software client
that must be
installed?
(Select the correct response)
A. DB2 Runtime Client
B. DB2 Personal Edition
C. DB2 Administration Client
D. DB2 Application Developer's Client

31.Which of the following types of DB2 locks allows for the most
concurrency
within a table?
(Select the correct response)
A. A row lock
B. A page lock
C. A field lock
D. A column lock
32.Which of the following processing can occur for a unit of
work using an i
solation level of Read Stability and scanning through the table
more than onc
e within the unit of work?
(Select the correct response)

A. Access uncommitted changes made by other processes


B. Update uncommitted changes made by other processes
C. Rows added to a result set by other processes from one
scan to the next
D. Rows changed in a result set by other processes from one
scan to the next

33.Given the following SQL statements:


CREATE TABLE tab1 (col1 INT)
CREATE TABLE tab2 (col1 INT)
INSERT INTO tab1 VALUES (NULL),(1)
INSERT INTO tab2 VALUES (NULL),(1)
SELECT COUNT(*) FROM tab1
WHERE col1 IN
(SELECT col1 FROM tab2)
Which of the following is the result of the SELECT COUNT(*)
statement?
(Select the correct response)
A. 1
B. 2
C. 3
D. 4
E. 0

34.Given an application bound with cursor stability which will be


updating r
ows in a table and obtaining row locks, which of the following
table locks wi
ll DB2 acquire for the application first?
(Select the correct response)
A. U – update
B. X – exclusive
C. IU - intent update
D. IX - intent exclusive

35.When granted to user1, which of the following will allow


user1 to ONLY ac
cess table data?
(Select the correct response)
A. DBADM authority
B. SYSADM authority
C. SELECT privilege on the table
D. SELECT privilege WITH GRANT OPTION on the table

The answer :
CACEE BA (AB) DA BDDAC ACADC
AACDD BACAA AECBA BDDB (De)
Dbcea () ABBC Caage

1. With Dbadm authority on the database and given the


statements :
Create table t1 (cl Char (1))
Insert into t1 values ( 'b')
Create view v1 as select cl from t1 where c1= 'a' with check
option
Insert into v1 values ( 'a')
Insert into v1 values ( 'b')
How many rows would be returned from the statement, the
select from t1? cl
(Select the correct response)
A.0
B.1
C.2
D.3

2. Which of the following statements will create an index and


prevent table t
One from containing two or more rows with the same values for
column C1?
(Select the correct response)
A. Create index ix4 UN on t1 (cl)
B. Create index ix1 on distinct t1 (cl)
C. Create index ix6 UN on t1 (c1,c2)
D. Create index ix3 distinct on t1 (c1,c2)

3. A user has a numeric data column with a maximum value of


100,000. Which of
The following data types will use the minimum amount of storage
for the colu
Mn?
(Select the correct response)
A. Identity
B. BIGINT
C. Michael
D. Smallint

4. J. the table T1, created by :


Create table t1
(

Id Michael generated by default as identity.


Cl Char (3)
)

The following SQL statements are issued :


Insert into t1 values (1, 'ABC')
Insert into t1 values (5, 'DEF')
Which of the following values are inserted into the ID column by
the followin
G statement?
Insert into t1 (cl) values ( 'XYZ')
(Select the correct response)
A.0
B.1
C.2
1,479
1,100,300

5. Which of the following is the implicit qualifier for a declared


temporary
Table?
(Select the correct response)
A. The schema name Syscat.
B. The schema name session.
C. The schema name Tempuser.
D. The userid specified with the bind command.
E. The userid who established the connection to the database and
declared the
Temporary table.

6. Which of the following is the best way to restrict user access


to a subset
Of columns in a table?
(Select the correct response)
A. Only grant access to the columns within a table that a user is
allowed to
See.
B. Create a view that only includes the columns a user is allowed
to see. Gra
Ntw@had.gov.hk the user access to the view, not the base table.

C. Create two tables : one with the columns that a user is


allowed to see, and
One that has the cover columns, and use a join when all data
must be
Presented.
D. Create two tables : one with the columns that a user is
allowed to see, and
One that has the cover columns, and use a union when all data
must be
Presented.

7. Which of the following is the result of a successful rollback


statement?
(Select the correct response)
A. Held locks are released
B. Release-pending conditions are undone
C. Tables are released in load pending
D. Constraint checking conditions are undone
E. Existing database connections are released
8. Which of the following two modes can be used on the lock
table statement?

(Select all that apply)


A. Share mode
B. Exclusive mode
C. Repeatable � mode
D. Uncommitted � mode
E. Intent exclusive mode

9. Which of the following must be set up to allow the Control


Center to view
Database objects?
(Select the correct response)
A. ODBC
B. Java
C. DB2 Administration Server
D. Client Configuration Assistant

10. Which of the following tools maintains a history of all


executed statemen
Ts/commands for the current session within the tool?
(Select the correct response)
A. Journal
B. SQL Assist
C. DB2 Alert Center
D. DB2 Command Center

11. J. the two following tables :


Points
Name Points
Wayne Gretzky 244
Jaromir Jagr 168
Bobby Orr 129
Bobby Hull 93
Brett Hull 121
Mario Lemieux 189

PIM
Name PIM
Mats Sundin 14
Jaromir Jagr 18
Bobby Orr 12
Mark Messier 32
Brett Hull 66
Mario Lemieux 23
Joe Sakic 94
Which of the following statements will display the player 's
Names, points and
PIM for all players?
(Select the correct response)
A. Select points.name, points.points, pim.name, pim.pim from
points inner Ridruejo
I
N pim on points.name=pim.name
B. Select points.name, points.points, pim.name, pim.pim from
points full Link
E
R join pim on points.name=pim.name
C. Select points.name, points.points, pim.name, pim.pim from
left Link points
E
R join pim on points.name=pim.name
D. Select points.name, points.points, pim.name, pim.pim points
right from OU
T
ER join pim on points.name=pim.name

12. J. the following :


TAB1 TAB2
C1 C2 flight fees
--- --- --- ---

A 11 a 21
C 22 B 12
C 13 D 23
The following results are desired :
C1 C2 flight fees
-- -- -- --

A 11 a 21
C 13 C 22
-- -- D 23
Which of the following joins will yield the desired results?
(Select the correct response)
A. Select * from tab1, tab2 where c1=c0078
B. Select * from tab1 inner join tab2 on c1=cx
C. Select * from tab1 full outer join tab2 on c1=cx
D. Select * from tab1 right outer join tab2 on c1=cx

13. J. two embedded SQL programs and the following actions :


Pgm1 Pgm2
Mytab insert into values (. . . ) delete from mytab
Commit rollback
Delete from mytab mytab insert into values (. . . )
Rollback commit
If there exists one (1) row in table mytab before the programs
are executed c
Oncurrently, how many records will be in the table once the
programs complete
?

(Select the correct response)


A.0
B.1
C.2
D.3
Objective E.4

14 Which of the following DB2 data types is used to store 50 MB


of binary dat
A as a single value?
(Select the correct response)
A. Blob
B. Clob
C. DBCLOB
D. For bit data
E. Varchar for bit data

15. J. the following table definition :


Staff
Id Michael
Name Char (20)
Dept. Michael
Job Char (20)
Years Michael
Salary Decimal (10,2)
V.. Decimal (10,2)
Which of the following statements will return all of the records
ordered by j
Summer with the salaries in descending order?
(Select the correct response
A. Select * from staff designs by salary Desc, job
B. Select * from staff group by salary Desc, job
C. Select * from staff designs feature job, salary DESC
D. Select * from staff group by job, the salary DESC

16. J. the following table definitions


English
Deptno Char (3)
Deptname Char (30)
Mgrno Michael
Admrdept Char (3)

Employee
Empno Michael
Firstname Char (30)
Mr. Midinit
Lastname Char (30)
Workdept Char (3)
Which of the following statements will list the employee 's
employee number, l
Ast name, and meaning name only for those employees who
have a department?
A. Select e.empno, e.lastname, d.deptname from employee e,
meaning d wher
E
E.workdept = d.deptno
B. Select e.empno, e.lastname, d.deptname from employee e left
outer join de
P
Artment d = d.deptno on e.workdept
C. Select e.empno, e.lastname, d.deptname from employee e full
outer join de
P
Artment d = d.deptno on e.workdept
D. Select e.empno, e.lastname, d.deptname from employee e
right outer join d
E
Where e.workdept partment d = d.deptno

17. J. the statement :


Create table t1 (cl Char (1))
Data has been inserted into the table with rows of a,b,c,d,e,f. J.
the fol
Lowing command is issued :
Alter table t1 add constraint con1 check (cl = 'a')
Which of the following occurs?
(Select the correct response)
A. Rows with cl values of b,c,d,e,f are deleted
B. Rows with cl values of b,c,d,e,f have cl set to null
C. The alter command will fail as rows violate the constraint
D. The alter command will move the violating rows to the
exception table

18. J. the following table structure :


Table1
Emp_num INT secret null Sha key
Emp_fname Char (30) merely null
Emp_lname Char (30) merely null
Emp_addr Char (60) merely null
Emp_pin Char (10) merely null
Which of the following columns can be referenced by a foreign
key clause from
Another table?
(Select the correct response)
A. Emp_num
B. Emp_pin
C. Emp_addr
D. Emp_fname
E. Emp_lname

19. Which of the following products can be used to perform a


dictionary-based
Search?
(Select the correct response)
A. Net.Data
B. XML Extender
C. Avi Extender
D. Text Extender

20. Which of the following DB2 components can limit the


resource consumption
Of queries?
(Select the correct response)
A. DB2 Connect

B. DB2 Query Patroller

C. DB2 Performance Monitor

D. DB2 Net Search Extender

21. Given the table:

COUNTRY

ID NAME PERSON CITIES


1 Argentina 1 10

2 Canada 2 20

3 Cuba 2 10

4 Germany 1 0

5 France 7 5

Which of the following clauses when added to the statement

SELECT cities, name FROM country

returns rows sorted by NAME and then sorted by the number of


cities (CITIES)?

(Select the correct response)

A. ORDER BY 2,1

B. GROUP BY 2, 1

C. ORDER BY cities, name

D. GROUP BY cities, name

22. Which of the following will rebuild a package in the database


from the ex
isting catalog information?

(Select the correct response)

A. bind

B. rebind

C. update
D. rebuild

23. Given the following column requirements:

Col1 Numeric Identifier - From 1 to 1000000

Col2 Job Code - Variable, 1 to 2 characters long

Col3 Job Description - Variable, 1 to 100 characters long

Col4 Job Length - Length of Job in seconds

Which of the following will minimize the disk space allocated to


store the re
cords if Job Description has an average length of 45?

(Select the correct response)

A. CREATE TABLE tab1 (col1 INT, col2 CHAR(2), col3


CHAR(100), col4 INT)
B. B. CREATE TABLE tab1 (col1 INT, col2 VARCHAR(2), col3
CHAR(100), col4 INT
)

C. CREATE TABLE tab1 (col1 INT, col2 CHAR(2), col3


VARCHAR(100), col4 INT)
D. CREATE TABLE tab1 (col1 INT, col2 VARCHAR(2), col3
VARCHAR(100), col4 INT
)

24. Given the following UPDATE statement:

UPDATE address2 SET housenumber_buildingname=

(SELECT buildingname FROM address1


WHERE address2.id = address1.id)

WHERE HOUSENUMBER_BUILDINGNAME IS NULL

Which of the following describes the result of the statement?

(Select the correct response)

A. The statement will succeed.

B. The statement will fail because a subquery cannot exist in


an UPDATE stat
e

ment.

C. The statement will succeed only if ADDRESS1.ID and


ADDRESS2.ID are define
d

as primary keys.

D. The statement will succeed if the data retrieved from the


subquery does n
o

t have duplicate values for ADDRESS1.ID.

25. Which of the following processing can occur for a unit of work
using an i
solation level of Cursor Stability and allows scanning through the
table more
than once within the unit of work?

(Select the correct response)

A. Access uncommitted changes made by other processes

B. Update uncommitted changes made by other processes


C. Have updated result set rows changed by other processes
from one scan to t
he next

D. Have accessed result set rows changed by other processes


from one scan to
the next

26. How many DB2 Administration Server (DAS) Instances can


be set up per phys
ical machine?

(Select the correct response)

A.0

B.1

C. One for each instance on the physical machine

D. One for each database on the physical machine

27. A table called EMPLOYEE has columns: name, department,


and phone_number.
Which of the following can limit access to the phone_number
column?
(Select the correct response)

A. Using a view to access the table

B. Using an index on the column

C. Using a referential constraint on the table

D. Using a table check constraint on the table


E. Revoking access from the phone_number column

28. Given the following transaction:

CREATE TABLE dwaine.mytab (col1 INT, col2 INT)

INSERT INTO dwaine.mytab VALUES (1,2)

INSERT INTO dwaine.mytab VALUES (4,3)

ROLLBACK

Which of the following would be returned from the statement:

SELECT * FROM dwaine.mytab?

(Select the correct response)

A. COL1 COL2

----------- -----------

0 record(s) selected.

B. COL1 COL2

----------- -----------

1 2

1 record(s) selected.

C. SQLCODE -204 indicating that "DWAINE.MYTAB" is an


undefined name.
D. COL1 COL2

----------- -----------
1 2

4 3

29. Given the table definition:

CREATE TABLE student (name CHAR(30), age INTEGER)

To list the names of the 10 youngest students, which of the


following index d
efinition statements on the student table may improve the query
performance?

(Select the correct response)

A. CREATE INDEX youngest ON student (age, name)

B. CREATE INDEX youngest ON student (name, age)

C. CREATE INDEX youngest ON student (name, age DESC)

D. CREATE INDEX youngest ON student (name DESC)


INCLUDE (age)

30. Which of the following privileges is necessary to populate the


table with
large amounts of data?

(Select the correct response)

A. LOAD

B. ALTER

C. UPDATE
D. IMPORT

31. Which of the following DB2 CLP options specify the file that
contains the
statements to be executed?

(Select the correct response)

A. –f

B.-b

C.-o

D.-w

32. Given the following table with a primary key on empid:

Emp:

Empid Name

11 Joe Smith

23 Melanie Jones

30 Robert Bruce

49 Janice Baker

66 Mario Diaz

68 Maria Diaton

Give the following statement in an embedded SQL program


bound with Repeatable
Read:
Select * from Emp where empid < 55

How many rows in the table will be locked after the statement is
run?
A.0

B.1

C.4

D.5

E.6

33. Given table T1 with 100 rows, which of the following queries
will retriev
e 10 rows from table T1?

(Select the correct response)

A. SELECT * FROM t1 MAXIMUM 10 ROWS

B. SELECT * FROM t1 READ 10 ROWS ONLY

C. SELECT * FROM t1 OPTIMIZE FOR 10 ROWS

D. SELECT * FROM t1 FETCH FIRST 10 ROWS ONLY

34. Which of the following DELETE RULES on CREATE TABLE will


delete a depende
nt table row if the parent table row is deleted?

(Select the correct response

A. ON DELETE REMOVE

B. ON DELETE CASCADE
C. ON DELETE RESTRICT

D. ON DELETE SET NULL

E. ON DELETE PROPAGATE

35. Which of the following isolation levels will lock only the rows
returned
in the result set?

A. Read Stability

B. Repeatable Read

C. Cursor Stability

D. Uncommitted Read

36. Using the Control Center Create Table dialog box, which of
the following
dialogs allows the table creation DDL to be viewed?

(Select the correct response

A. Copy

B. Show SQL

C. Show Related

D. Sample Contents

37. Which of the following does NOT end a unit of work?

(Select the correct response)


A. COMMIT

B. ROLLBACK

C. TERMINATE

D. SAVEPOINT

E. CONNECT RESET

38. Given the following embedded SQL programs:

Program 1:

CREATE TABLE mytab (col1 INT, col2 CHAR(24))

COMMIT

Program 2:

INSERT INTO mytab VALUES ( 20989,'Joe Smith')

INSERT INTO mytab VALUES ( 21334,'Amy Johnson')

COMMIT

DELETE FROM mytab

ROLLBACK

INSERT INTO mytab VALUES ( 23430,'Jason French')

ROLLBACK

INSERT INTO mytab VALUES ( 20993,'Samantha Jones')

COMMIT

DELETE FROM mytab WHERE col1=20993


ROLLBACK

Which of the following indicates the number of records that will


be returned
by the statement:

SELECT * FROM mytab?

(Select the correct response)

A.0

B.1

C.2

D.3

E.4

39. Given an embedded SQL program with a single connection,


two threads and t
he following actions:

Thread 1: INSERT INTO mytab VALUES (...)

Thread 2: INSERT INTO mytab VALUES (...)

Thread 1: COMMIT

Thread 2: INSERT INTO mytab VALUES (...)

Thread 1: ROLLBACK

How many records will be successfully inserted and retained in


the table myta
b?
(Select the correct response)

A.0

B.1

C.2

D.3

40. Which two of the following types of storage management


method is supporte
d by DB2 OLAP Server ?

(Select all that apply)

A. Object

B. Network

C. Relational

D. Hierachical

E. Multi-dimensional

41. Given table EMPLOYEE with columns EMPNO and SALARY and
table JOB with col
umns ID and TITLE, what is the effect of the statement:

UPDATE employee SET salary = salary * 1.15

WHERE salary < 15000 OR

EXISTS (SELECT 1 FROM job WHERE job.id = employee.empno


AND job.title = 'Mgr'
)
(Select the correct response)

A. Only managers that make less than 15,000 are given


salary increases.
B. Only non-managers that make less than 15,000 are given
salaray increases.

C. Employees that make less than 15,000 but no managers


are given salary inc
r

eases.

D. Employees that make less than 15,000 and all managers


are given salary in
c

reases.

42. When manually establishing communications from a Windows


NT client throug
h a DB2 Connect gateway to DB2 UDB for OS/390, which of the
following is NOT
required to catalog?

(Select the correct response

A. The client.

B. The database on the DRDA server.

You might also like