DB 2 Dump
DB 2 Dump
1. A DRDA host database resides on a z/OS or an i5/OS system and listens on port
446. The TCP/IP address for this system is 19168.10.1 and the TCP/IP host name
is myhost. Which of the following commands is required to update the local node
directory so that a DB2 client can access this DRDA database?
A. CATALOG TCPIP NODE myhost REMOTE db2srv SERVER 446
B. CATALOG TCPIP NODE mydb2srv REMOTE myhost SERVER 446
C. CATALOG TCPIP NODE myhost REMOTE db2srv SERVER 192.168.10.1
D. CATALOG TCPIP NODE mydb2srv REMOTE myhost SERVER 192.168.10.1
Answer: B
2. Which of the following is NOT true about XML columns?
A. Data can be retrieved by SQL.
B. Data can be retrieved by XQuery or XPath.
C. XML columns must be altered to accommodate additional parent and child relati
onships.
D. Access to any portion of an XML document can be direct, without reading the w
hole document.
Answer: C
3. A UDT is a data type which _____.
A. must contain unique values.
B. cannot be CAST to other data types.
C. is created using the CREATE TYPE command.
D. contains a value that was automatically calculated from values in other colum
ns.
Answer: C
4. The following SQL statements were executed in sequence:
CREATE DISTINCT TYPE salary AS decimal(7,2) WITH COMPARISONS;
CREATE TABLE staffsalary(empid INT, empsalary salary);
INSERT INTO staffsalary VALUES (10, 50000);
INSERT INTO staffsalary VALUES (20, 50000.00);
UPDATE staffsalary SET empsalary = 60000
WHERE salary(50000) = empsalary;
What is the current content of the staffsalary table?
A. ID | EMPSALARY
0 | 60000
20 | 50000.00
B. ID | EMPSALARY
10 | 50000.00
20 | 50000.00
C. ID | EMPSALARY
10 | 60000.00
20 | 60000.00
D. ID | EMPSALARY
10 | 60000.00
20 | 50000.00
Answer: C
5. Given the following two tables:
TAB1
C1 C2
__ __________
1 Antarctica
2 Africa
3 Asia
4 Australia
TAB2
CX CY
__ _____________
5 Europe
6 North America
7 South America
Which of the following SQL statements will insert all rows found in table TAB2 i
nto table TAB1?
A. INSERT INTO tab1 SELECT cx, cy FROM tab2
B. INSERT INTO tab1 VALUES (tab2.cx, tab2.cy)
C. INSERT INTO tab1 VALUES (SELECT cx, cy FROM tab2)
D. INSERT INTO tab1 (c1, c2) VALUES (SELECT cx, cy FROM tab2)
Answer: A
======================================