- 论坛徽章:
- 0
|
700考试真题-1
CE 1. Which two of the following results from a successful ROLLBACK statement?
(Select 2)
A. The current unit of work is restarted.
B. Existing database connections are released.
C. Locks held by the current unit of work are released.
D. Tables in LOAD PENDING for the current unit of work are released.
E. Changes made by the current unit of work since the last COMMIT points are undone.
?CD 2. Which two of the following are enforced by the database to restrict specific values from being inserted into a column in a particular table?
A. Index.
B. Stored procedure.
C. Referential constraint.
D. A view with check option.
E. External scalar function.
C 3. Given the table T1 created by
CREATE TABLE t1
(Id INTEGER NOT NULL GENERATES ALWAYS AS IDENTITY.
C1 CHAR (10) NOT NULL.
C2 CHAR (10)
Which of the following INSERT statements will succeed?
A. INSERT INTO t1 VALUES(‘abc’, NULL)
B. INSERT INTO t1 VALUES(1, ‘abc’, NULL)
C. INSERT INTO t1 (c1, c2) VALUES (‘abc’, NULL)
D. INSERT INTO t1 (c1, c2) VALUES (NULL, ‘def’)
A 4. Given the following DDL statements,
CREATE TABLE tab1 (a INT, b INT, c INT)
CREATE VIEW v1 AS SELECT a, b, c FROM tab1
WHERE a>;250 WITH CHECK OPTION
Which of the following INSERT statements will fail?
A. INSERT INTO v1 VALUES (200, 2, 3)
B. INSERT INTO v1 VALUES (300, 2, 3)
C. INSERT INTO tab1 VALUES (350, 2, 3)
D. INSERT INTO tab1 VALUES (250, 2, 3)
C 5. Given the following column requirement:
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 65?
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)
A 6. 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. GRAPHIC
B 7. Given the following users and groups with no privileges on table t1:
GroupA GroupB
---------- ---------
user1 user4
user2 user5
user3
Which of the following commands gives all users in the above groups the ability to create a view on table t1?
A. GRANT SELECT ON TABLE t1 TO ALL
B. GRANT SELECT ON TABLE t1 TO PUBLIC
C. GRANT REFEREFCES ON TABLE t1 TO ALL
D. GRANT SELECT ON TABLE t1 TO USER GroupA.GroupB
B 8. Given the following existing user defined functions:
GEN.FN1(INT,CHAR) RETURNS CHAR
GEN.FN1(INT) RETURNS INT
GEN.FN1(CHAR) RETURNS DOUBLE
USERA need to execute GEN.FN1 (INT, CHAR) RETURNS CHAR.
Which of the following statements successfully grants the require privilege?
A. GRANT EXECUTE ON FUNCTION gen.fn1TO usera
B. GRANT EXECUTE ON FUNCTION gen.fn1 (INT, CHAR) TO usera
C. GRANT EXECUTE ON FUNCTION gen.fn1 RETURNS CHAR TO usera
D. GRANT EXECUTE ON FUNCTION gen.fn1 (INT, CHAR) RETURNS CHAR TO usera
C 9. An administrator issues:
GRANT ALL PRIVILEGES ON TABLE appl.tab1 TO user1 WITH GRANT OPTION
Which of the following statements is USER1 authorized to execute?
A. GRANT DROP ON TABLE appl.tab1 TO user8
B. GRANT OWNER ON TABLE appl.tab1 TO user8
C. GRANT INSERT ON TABLE appl.tab1 TO user8
D. GRANT CONTROL ON TABLE appl.tab1 TO user8
C 10. Given the following table definition:
STAFF
Id INTEGER
Name CHAR(20)
Dept INTEGER
Job CHAR(20)
Years INTEGER
Salary DECINAL(10,2)
Comm. DECINAL(10,2)
Which of the following statements will return all of the records 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
B 11. Given tables that are defined in the following way
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(table2.col1,table2.col2)
B. INSERT INTO table1SELECT col1, col2 FROM table2
C. INSERT INTO table1 VALUES(SELECT col1,col2FROM table2)
D. INSERT INTO table1 (col1, col2) VALUES (SELECT col1, col2 FROM table2)
D 12. Given the following two tables
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 INNER JOIN tab2 ON c1=cx
B. SELECT*FROM tab2 FULL OUTER JOIN tab1 ON c1=cx
C. SELECT*FROM tab2 RIGHT OUTER JOIN tab1 ON c1=cx//左连接
D. SELECT*FROM tab1 RIGHT OUTER JOIN tab2 ON c1=cx
?C 13. What does the following statement do?
GRANT REFERENCES (col1) ON TABLE tt1TO user7
A. Gives USER7 the ability to refer to column COL1of table T.T1 in views or select statements
B. Gives USER7 the ability to refer to column COL1of table T.T1 on user-defined function calls
C. Gives USER7 the ability to define referential integrity on table T.T1 using column COL1 as the parent key
D. Gives USER7 the ability to define referential integrity on table T.T1 using column COL1 as the foreign key
D 14. A developer is building a Solaris application that will access DB2 UDB for OS/390 or OS/400 servers.
Which of the following products is required to be installed on the Solaris system in order to build the application?
A. DB2Connect Personal Edition
B. DB2 Personal Developers Edition
C. DB2 UDB Workgroup Server Edition
D. DB2 Universal Developer’s Edition
A 15. For which of the following database objects can locks be obtained?
A. A row
B. A column
C. A sequence
D. A function
D 16. Where are referential constraint definitions stored?
A. The user tables
B. The explain tables
C. SYSIBM SYSTRIGGERS
D. The system catalog tables
DE 17. When establishing client-server communication, which two of the following can be used to verify passwords?
A. Catalog Tables
B. Access Control List
C. Application Programs
D. DRDA Application Server
E. Client Operating System
B 18. A client application on OS/390 or OS/400 must access a DB2 server on Windows at a minimum, which of the following products is required to be on the DB2 server?
A. DB2 Connect Enterprise Edition
B. DB2 UDB Workgroup Server Edition
C. DB2 Personal Edition
D. DB2 Connect Enterprise Edition andDB2 UDB Enterprise Server Edition
C 19. Given the following SQL statement:
GRANT INDEX, REFERENCES (col1) ON TABLE tab1 TO USER usera
Which of the following identifies what USERA is allowed to do?
A. Add a check constraint to TAB1.
B. Define a primary key and unique constraint on TAB1.
C. Define an index on TAB1 and a foreign key that points to COL1.
D. Issue a SELECT statement that uses an index to access data from TAB1.
D 20. Given the following statements:
CREATE TABLE t1
(C1 INTEGER,
C2 INTEGER,
C3 DECIMAL (15, 0))
INSERT INTO t1 VALUES (0, 1, 3.0)
Which of the following will cause C1 to be incremented each time a row is added to the T2 table?
A. ALTER TABLE t1
ADD CHECK (t2)
C1=c1+1
B. CREATE VIEW v1 (c1)
AS (SELECT COUNT(*) FROM t2)
C. ALTER TABLE t1
ADD FOREIGN KEY (C1)
REFERENCES t2
ON INSERT CASCADE
D. CREATE TRIGGER t1
AFTER INSERT ON t2
FOR EACH ROW MODE DB2SQL
UPDATE t1 SET c1=c1+1
?C 21. Given the following statements:
CREATE TABLE t1 (col1 INT NOT NULL);
ALTER TABLE t1 ADD CONSTRAINT t1_ck CHECK (coll in (1, 2, 3));
INSERT INTO t1 VALUES (3);
CREATE TABLE t2 LIKE t1;
DROP TABLE t1;
Which of the following is the result of these statements?
A. Both tables are dropped
B. T2 is an empty table with the check constraint.
C. T2 is an empty table without the check constraint.
D. T2 contains 1 row and is defined with the check constraint.
E. T2 contains 1 row a.nd is defined without the check constraint
A 22. 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 (30)
Lastname CHAR (30)
Workdept CHAR (3)
Given that the result set should only include employees with a department, which of the following statements will list each employee’s number, last name, and deptname?
A. SELECT e.empno, e.lastname, d.deptname
FROM employe e department d
WHERE e.workdept=d.deptno
B. SELECT e.empno, e.lastname, d.deptname
FROM employee e LEFT OUTER JOIN deptnament d
ON e.workdept=d.deptno
C. SELECT e.empno, e.lastname, d.deptname
FROM employee e FULL OUTER JOIN deptnament 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
C 23. Given the following statements:
CREATE TABLE mytab
(col1 INT NOT NULL PRIMARY KEY
col2 CHAR (64),
col3 CHAR (32),
col4 INT NOT NULL,
CONSTRAIT c4 UNIQUE (col4, col1))
How many indexes are needed to support the table definition?
A. 0
B. 1
C. 2
D. 3
E. 4
?A 24. Which of the following is the outcome of the following SQL statements?
CREATE TABLE employee (empno INT empname CHAR (30))
CREATE UNIQUE INDEX empno_ind ON employee (empno)
A. Every value for EMPNO will be different.
B. Multiple NULLvalue are allowed in the EMPNO column.
C. An additional unique index cannot be created on the EMPLOYEE table.
D. INSERT statements on the EMPLOYEE table will result in clustered data.
B 25. Given the following tables:
TABLEA TABLEAB
Empid name empid weeknumber paycheck
1 USER1 1 1 2000.00
2 USER2 1 2 3000.00
2 1 2000.00
TABLEB was defined as follows:
CREATE TABLE tablea | empid CHAR (3),
Weeknumber CHAR (3),
Paycheck DECIMAL (6, 2|,
CONSTRAINT const1 FOREIGN KEY (empid)
REFERENCES tablea | empid) ON DELETE CASCADE)
How many rows would be deleted from TABLEB if the following command was issued?
DELETE FROM tablea WHERE empid=’2’
A. 0
B. 1
C. 2
D. 3
B 26. At a minimum, which of the following products must be installed to provide a single point of control through?
The Control Center for local and remote DB2 data sources?
A. DB2 Runtime Client
B. DB2 Administration Client
C. DB2 Enterprise Server Edition
D. DB2 Connect Enterprise Edition
D 27. Which of the following deletion rules on CREATE TABLE will prevent parent table rows from being deleted if a dependent row exists?
A. ON DELETE CASCADE
B. ON DELETE ROLLBACK
C. ON DELETE SET NULL
D. ON DELETE NO ACTION
D 28. Given the following statements from two 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
Assuming Program 1 ran to completion and then Program 2 ran to completion, how many records will be returned by executing the following statement?
SELECT*FROM mytab
A. 0
B. 1
C. 2
D. 3
E. 4
D 29. Which of the following tools is used to develop and deploy stored procedures?
A. Task Center
B. Control Center
C. Command Center
D. Development Center
B 30. Given the two following tables
POINTS
Name Point
Wayne gretzky 244
Jaromit Jagr 168
Bobby Occ 129
Bobby Hull 93
Brett Hull 121
Mario Lemieux 189
PIM
Name PIN
Mats Sundin 14
Jaromit Jagr 16
Bobby Orr 12
Mark Messier 32
Brett Hull 66
Mario Lemieux 23
Joe Sakic 94
Which of the following statements will display the name, points and PIM for players in either table?
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 point, pim.name .pim.pin
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
D 31. 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 TOP 10 ROWS ONLY
C. SELECT *FROM t1 OPTIMIZE FOR 10 ROWS
D. SELECT*FROM t1 FETCH FIRST 10 ROWS ONLY
A 32. Communications is being manually established from a Windows 2000 client through a DB2
Connect gateway to a DB2 host system.
Which or the following does NOT have to be cataloged on the gateway?
A. The client //客户端不需要被编目
B. The node where the data source resides
C. The data source on the DB2 database server
D. The Database Connection Service (DCS) database
B 33. Given the following CREATE TABLE statement:
CREATE TABLE t1
(col1 INTEGER NOT NULL CONSTRAINT chk1 UNIQUE,
col2 DATE NOT NULL CHECK (col2<=CURRENT_DATE),
col3 CHARACTER(12 NOT NULL WITH DEFAULT USER,
col4 VARCHAR(300) NOT NULL WITH DEFAULT)
.The definition of which column caused the statement to fail?
A. COL1
B. COL2
C. COL3
D. COL4
B 34. Which of the following isolation levels most frequently acquires a table level lock during an index scan?
A. Read Stability
B. Repeatable Read
C. Cursor Stability
D. Uncommitted Read
?D 35. A stored procedure has been created with the following statement
CREATE PROCEDURE P1 (IN VAR1 VARCHAR (10), INOUT VAR2 VARCHAR (10), OUT VAR3
INT)
From the command line processor (CLP). Which is the correct way to call this procedure?
A. Call P1 (?,?,?)
B. Call P1 (“DB2”,?,?)
C. Call P1(“DB2”,”DB2”,?)
D. Call P1(‘DB2’,’DB2’,?)//参数用单引号
C 36. Which of the following products can be used to perform a dictionary-based search?
A. DB2 XML Extender //提供用XML定义的文本的查找
B. B.DB2 AVI Extender
C. DB2 Text Extender //文本扩展器
D. DB2 Spatial Extender//存储多维的信息
A 37. Given the table:
COUNTRY
NAME CITIES PERSON
Argentina 10 1
Canada 20 2
Cuba 10 2
Germany 0 1
France 5 7
And, given the statement
SELECT cities, name FROM country
Which of the following clauses must be added to the statement for it to return rows sorted by NAME and the sorted by CITIES?
A. ORDER BY 2, 1
B. GROUP BY 2, 1
C. ORDER BY 1, 2
D. GROUP BY 1, 2
A 38. An application is bound with uncommitted read isolation level it issues a request that retrieves 20 rows out of 200000 in the table, which of the following describes the rows that are locked as a result of this request?
A. None of the rows are locked
B. The retrieved rows are locked
C. The last row of the result set is locked
D. The rows not previously updated by another application are locked
A 39. A user wishes to store a numeric with a maximum value of 100,000 which data type will allow the user to store these values while using the least amount of storage?
A. BIGINT
B. INTEGER
C. IDENTITY
D. SMALLINT
BC 40. Which two of the following can be done using the ALTER TABLE statement?
A. define a trigger
B. define a primary key
C. add a check constraint
D. add a non-unique index
E. change a column’s name
D 41. Given the following information:
Create table tab4 (c1 char(4), c2 integer)
Insert into tab4 values (‘123’,345)
Update tab4 set (c1,c2)=(‘null’,0)
What will be the result of the following statement if issued in the Command Line Processor?
Select *from tab4
A. c1 c2
--- ------
- 0
1 record (s) selected
B. C1 C2
----- -------
123 345
1 record (s) selected
C. C1 C2
----- -------
123 0
1 record (s) selected
D. C1 C2
----- -------
null 0
1 record (s) selected
B 42. Given the following SQL Statements:’
Create table tab1 (col1 int )
Insert into tab1 values (null)
Insert into tab1 values (1)
Create table tab2 (col1 int)
Insert into tab2 values (null)
Insert into tab2 values (1)
Select count (*) from tab1
Where col1 in
Which of the following is the result of the SELECT COUNT (*)(select col1 from tab2)
Statement?
A. 0
B. 1
C. 2
D. null
C 43. A user defined function named F.FOO has an input parameter of an integer. USER4 executes the following SQL statement:
SELECT col1.col2from t.tab1 where f.foo (col1) <6;
Which of the following statements grants USER4 the privilege needed to be able to execute the user defined function?
A. GRANT USE ON FUNCTION F.FOO (INT) TO USER4
B. GRANT SELECT ON FUNCTION F.FOO (INT) TO USER4
C. GRANT EXECUTE ON FUNCTION F.FOO (INT) TO USER4
D. GRANT REFERENCES ON FUNCTION F.FOO (INT) TO USER4
D 44. Given the following:
create table tab1 (c1 char (3) with default null, c2 integer);
insert into tab1(c2) values (345)
What will be the result of the following statement if issued from the command line processor?
Select* from tab1;
A. C1 C2
----- -------
0 record (s) selected
B. C1 C2
----- -------
123 345
1 record (s) selected
C. C1 C2
----- -------
345
1 record (s) selected
D. C1 C2
----- -------
345
1 record (s) selected
A 45. Given the following:
A table contains 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 .No one should be able to assign a seat that is in the agent’s current list .If the agent refreshes the list from the table .the list should only change if Which of the following isolation levels should be used for this application?
A. Read stability
B. Repeatable read
C. Cursor stability
D. Uncommitted read
CE 46. Given that table T1 has defined on it a primary key .three foreign keys ,four indexe,two check constraints three views and an alias . The following CREATE TABLE statement executed successfully
CREATE TABLE a1 LIKE TABLE t1
Which two of the following statements describe how table A1 is created?
A. Check constraints on table T1 were copied to table A1.
B. The primary key definition on table t1 was copied to table a1.
C. None of the keys, indexes check constraints, views .or the alias was copied to table a1
D. Indexes of the same descoption as those on table t1 were automatically created on table a1.
E. Table a1 contains columns of the same name, data types and null characteristics as table T1
A 47. To catalog a TCP/IP database connection to a remote DB2 server which of the following pieces of information is needed?
A. hostname
B. password
C. authorization-id
D. operating system version
A 48. Given the table definitions
defin1:
id smallint not null
name varchar(30)
hired date
defin2:
depitd smallint not null
name varchar(30)
started date
Assuming that neither table is empty, which of the following statements will insert data successfully into table defin1?
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 ‘florennce’.current date from defin2
D 49. 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. Health Center
D. Command Center
?D 50. A unit of work is using an isolation level of Cursor stability, and allows scanning through the table more than once within the unit of work which of the following can occur during processing of this unit of work?
A. it can access uncommitted changes made by other transactions
B. it can update uncommitted changes made by other transactions
C. the rows that is has updated can be changed by other transactions from one scan to the next
D. the rows that it has accessed can be changed by other transactions from one scan to the next
?BE 51. A view defined on a table for users to do which two of the following?
A. Avoid allocating more disk space per database
B. Restrict user’s access to a subset of the table data
C. Produce an action as a result of a change to a table
D. Provide faster access to the data than querying the table
E. Ensure the rows remain within the scope of the definition
C 52. Which of the following tools is used to create and build stored procedures?
A. SQL Assist
B. Task Center
C. Development Center //与存储过程(stored procedures)有关都选
D. Replication Center
B 53. An application is bound with Read Stability isolation level .It issues a request that retrieves 20 rows out of 200000 in the table, which of the following describes the rows that are locked as a result of this request?
A. None of the rows are locked
B. The retrieved rows are locked.
C. The last row of the result set is locked
D. The rows not previously updated by another application are locked
?CE 54. Which two of the following types of storage management methods are supported by DB2 OLAP Server?
A. Object
B. Network
C. Relational
D. Hierarchical
D. Multi-dimensional
700-2真题
C 1. Which of the following tools can be used to identify inefficient(效率低的) SQL statements without executing them?
A. QMF
B. Task Center
C. Visual Explain//可视化解释器
D. Development Center
D 2. USERA needs to be able to read rows from TAB1 and add new rows to TAB1. Which of the following statements will give USERA only the needed privileges(特权)?
A. GRANT SELECT ON TABLE tab1 TO usera
B. GRANT SELECT, ALTER ON TABLE tab1 TO usera
C. GRANT ALL PRIVILEGES ON TABLE tab1 TO usera
D. GRANT SELECT, INSERT ON TABLE tab1 TO usera
?B 3. Given the statement:
CREATE TABLE t1
(C1 CHAR (3)
CONSTRAINT c1
CHECK (c1 IN ('A01','B01','C01'))
)
DB2 verifies that the table checks constraint is met during which of the following actions?
A. Reorganizing the table.
B. Updating any row in the table.
C. Adding an insert trigger to the table.
D. Creating a unique index for the table.
B 4. Given the following:
A table contains 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, the list should not change.
Which of the following isolation levels should be used for this application?
A. Read Stability
B. Repeatable Read
C. Cursor Stability
D. Uncommitted Read
A 5. Given the following information:
CREATE TABLE tab1 (c1 CHAR (4), c2 INTEGER)
INSERT INTO tab1 VALUES ('123', 345)
UPDATE tab1 SET (c1, c2) = (NULL, 0)
What will be the result of the following statement if issued in the Command Line Processor?
SELECT * FROM tab1;
A. C1 C2 ---- ------------ 0 1 record(s) selected.
B. C1 C2 ---- ----------- 123 345 1 record(s) selected.
C. C1 C2 ---- ----------- NULL 0 1 record(s) selected.
D. C1 C2 ---- ----------- 123 0 1 record(s) selected.
A 6. Given table EMPLOYEE with columns EMPNO and SALARY, and table JOB with columns ID and TITLE, what is the effect of the following 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 = 'MANAGER')
A. Employees who make less than 15,000 and all managers are given salary increases.
B. Only employees who are managers that make less than 15,000 are given salary increases.
C. Employees who are not managers and who make less than 15,000 are given salary increases.
D. Only employees who are not managers or make less than 15,000 are given salary increases
B 7. Which of the following occurs if an application ends abnormally during an active unit of work?
A. The unit of work is committed
B. The unit of work is rolled back
C. The unit of work remains active
D. The unit of work moves to pending state
D 8. Which of the following is used to build and manage a heterogeneous Data Warehouse environment?
A. Data Joiner
B. Control Center
C. Workload Manager
D. DB2 Warehouse Manager
B 9. A unit of work is using an isolation level of Read Stability. An entire table is scanned twice within the unit of work.
Which of the following can be seen on the second scan of the table?
cs A. Rows removed by other processes
rs B. Rows added to a result set by other processes
cs C. Rows changed in a result set by other processes
Ur D. Rows with uncommitted changes made by other processes
A 10. Given the tables:
TABLEA TABLEB
empid name empid weeknumber paycheck
1 USER1 1 1 1000.00
2 USER2 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 RESTRICT)
How many rows would be deleted from tableb if the following command was issued?
DELETE FROM tablea WHERE empid = '2'
A. 0
B. 1
C. 2
D. 3
C 11. Given the SQL statement:
ALTER TABLE table1 ADD col2 INT WITH DEFAULT
Which of the following is the result of the statement?
A. The statement fails because no default value is specified.
B. A new column called COL2 is added to TABLE1 which would have a null value if selected.
C. A new column called COL2 is added to TABLE1 which would have a value of zero if selected.
D. A new column called COL2 is added to TABLE1 which would require the default value to be set before working with the table.
A 12. Assuming the proper privileges, which two of the following would allow access to data in a table T1 using the name A1?
(Select 2)
A. CREATE ALIAS a1 FOR t1
B. CREATE TABLE a1 LIKE t1
C. CREATE INDEX a1 ON t1 (col1)
D. CREATE VIEW a1 AS SELECT * FROM t1
E. CREATE TRIGGER trig1 AFTER INSERT ON t1 FOR EACH ROW MODE DB2SQL INSERT INTO a1
C 13. Which of the following will grant just DML operations on table T.T4 to all users?
A. GRANT ALL PRIVILEGES ON t.t4 TO PUBLIC
B. GRANT ALL PRIVILEGES ON t.t4 TO ALL USERS
C. GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE t.t4 to PUBLIC
D. GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE t.t4 TO ALL USERS
C 14. Which type of key is defined on the dependent table to implement referential constraints?
A. Unique key
B. Primary key
C. Foreign key
D. Composite key
D 15. Given a user defined function, U.UDF1, that takes an input parameter of type INTEGER, and USER6 running the following SQL statement:
SELECT w.udf1 (col6) FROM t.tab1 WHERE col4 = 'ABC'
Which of the following statement(s) would allow USER6 to execute the statement?
A. GRANT ALL PRIVILEGES ON TABLE t.tab1 TO user6
B. GRANT SELECT ON TABLE t.tab1 TO user6
GRANT USE ON FUNCTION u.udf1 (INT) TO user6
C. GRANT SELECT ON TABLE t.tab1 TO user6
GRANT REFERENCES ON FUNCTION u.udf1 (INT) TO user6
D. GRANT ALL PRIVILEGES ON TABLE t.tab1 TO user6
GRANT EXECUTE ON FUNCTION u.udf1 (INT) TO user6
C 16. Given these columns from the DEPARTMENT table:
deptno CHAR(3) NOT NULL
deptname CHAR(20) NOT NULL
mgrno CHAR(6)
admrdept CHAR(3)
location CHAR(20) NOT NULL
Which of the following will select the rows that do not have a value in the MGRNO column?
A. SELECT * FROM department WHERE mgrno = ' '
B. SELECT * FROM department WHERE mgrno = NULL
C. SELECT * FROM department WHERE mgrno IS NULL
D. SELECT * FROM department WHERE mgrno IS UNKNOWN
D 17. Given the following SQL statement:
GRANT REFERENCES ON TABLE tab1 TO USER usera
Which of the following describes what USERA is allowed to do?
A. Create a read-only view using TAB1.
B. Alter TAB1 to add a check constraint.
C. Define a primary key or unique constraint on TAB1.
D. Define a dependent table where TAB1 is the parent.
A 18. Given the following DDL statement:
CREATE TABLE newtab1 LIKE tab1
Which of the following would occur as a result of the statement execution?
A. NEWTAB1 would have the same column names and attributes as TAB1
B. NEWTAB1 would have the same column names, attributes, and data as TAB1
C. NEWTAB1 would have the same column names, attributes, indexes, and constraints as TAB1
D. NEWTAB1 would have the same column names, attributes, and referential integrity as TAB1
C 19. Which of the following tools is used to create subscription sets and add subscription-set members to subscription sets?
A. Journal
B. License Center
C. Replication Center
D. Development Center
B 20. Table T1 should only allow values of 1, 2, and 3 in column C1. Which of the following will cause the database manager to enforce this business requirement?
A. Delete trigger on T1
B. Check constraint on C1
C. Table level lock on T1
D. Update permission on C1
DE 21. Which two of the following can be done using the ALTER TABLE statement?
(Select 2)
A. Add a trigger.
B. Define an index.
C. Drop a table alias.
D. Add an INTEGER column.
E. Define a unique constraint.
D 22. Given the following statements from two 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
Assuming Program 1 ran to completion and then Program 2 ran to completion, which of the following records would be returned by the statement:
SELECT * FROM mytab?
A. 20989, Joe Smith
B. 21334, Amy Johnson
C. 23430, Jason French
D. 20993, Samantha Jones
E. No records are returned.
A 23. Which of the following actions describes when SQL indexes can be explicitly referenced by name within an SQL statement?
A. When dropping the index.
B. When altering the index.
C. When selecting on the index.
D. When inserting using the index.
D 24. Given the following two tables:
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?
A. SELECT * FROM tab2 LEFT OUTER JOIN tab1 ON c1=cx
B. SELECT * FROM tab1 INNER JOIN tab2 ON c1=cx
C. SELECT * FROM tab2 FULL OUTER JOIN tab1 ON c1=cx
D. SELECT * FROM tab1 LEFT OUTER JOIN tab2 ON c1=cx
D 25. Which of the following extenders allows data to be presented in a three-dimensional format?
A. DB2 AVI Extender
B. DB2 XML Extender
C. DB2 Text Extender
D. DB2 Spatial Extender
D 26. Given the create statements:
CREATE DISTINCT TYPE kph AS INTEGER WITH COMPARISONS
CREATE DISTINCT TYPE mph AS INTEGER WITH COMPARISONS
CREATE TABLE speed_limits
(route_num SMALLINT,
canada_sl KPH NOT NULL,
us_sl MPH NOT 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)
?D 27. Given the following UPDATE statement:
UPDATE address2 SET house_building=
(SELECT building FROM address1
WHERE address2.id = address1.id)
WHERE house_building 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.
C 28. A table called EMPLOYEE has the following columns:
NAME
DEPARTMENT
PHONE_NUMBER
Which of the following will allow USER1 to modify the PHONE_NUMBER column?
A. GRANT INDEX (phone_number) ON TABLE employee TO user1
B. GRANT ALTER (phone_number) ON TABLE employee TO user1
C. GRANT UPDATE (phone_number) ON TABLE employee TO user1
D. GRANT REFERENCES (phone_number) ON TABLE employee TO user1
C 29. A developer is building a Windows embedded SQL application that will access DB2 UDB for OS/390 or OS/400 servers. Which of the following products is required to be installed on the Windows system in order to build the application?
A. DB2 UDB Personal Edition
B. DB2 Connect Personal Edition
C. DB2 Personal Developer's Edition
D. DB2 UDB Workgroup Server Edition
?C 30. A database administrator has supplied the following information:
Protocol: TCP/IP
Port Number: 446
Host Name: ZEUS
Database Name: SAMPLE
Database Server Platform: OS/400
Which are the appropriate commands to set up the ability to connect to the database?
A. CATALOG TCPIP NODE zeus REMOTE zeus SERVER 446 OSTYPE os400 DATABASE sample;
B. CATALOG TCPIP DATABASE sample REMOTE zeus SERVER 446 OSTYPE os400;
CATALOG DATABASE dcssam AS sample AT NODE zeus AUTHENTICATION dcs;
C. CATALOG TCPIP NODE zeus REMOTE zeus SERVER 446 OSTYPE os400;
CATALOG DCS DB dcssam AS sample;
CATALOG DATABASE dcssam AS sample AT NODE zeus AUTHENTICATION dcs;
D. CATALOG TCPIP NODE sample REMOTE sample SERVER 446 OSTYPE os400;
CATALOG DCS DB sample AS dcssam;
CATALOG DATABASE dcssam AS sample AT NODE zeus AUTHENTICATION dcs;
B 31. 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?
A. SELECT a.deptname, SUM(b.salary) FROM org a, staff b WHERE a.deptnumb=b.dept ORDER BY a.deptname
B. SELECT a.deptname, SUM(b.salary) FROM org a, staff b WHERE a.deptnumb=b.dept GROUP BY a.deptname
C. SELECT a.deptname, SUM(b.salary) FROM org a INNER JOIN staff b ON a.deptnumb=b.dept ORDER BY a.deptname
D. SELECT b.deptname, SUM(a.salary) FROM org a INNER JOIN staff b ON a.deptnumb=b.dept GROUP BY a.deptname
?B 32. A client application on OS/390 or OS/400 must access a DB2 server on AIX. At a minimum, which of the following products is required to provide DRDA Application Server functionality on the DB2 server?
A. DB2 Connect Enterprise Edition
B. DB2 UDB Workgroup Server Edition
C. DB2 Connect Enterprise Edition and DB2 UDB Workgroup Server Edition
D. DB2 Connect Enterprise Edition and DB2 UDB Enterprise Server Edition
A 33. 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)
Where the job column contains job types: manager, clerk, and salesperson.
Which of the following statements will return the data with all managers together, all clerks together, and all salespeople together in the output?
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
A 34. Which of the following SQL statements can remove all rows from a table named COUNTRY?
A. DELETE FROM country
B. DELETE TABLE country
C. DELETE * FROM country
D. DELETE ALL FROM country
D 35. USER3 has created table TAB1 and has no additional authorities.
Which of the following statements is USER3 authorized to execute?
A. GRANT LOAD ON TABLE tab1 TO user8
B. GRANT CONTROL ON TABLE tab1 TO user8
C. GRANT OWNERSHIP ON TABLE tab1 TO user8
D. GRANT ALL PRIVILEGES ON TABLE tab1 TO user8
AC 36. Given the following table definitions:
CREATE TABLE employee
(empid INT NOT NULL PRIMARY KEY,
emp_fname CHAR(30),
emp_lname CHAR(30)
)
CREATE TABLE payroll
(empid INTEGER,
weeknumber INTEGER,
paycheck DECIMAL(6,2),
CONSTRAINT fkconst FOREIGN KEY (empid)
REFERENCES employee (empid) ON DELETE SET NULL,
CONSTRAINT chk1
CHECK (paycheck>;0 AND weeknumber BETWEEN 1 and 52))
The appropriate indexes exist to support the tables created with the previous CREATE statements. Which two of the following operations can cause the enforcement of a constraint defined on PAYROLL?
(Select 2)
A. Update of a row in PAYROLL
B. Deletion of a row in PAYROLL
C. Deletion of a row in EMPLOYEE
D. Addition of a new column to PAYROLL
E. Rollback of a row deletion on PAYROLL
B 37. When granted to USER1, which of the following will allow USER1 to ONLY access table data?
A. Administrative authority
B. SELECT privilege on the table
C. REFERENCES privilege on the table
D. SELECT privilege WITH GRANT OPTION on the table
C 38. A stored procedure has been created with the following statement:
CREATE PROCEDURE P1(INOUT VAR1 VARCHAR(10))...
From the command line processor (CLP), which is the correct way to call this procedure?
A. Call P1 (?)
B. Call P1 (DB2)
C. Call P1 ('DB2')
D. Call P1 ("DB2"
BE 39. Which two of the following SQL data types should be used to store a small binary image?
(Select 2)
A. CLOB
B. BLOB
C. VARCHAR
D. GRAPHIC
E. VARCHAR FOR BIT DATA
C 40. USER1 indicates that when running the following command from their client:
DB2 CONNECT TO sample USER user1
They receive the following error message:
SQL1013N The database alias name or database name "SAMPLE" could not be found. SQLSTATE=42705
Assuming a valid password was entered when prompted, which of the following is the cause of the error?
A. SAMPLE is not listening for incoming connections from clients.
B. The DB2 client version is not compatible with the server version.
C. The client's database directory does not contain an entry SAMPLE.
D. The client's node directory has an entry in it that points at a non-existent server.
B 41. Table T1 has a column C1 char(3) that contains strings in upper and lower case letters. Which of the following queries will find all rows where C1 is the string 'ABC' in any case?
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
D 42. Assuming the database has no distinct types, which of the following is an invalid data type on CREATE TABLE?
A. CLOB
B. DOUBLE
C. NUMERIC
D. DATETIME
?A 43. Given the two following tables:
Tablename: 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
Tablename OINTS
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 name, number and points for all players with an entry in both tables?
A. SELECT names.name, 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 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
A 44. Which of the following products is designed for analyzing data with more than two dimensions?
A. DB2 OLAP Server
B. DB2 Warehouse Manager
C. DB2 Relational Connect
D. DB2 Data Links Manager
B 45. 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 a result set that satisfies these conditions?
Displays the total number of employees in each department
Displays the corresponding department ID for each department
Includes only departments with at least one employee receiving a commission (comm) greater than 5000
Sorted by the department employee count from greatest to least
A. SELECT dept, COUNT(*) FROM staff GROUP BY dept HAVING comm >; 5000 ORDER BY 2 DESC
B. SELECT dept, COUNT(*) FROM staff
WHERE comm >; 5000
GROUP BY dept, comm
ORDER BY 2 DESC
C. SELECT dept, COUNT(*) FROM staffF GROUP BY dept HAVING MAX(comm) >; 5000 ORDER BY 2 DESC
D. SELECT dept, comm, COUNT(id) FROM staff WHERE comm >; 5000 GROUP BY dept, comm ORDER BY 3 DESC
B 46. Which of the following DB2 data types CANNOT be used to contain the date an employee was hired?
A. CLOB
B. TIME
C. VARCHAR
D. TIMESTAMP
C 47. Which of the following DB2 UDB isolation levels will lock no rows during read processing?
A. Read Stability
B. Repeatable Read
C. Uncommitted Read
D. Cursor Stability
C(D) 48. Given that the following statements were executed in order:
CREATE TABLE tab1 (c1 CHAR (1))
INSERT INTO tab1 VALUES ('b')
CREATE VIEW view1 AS SELECT c1 FROM tab1 WHERE c1 ='a'
INSERT INTO view1 VALUES ('a')
INSERT INTO view1 VALUES ('b')
How many rows would be returned from the following statement?
SELECT c1 FROM tab1
A. 0
B. 1
C. 2 //理论上
D. 3 //答案有争议//做的实验
B 49. Given the following SQL statements:
CREATE TABLE birthday1
(day INT CHECK(day BETWEEN 1 AND 31),
month INT CHECK(month BETWEEN 1 AND 6),
year INT)
CREATE TABLE birthday2
(day INT CHECK(day BETWEEN 1 AND 31),
month INT CHECK(month BETWEEN 7 AND 12),
year INT)
CREATE VIEW birthdays AS
SELECT * FROM birthday1
UNION ALL //不删除重复行,若是UNION就删除重复行
SELECT * FROM birthday2
INSERT INTO birthday1 VALUES( 22,10, 1973)
INSERT INTO birthday1 VALUES( 40, 8, 1980)
INSERT INTO birthday1 VALUES( 8, 3, 1990)
INSERT INTO birthday1 VALUES( 22, 10, 1973)
INSERT INTO birthday1 VALUES( 3, 3, 1960)
What will be the result of the following SELECT statement?
SELECT COUNT(*) FROM birthdays
A. 0
B. 2
C. 3
D. 5
A 50. For which of the following database objects can locks be obtained?
A. Table(行和表可以被锁定)
B. Trigger
C. Column
D. User-defined Data Type
D 51. Given the following statements:
CREATE TABLE t1
(c1 INTEGER,
c2 INTEGER,
c3 DECIMAL(15,0 ))
INSERT INTO t1 VALUES (1, 2, 3.0)
Which of the following will cause C1 to be decremented each time a row is deleted from the T2 table?
A. ALTER TABLE t1 ADD CHECK(t2) c1 = c1 - 1
B. CREATE VIEW v1 (c1) AS (SELECT COUNT(*) FROM t2)
C. ALTER TABLE t1 ADD FOREIGN KEY (c1) REFERENCES t2 ON DELETE CASCADE
D. CREATE TRIGGER trig1 AFTER DELETE ON t2 FOR EACH ROW MODE DB2SQL UPDATE t1 SET c1 = c1 – 1
C 52. An embedded SQL application is bound with Cursor Stability isolation level. It issues a request that retrieves 20 rows out of 200000 in the table. Which of the following describes the locks that are held as a result of this request?
A. None of the rows are locked.
B. The retrieved(检索)rows are locked.
C. The last row accessed is locked.
D. The rows not previously updated by another application are locked.
A 53. An application bound with isolation level Uncommitted Read updates a row. Which of the following is true regarding row locking in this application?
A. The application acquires no row locks.
B. The row lock is released when the cursor accessing the row is closed.
C. The row lock is released when the application issues a COMMIT statement.
D. The row lock is released when the cursor accessing the row is moved to the next row.
A 54. 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?
A. DB2 Runtime Client
B. DB2 Personal Edition
C. DB2 Administration Client
D. DB2 Application Development Client
700考试题_3
A 1 . 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?
A. DB2 Runtime Client B. DB2 Personal Edition
C. DB2 Administration Client D. DB2 Application Development Client
B 2. A client application on OS/390 or OS/400 must access a DB2 server on AIX. At a minimum, which of the following products is required to provide DRDA Application Server functionality on the DB2 server?
A. DB2 Connect Enterprise Edition
B. DB2 UDB Workgroup Server Edition
C. DB2 Connect Enterprise Edition and DB2 UDB Workgroup Server Edition
D. DB2 Connect Enterprise Edition and DB2 UDB Enterprise Server Edition
C 3. A developer is building a Windows embedded SQL application that will access DB2 UDB for OS/390 or OS/400 servers. Which of the following products is required to be installed on the Windows system in order to build the application?
A. DB2 UDB Personal Edition B. DB2 Connect Personal Edition
C. DB2 Personal Developer's Edition D. DB2 UDB Workgroup Server Edition
D 4. 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.Health Center D. Command Center
A 5. Which of the following products is designed for analyzing data with more than two dimensions?
A. DB2 OLAP Server B. DB2 Warehouse Manager
C. DB2 Relational Connect D. DB2 Data Links Manager
C 6. Which of the following tools is used to create and build stored procedures?
A. SQL Assist B. Task Center C. Development Center
D. Replication Center
C 7. Which of the following tools is used to create subscription sets and add subscription-set members to subscription sets?
A. Journal
B. License Center
C. Replication Center
D. Development Center
CE 8. Which two of the following types of storage management methods are supported by DB2 OLAP Server?
A. Object
B. Network
C. Relational
D. Hierachical
E. Multi-dimensional
D 9. Which of the following is used to build and manage a heterogeneous Data Warehouse environment?
A. DataJoiner
B. Control Center
C. Workload Manager
D. DB2 Warehouse Manager
C 10. Which of the following products can be used to perform a dictionary-based search?
A. DB2 XML Extender
B. DB2 AVI Extender
C. DB2 Text Extender
D. DB2 Spatial Extender
D 11. Which of the following extenders allows data to be presented in a three-dimensional format?
A. DB2 AVI Extender
B. DB2 XML Extender
C. DB2 Text Extender
D. DB2 Spatial Extender
DE 12. When establishing client-server communication, which two of the following can be used to verify passwords?
A. Catalog Tables
B. Access Control List
C. Application Programs
D. DRDA Application Server
E. Client Operating System
B 13. When granted to USER1, which of the following will allow USER1 to ONLY access table data?
A. Administrative authority
B. SELECT privilege on the table
C. REFERENCES privilege on the table
D. SELECT privilege WITH GRANT OPTION on the table
B 14.Given the following users and groups with no privileges on table t1:
GroupA GroupB
------ ------
user1 user4
user2 user5
user3
Which of the following commands gives all users in the above groups the ability to create a view on table t1?
A. GRANT SELECT ON TABLE t1 TO ALL
B. GRANT SELECT ON TABLE t1 TO PUBLIC
C. GRANT REFERENCES ON TABLE t1 TO ALL
D. GRANT SELECT ON TABLE t1 TO USER GroupA, GroupB
D 15.Given a user defined function, U.UDF1, that takes an input parameter of type INTEGER, and USER6 running the following SQL statement:
SELECT w.udf1(col6) FROM t.tab1 WHERE col4 = 'ABC'
Which of the following statement(s) would allow USER6 to execute the statement?
A. GRANT ALL PRIVILEGES ON TABLE t.tab1 TO user6
B. GRANT SELECT ON TABLE t.tab1 TO user6
GRANT USE ON FUNCTION u.udf1(INT) TO user6
C. GRANT SELECT ON TABLE t.tab1 TO user6
GRANT REFERENCES ON FUNCTION u.udf1(INT) TO user6
D. GRANT ALL PRIVILEGES ON TABLE t.tab1 TO user6
GRANT EXECUTE ON FUNCTION u.udf1(INT) TO user6
C 16.Which of the following will grant just DML operations on table T.T4 to all users?
A. GRANT ALL PRIVILEGES ON t.t4 TO PUBLIC
B. GRANT ALL PRIVILEGES ON t.t4 TO ALL USERS
C. GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE t.t4 to PUBLIC
D. GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE t.t4 TO ALL USERS
A 17. Communications is being manually established from a Windows 2000 client through a DB2 Connect gateway to a DB2 host system.
Which of the following does NOT have to be cataloged on the gateway?
A. The client
B. The node where the data source resides
C. The data source on the DB2 database server
D. The Database Connection Service (DCS) database
C 18. USER1 indicates that when running the following command from their client:
DB2 CONNECT TO sample USER user1
They receive the following error message:
SQL1013N The database alias name or database name "SAMPLE" could not be found. SQLSTATE=42705
Assuming a valid password was entered when prompted, which of the following is the cause of the error?
A. SAMPLE is not listening for incoming connections from clients.
B. The DB2 client version is not compatible with the server version.
C. The client's database directory does not contain an entry SAMPLE.
D. The client's node directory has an entry in it that points at a non-existent server.
C 18. A database administrator has supplied the following information:
• Protocol: TCP/IP
• Port Number: 446
• Host Name: ZEUS
• Database Name: SAMPLE
• Database Server Platform: OS/400
Which are the appropriate commands to set up the ability to connect to the database?
A. CATALOG TCPIP NODE zeus REMOTE zeus SERVER 446 OSTYPE os400 DATABASE sample;
B. CATALOG TCPIP DATABASE sample REMOTE zeus SERVER 446 OSTYPE os400;
CATALOG DATABASE dcssam AS sample AT NODE zeus AUTHENTICATION dcs;
C. CATALOG TCPIP NODE zeus REMOTE zeus SERVER 446 OSTYPE os400;
CATALOG DCS DB dcssam AS sample;
CATALOG DATABASE dcssam AS sample AT NODE zeus AUTHENTICATION dcs;
D. CATALOG TCPIP NODE sample REMOTE sample SERVER 446 OSTYPE os400;
CATALOG DCS DB sample AS dcssam;
CATALOG DATABASE dcssam AS sample AT NODE zeus AUTHENTICATION dcs;
A 19.To catalog a TCP/IP database connection to a remote DB2 server which of the following pieces of info |
|