Sie sind auf Seite 1von 21

DB2 UDB 512 Certification Sample Questions

(*) Which Edition of DB2 is used to work with PDA (Personal Digital Assistants)
Palms?
(a) DB2 Everyplace Edition
(b) DB2 Enterprise Edition
(c) DB2 Personal Edition
(d) DB2 Satellite Edition

(*) Which DB2 Edition is used for full function database that enables a single user
to create databases on the workstation on which it was installed?
(a) DB2 Everyplace Edition
(b) DB2 Enterprise Edition
(c) DB2 Personal Edition
(d) DB2 Satellite Edition

(*) Which DB2 Edition support systems that operate disconnected from the
corporate system majority of the time, and connect occasionally to the
corporations central database to exchange data.
(a) DB2 Everyplace Edition
(b) DB2 Enterprise Edition
(c) DB2 Personal Edition
(d) DB2 Satellite Edition

(*) ?? is the scalability option that enables DB2 to partition data across clusters
or massively parallel computers. (Fill the ??)
(a) DB2 Enterprise Edition
(b) DB2 Personal Edition
(c) DB2 Enterprise-Extended Edition
(d) DB2 Workgroup Edition

(*) Product, which allows DB2 clients to access and join tables from databases,
such as Oracle, Sybase, Informix, and Microsoft SQL Server.
(a) DB2 Relational Connect
(b) DB2 Data Propagator
(c) DB2 Connect
(d) DB2 Net. Data

(*) Which product provides support for applications executing on Unix and Intel
platforms to transparently access DB2 databases on the OS/400, VM/VSE,
and OS/390 environments.
(a) DB2 Relational Connect
(b) DB2 Data Propagator
(c) DB2 Connect
(d) DB2 Net. Data

(*) 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

(*) Which product provides the ability for a web browser to access relational or
non-relational data.
(a) DB2 Relational Connect
1
DB2 UDB 512 Certification Sample Questions
(b) DB2 Data Propagator
(c) DB2 Connect
(d) DB2 Net. Data

(*) 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 Personal Developers Edition
(c) DB2 Universal Developers Edition
(d) DB2 Universal Database Workgroup Edition

(*) Which product provides replication capabilities for DB2 databases and is
integrated in DB2
(a) DB2 Relational Connect
(b) DB2 Data Propagator
(c) DB2 Connect
(d) DB2 Net. Data

(*) Tool, which is the central point of administration for DB2?


(a) DB2 Control Center
(b) DB2 Stored Procedure Builder
(c) DB2 Command Center
(d) DB2 Client Configuration Assistant.

(*) Which of the following products must be installed to provide a single point of
control for local and remote DB2 databases?
(a) DB2 Runtime Client
(b) DB2 Administration Client
(c) DB2 Connect Enterprise Edition
(d) DB2 Enterprise-Extended Edition

(*) Which of the following tools can be used to catalog a database?


(a) Journal
(b) Alert Center
(c) License Center
(d) Client Configuration Assistant

(*) Which of the following tools maintains a history of all executed


statements/commands for the current session within the tool?

(a) Journal
(b) SQL Assist
(c) DB2 Alert Center
(d) DB2 Command Center

(*) Tool that helps you to manage scripts containing SQL statements, DB2
commands, or operating systems commands?
(a) DB2 Script Center
(b) Alert Center
(c) License Center
(d) Client Configuration Assistant

(*) Which of the following must be set up to allow the Control Center to view
database objects?
(a) ODBC
(b) JAVA
(c) DB2 Administration Server
2
DB2 UDB 512 Certification Sample Questions
(d) Client Configuration Assistant

(*) Which Instance is used by the DB2 administration tools, including the Control
Center and the Client Configuration Assistant, to satisfy the requests.
(a) DB2 Instance
(b) DAS Instance
(c) DB Instance
(d) DBA Instance

(*) Which statement is not true ?


(a) One machine can have many Instance
(b) One machine can have many DAS Instances
(c) One Instance can have many database
(d) One database can have many tables

(*) Licensing in DB2 is controlled by which two components? (Choose two right
options)
(a) DB2 Server
(b) DB2 Client
(c) DB2 Connect
(d) DB2 Server and Client both

(*) Which tool allows you to monitor pending jobs, running jobs, and job
histories; review results; display recovery history and alert messages; and
show the log of DB2 messages.?
(a) DB2 Script Center
(b) Alert Center
(c) License Center
(d) The Journal

(*) Which of the following DB2 components can limit the resource consumption of
queries?
(a) DB2 Connect
(b) DB2 Query Patroller
(c) DB2 Performance Monitor
(d) DB2 Net Search Extender

