You are on page 1of 14

DB2_Cert700_Questions Page 1 of 14

1. 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

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. Reorganize Table

3. 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

4. Which of the following DB2 UDB isolation levels will NOT lock any rows dur
ing 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 using an is
olation level of Read Stability and scanning through the table more than once
within the unit of work?
DB2_Cert700_Questions Page 2 of 14

(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 dropping the index
B. When updating the index
C. When selecting on the index
D. When inserting using the index

7. Given an embedded SQL program with a single connection, two threads and th

e 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

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. 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
9. 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
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
DB2_Cert700_Questions Page 3 of 14

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. Given the following scenario: An application uses a 15 digit value to uni
quely identify customer transactions. This number is also used for arithmetic
operations. Which of the following is the most efficient DB2 data type for t
he column definition for this purpose?
(Select the correct response)
A. CHAR
B. CLOB
C. INTEGER
D. NUMERIC(15,2)
E. DECIMAL(15,0)

11. 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')

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 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

14. Which of the following describes why savepoints are NOT allowed inside 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.
DB2_Cert700_Questions Page 4 of 14

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.

15. 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)
The job column contains these job types: manager, clerk, and salesperson. Whi
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 ORDER BY job
B. SELECT job, name FROM staff GROUP BY name, job
C. SELECT * FROM staff GROUP BY name, job, id, dept, years, salary, comm.
D. SELECT * FROM staff ORDER BY name, job, id, dept, years, salary, comm.

16. 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

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)
DB2_Cert700_Questions Page 5 of 14

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. Given 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
DB2_Cert700_Questions Page 6 of 14

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 Administrat
ion 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
DB2_Cert700_Questions Page 7 of 14

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
DB2_Cert700_Questions Page 8 of 14

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
DB2_Cert700_Questions Page 9 of 14

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 whi
ch 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 verifi


ed 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
DB2_Cert700_Questions Page 10 of 14

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?
DB2_Cert700_Questions Page 11 of 14

(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 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
DB2_Cert700_Questions Page 12 of 14

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
DB2_Cert700_Questions Page 13 of 14

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
DB2_Cert700_Questions Page 14 of 14

1 C 11 C 21 A 31 C 41 B 51 D

2 C 12 D 22 A,C 32 A 42 D 52 D

3 A 13 A 23 C 33 C, A 43 C 53 B

4 C 14 24 B,C 34 A 44 C 54 A, D

5 C 15 A 25 B 35 D 45 B 55 A

6 A 16 B 26 D 36 C 46 A

7 C 17 C 27 B 37 E 47 D

8 C 18 A 28 B 38 D 48 A

9 D 19 D 29 B 39 C 49 D

10 E 20 B, 30 A 40 B 50 A, B
E

You might also like