(*) Which of the following will rebuild a package in the database from the existing
catalog information?

(a) bind
(b) rebind
(c) update
(d) rebuild

(*) By which tool you can use the information available from the graph to tune
your SQL queries for better performance?
(a) Visual Explain
(b) Performance Monitor
(c) SQL Assist
(d) Client Configuration Assistant

(*) Which of the following utilities would you run to order data and reclaim space
from deleted rows in a table?
(a) reorg
(b) db2look
(c) db2move
3
DB2 UDB 512 Certification Sample Questions
(d) runstats

(*) Which of the following DB2 CLP options specify the file that contains the
statements to be executed?
(a) -f
(b) -b
(c) -o
(d) -w

(*) Which Extender provides a capability for high-speed text search in DB2
databases, particularly advantageous in Internet applications where
performance is an important factor?
(a) XML Extender
(b) Net. Search Extender
(c) Spatial Extender
(d) Text Extender

(*) Which of the following processes is NOT performed by DB2 Warehouse


Manager?
(a) Query
(b) Loading
(c) Extraction
(d) Transformation

(*) Software that enables you to build sophisticated decision support, planning,
and analysis applications for your enterprise.
(a) DB2 OLAP Starter Kit
(b) Spatial Extender
(c) Information Center
(d) Net. Data

(*) Which two of the following types of storage management method is supported
by DB2 OLAP Server?
(a) Object
(b) Network
(c) Relational
(d) Hierachical
(e) Multi-dimensional

(*) How many DB2 Administration Server (DAS) Instances can be set up per
physical machine?
(a) 0
(b) 1
(c) One for each instance on the physical machine
(d) One for each database on the physical machine

(*) 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 un assigns 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
4
DB2 UDB 512 Certification Sample Questions

(*) 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 scan to the next

(*) 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

(*) 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
(*) For which of the following can locks be obtained?

(a) A trigger
(b) A table view
(c) A table column
(d) A database buffer
(e) A row referenced by an index key

(*) 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

(*) Which of the following products can be used to perform a dictionary-based


5
DB2 UDB 512 Certification Sample Questions
search?
(a) Net. Data
(b) XML Extender
(c) AVI Extender
(d) Text Extender

(*) A view is used instead of a table for users to do which of the following?
(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

(*) 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?

(a) 0
(b) 1
(c) 2
(d) 3
(*) 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?

(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

(*) Why is a unique index not sufficient for creation of a primary key?

(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
keys must be ascending.
(c) A unique index can be defined over a column or columns that
allow nulls. Primary keys cannot contain nulls.
(d) A unique index can be defined over a column or columns that allow nulls.
This is not allowed for primary keys because foreign keys cannot contain
Nulls.

(*) 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?
(a) emp_num
6
DB2 UDB 512 Certification Sample Questions
(b) emp_pin
(c) emp_addr
(d) emp_fname
(e) emp_lname

(*) Which of the following DELETE RULES on CREATE TABLE will delete a
dependent table row if the parent table row is deleted?

(a) ON DELETE REMOVE


(b) ON DELETE CASCADE
(c) ON DELETE RESTRICT
(d) ON DELETE SET NULL
(e) ON DELETE PROPAGATE

(*) 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?

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

(*) Which of the following DB2 data types is used to store 50 MB of binary data
as a single value?
(a) BLOB
(b) CLOB
(c) DBCLOB
(d) FOR BIT DATA
(e) VARCHAR FOR BIT DATA

(*) 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?

(a) IDENTITY
(b) BIGINT
(c) INTEGER
(d) SMALLINT

(*) 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?
7
DB2 UDB 512 Certification Sample Questions
(a) 0
(b) 1
(c) 2
(d) 3
(e) 4

(*) 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?
(a) 0
(b) 1
(c) 2
(d) 3

(*) 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?

(a) 0
(b) 1
(c) 2
(d) 3
(e) 4

(*) Which of the following are DDL statements


(a) Select, Insert, Update, Delete
(b) Alter, Create, Drop
(c) Commit, Rollback, Savepoint
(d) Grant, Revoke

(*) What could be the maximum lenght of an SQL statement


(a) 4000 Bytes
(b) 10242 Bytes
(c) 256 Bytes
(d) 65, 535 Bytes
8
DB2 UDB 512 Certification Sample Questions

(*) CREATE TABLE T1(C1 INT) --- Table T1 contains 20 records


CREATE TABLE T2(C2 INT) --- Table T2 contains 25 Records

How many records would be displayed by following SQL statement:


SELECT C1, C2 FROM T1, T2
(a) 20
(b) 25
(c) 500
(d) 45

(*) SELECT * FROM Employee - Statement will display columns in which order?
(a) Ambiguous order
(b) Order that was given in CREATE TABLE or CREATE VIEW.
(c) Alphabatical Ascending Order

(*) Which of the following is the result of a successful ROLLBACK statement?

(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

(*) 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?

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

(*) 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?

(a) INSERT INTO defin1 (id) VALUES (1)


(b) INSERT INTO defin1 (name) VALUES ('Florence')

9
DB2 UDB 512 Certification Sample Questions
(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

(*) 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')

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

(*) 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?

(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

(*) 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)?

(a) ORDER BY 2,1


(b) GROUP BY 2, 1
(c) ORDER BY cities, name
(d) GROUP BY cities, name

(*) Given the following table definitions:


10
DB2 UDB 512 Certification Sample Questions
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?

(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
JOIN department d ON e.workdept = d.deptno
(d) SELECT e.empno, e.lastname, d.deptname FROM employee e RIGHT
OUTER JOIN department d WHERE e.workdept = d.deptno

(*) 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?

(a)SELECT points. name, points. points, pim.name, pim.pim FROM


points INNER 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
RIGHT OUTER JOIN pim ON points.name=pim.name

11
DB2 UDB 512 Certification Sample Questions
(*) Given table T1 with 100 rows, which of the following queries will retrieve 10
rows from table T1?

(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

(*) 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

(*) 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?

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

(*) 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?

(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

(*) Given the table T1, created by:


CREATE TABLE t1
(
id INTEGER GENERATED BY DEFAULT AS IDENTITY,
c1 CHAR(3)
12
DB2 UDB 512 Certification Sample Questions
)
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')

(a) 0
(b) 1
(c) 2
(d) 5
(e) 6

(*) 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?

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

(*) 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?

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

(*) Which of the following is the result of the following SQL statement:
CREATE UNIQUE INDEX empno_ind ON employee (empno)

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

(*) Which of the following does NOT end a unit of work?

(a) COMMIT
(b) ROLLBACK
(c) TERMINATE
(d) SAVEPOINT
(f) CONNECT RESET

(*) 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?
13
DB2 UDB 512 Certification Sample Questions

(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.
(*) Which of the following is the implicit qualifier for a declared temporary table?

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

(*) Which one of the following SQL statements sets the default qualifier to "user1"?

(a) SET CURRENT ID = 'user1'


(b) SET CURRENT USER = 'user1'
(c) SET CURRENT SQLID = 'user1'
(d) SET CURRENT QUALIFIER = 'user1'

(*) 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
definition statements on the student table may improve the query
performance?

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

(*) Using the Control Center Create Table dialog box, which of the following
dialogs allows the table creation DDL to be viewed?

(a) Copy
(b) Show SQL
(c) Show Related
(d) Sample Contents

(*) Which of the following can be used to determine the views that are affected
by a DROP TABLE statement?

(a) DB2 Script Center


(b) DB2 Performance Monitor
14
DB2 UDB 512 Certification Sample Questions
(c) DB2 Control Center, Show Related
(d) DB2 Control Center, Sample Contents

(*) 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?

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

(*) Which of the following is the most appropriate reason to consider revoking the
SELECT privilege on the catalog tables from PUBLIC after creating a
database?

(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 DB2
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 long-running queries against the
catalogs.

(*) Which of the following is the best way to restrict user access to a subset of
columns in a table?

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

(*) A table called EMPLOYEE has columns: name, department, and


phone_number. Which of the following can limit access to the phone_number
column?

(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

(*) Which of the following privileges is necessary to populate the table with large
amounts of data?

(a) LOAD
(b) ALTER
(c) UPDATE
(c) IMPORT

15
DB2 UDB 512 Certification Sample Questions
(1) Which of the following are DDL statements
a) Select, Insert, Update, Delete
b) Alter, Create, Drop
c) Commit, Rollback, Savepoint
d) Grant, Revoke

2. What could be the maximum length of an SQL statement


a) 4000 Bytes
b) 10242 Bytes
c) 256 Bytes
d) 65, 535 Bytes

3. CREATE TABLE T1(C1 INT) --- Table T1 contains 20 records


CREATE TABLE T2(C2 INT) --- Table T2 contains 25 Records

How many records would be displayed by following SQL statement :


SELECT C1, C2 FROM T1, T2
a) 20
b) 25
c) 500
d) 45

4. SELECT * FROM Employee - Statement will display columns in which order?


a) Ambiguous order
b) Order that was given in CREATE TABLE or CREATE VIEW.
c) Alphabetical Ascending Order
d) Alphabetical Ascending Order

5. Column Column1 of table Table1 is defined as User Defined Distinct Data Type
(UDT) db2admin.Type1. Which all commands are valid to retrieve the
contents of Table1 where Column1 contains xyz. (3 correct)

a) SELECT Column1 FROM Table1 WHERE Column1 = CAST(xyz AS


db2admin.Type1)
b) SELECT Column1 FROM Table1 WHERE Column1 = xyz
c) SELECT Column1 FROM Table1 WHERE Column1 =
db2admin.Type1(xyz )
d) SELECT Column1 FROM Table1 WHERE CHAR(Column1) = xyz

6. Table1
Id Name
--- -------
1 ABC
2 XYZ
3 LMN

Table2
Id Salary
-- -------
1 4500
2 2334
4 9800
5 3400

SELECT Table1.Id, Table1.Name, Table2.Id, Table2.Salary FROM Table1


RIGHT OUTER JOIN Table2 ON Table1.Id = Table2.Id
16
DB2 UDB 512 Certification Sample Questions
How many records will be displayed when you execute the above mentioned
statement

a) 4
b) 3
c) 2
d) 12

7. Table1
Id Name
--- -------
1 ABC
2 XYZ
3 LMN

Table2
Id Salary
-- -------
1 4500
2 2334
4 9800
5 3400

SELECT ID, Table1.Name, Table2.Salary FROM Table1, Table2


WHERE Table1.Id = Table2.Id

ID referred here will display

a) ID of Table1
b) ID of Table 2
c) The statement will not execute. Error Message will be displayed.
d) ID from any table, wherever it is available.

8. SELECT Id, Name FROM Table1 ORDER BY 2


Given statement will display
a) Error message as 2 is not a column name
b) All records from Table1 alphabetically in ascending order of Name
column.
c) All records from Table1 alphabetically in descending order of Name column
as 1 means ascending order and 2 means descending order.

9. SELECT Id, Name FROM Table1 ORDER BY 2 WHERE Name LIKE A%


Given statement will display
a) Error message as 2 is not a column name
b) All records where name starts with A from Table1 alphabetically in
ascending order of Name column.
c) Error message as Order By clause must be the last clause of the
SQL statement.
d) Error message as there is no Like operator.

10. Table1
Id Name
--- -------
1 ABC
2 XYZ
3 LMN
17
DB2 UDB 512 Certification Sample Questions
Table2
Id Salary
-- -------
1 4500
2 2334
4 9800
5 3400

A user wishes to display the salaries and Ids of all the employees given in
both the tables. Which of the following command will give the desired output.

a) SELECT ID, Salary FROM Table2 WHERE ID = (SELECT ID from Table1)


b) SELECT ID, Salary FROM Table2 WHERE ID IN (SELECT ID from
Table1)
c) SELECT ID, Salary FROM Table2 WHERE ID IS (SELECT ID from Table1)
d) SELECT ID, Salary FROM Table2 WHERE ID LIKE (SELECT ID from
Table1)

11. Table1
Id Name
--- -------
1 ABC
2 XYZ
3 LMN

Table2
Id Salary
-- -------
1 4500
2 2334
4 9800
5 3400

SELECT Id FROM Table1


UNION ALL
SELECT Id FROM Table2

Query will display :


a) Error message as there is no Union All operator. Only opertors available
are Union, Intersect and Except.
b) 1, 2
c) 1, 2, 3, 4, 5
d) 1, 2, 3, 1, 2, 4, 5

1. Table1
Id Name
--- -------
1 ABC
2 XYZ
3 LMN

Table2
Id Salary
-- -------
1 4500
2 2334

18
DB2 UDB 512 Certification Sample Questions
4 9800
5 3400

What are different ways to insert multiple records in Table1 in a single


statement.
a) INSERT INTO Table1 VALUES (1, ABC), (2, XYZ), (3, PQR)
b) INSERT INTO Table1 VALUES (SELECT ID, TEST FROM Table2)
c) INSERT INTO Table1 (SELECT ID, TEST FROM Table2)
d) There is no way to insert multiple records in Table1 in a single statement.

2. Which one is the correct syntax to update multiple fields of a table in a single
statement?
a) Update Table1 SET Name = Amit AND Age = 23 WHERE Id = E01
b) Update Table1 SET Name = Amit SET Age = 23 WHERE Id = E01
c) Update Table1 SET (Name = Amit, Age = 23 WHERE Id = E01
d) Update Table1 SET (Name, Age) = (Amit, 23) WHERE Id = E01

1. What happens when we drop the base table of a view?


a) Table deletion is not allowed. You have to drop all views based on that
table first to drop a table.
b) View will also be deleted automatically.
c) View will not be deleted and will become INOPERATIVE VIEW.

2. What is the correct way of displaying Id, Name and Age of those employees
whose Age is less than 20 or Age is more than 30. (2 correct)
a) SELECT Id, Name, Age from Table1 WHERE Age NOT BETWEEN 20
AND 30
b) SELECT Id, Name, Age from Table1 WHERE NOT Age BETWEEN 20 AND
30
c) SELECT Id, Name, Age from Table1 WHERE Age IS NOT BETWEEN 20 AND
30
d) SELECT Id, Name, Age from Table1 WHERE NOT Age BETWEEN 21 AND
29

3. What will be the output of following statement if there is only one record in
the table
SELECT 12/5 FROM Table1
a) 2.4
b) 12/5
c) 2
d) 2.40

4. Which statement would you use for displaying students name, marks and
result (less then 40 is fail otherwise pass)
a) SELECT Name, Marks, IF(Marks<40, Fail, Pass) FROM Table1
b) SELECT Name, Marks, IIF(Marks<40, Fail, Pass) FROM Table1
c) SELECT Name, Marks, CASE WHEN Marks<40 ELSE Fail END FROM
Table1
d) SELECT Name, Marks, SWITCH CASE WHEN Marks<40 ELSE Fail END
FROM Table1

Getting Started

(1) Which Instance is used by the DB2 administration tools, including the Control
Center and the Client Configuration Assistant, to satisfy the requests.
19
DB2 UDB 512 Certification Sample Questions
(a) DB2 Instance
(b) DAS Instance
(c) DB Instance
(d) DBA Instance

(2) Which statement is not true?


(a) One machine can have many Instance
(b) One machine can have many DAS Instances
(c) One Instance can have many database
(d) One database can have many tables

(3) Licensing in DB2 is controlled by which to components? (Choose two


right options)
(a) DB2 Serve
(b) DB2 Client
(c) DB2 Connect
(d) DB2 Server and Client both

(4) Which client component provides u APIs and libraries for


development in DB2?
(a) DB2 Runtime Client
(b) DB2 Application Development Client
(c) DB2 Administration Client
(d) DB2 Thin Client

(5) Which registry contains the machine-wide variable settings


(a) DB2 Instance-Level Profile Registry
(b) DB2 Global-Level Profile Registry
(c) DB2 Instance Node-Level Profile Registry
(d) DB2 Instance Profile Registry

(6) Which registry contains a list of all instance names recognized by this
system?
(a) DB2 Instance-Level Profile Registry
(b) DB2 Global-Level Profile Registry
(c) DB2 Instance Node-Level Profile Registry
(d) DB2 Instance Profile Registry

(7) To Update a registry values which command is used ?


(a) db2icrt
(b) db2start
(c) db2set
(d) db2update

(8) Active Instance name is defined in which Environment variable?


(a) DB2INSTANCE
(b) DB2INSTPROF
(c) DB2PATH
(d) DB2SET

20
DB2 UDB 512 Certification Sample Questions
(9) Since there are multiple places where a variable can be set, DB2 uses a hierarchy
to determine where it will look to determine a variables value. It do a search in which
Order:
1. The sessions environment variables.
2. DB2 Profile Registry variables set in the instance node level profile
3. DB2 Profile Registry variables set using db2set for the session
4. DB2 Profile Registry variables set at the instance level using the -i option of
db2set.
(a) 1,4,3,2
(b) 2,3,1,4
(c) 1,2,3,4
(d) 4,1,3,2

(10) Which command is used to cerate an instance?


(a) db2icrt
(b) db2idrop
(c) db2inew
(d) db2cretae

(11) Which file is used to hold parameters related to authentication, monitoring levels,
diagnostic levels and memory and process resources across the instance.
(a) Database Manager Configuration (DBM CFG) file
(b) Database Configuration file (DB CFG) file
(c) DBA Configuration File
(d) Administration Config File

(12) Which instance must be running on every DB2 server that you want to administer
remotely or detect using the client configuration search method.?
(a) DB2 Instance
(b) DAS Instance
(c) DB Instance
(d) DBA Instance
(13) A graphical tool that helps you get started using DB2 UDB like
Create the sample
Databases, View the product information library?
(a) Control Center
(b) DB2 First Steps
(c) DB2 Command Center
(d) DB2 Script Center

21

Das könnte Ihnen auch gefallen