Section 12.12. Review Questions


12.12. Review Questions

1:

Which data movement utility supports the CURSOR input file type?

2:

What other privileges are needed to load a table if the person already has LOAD authority?

3:

Bob creates the stock table:

 CREATE TABLE stock ( id        INTEGER NOT NULL                     , name      VARCHAR(10)                     , bandlevel INTEGER NOT NULL                     , PRIMARY KEY (id) ) 

He then loads the table with this load command:

 load from stock.del of del modified by dumpfile=stockdump.dmp messages stock.out replace into stock for exception stockexp 

The input file stock.del looks like this:

 10, "AAA", 30 20, "BBB", - 30, "CCC", 3 30, "DDD", 4 40, "EEE", x 

After the load command is executed, which rows will be stored in the stockdmp.dmp file?

4:

With the same target table definition, load command, and input file as in question 3,, which rows will be stored in the stockexp exception table?

5:

A table is created with the following statement:

 CREATE TABLE employee     ( id   SMALLINT NOT NULL     , name VARCHAR(10)     , job  CHAR(5) CHECK (job IN ('Sales', 'Mgr', 'Clerk') )     , PRIMARY KEY (id)) 

If this load command is issued, what state would the employee table be in?

 load from emp2.del of del insert into emp2 

6:

A table is created with the following statement:

 CREATE TABLE employee     ( id   SMALLINT NOT NULL     , name VARCHAR(10)     , job  CHAR(5) CHECK (job IN ('Sales', 'Mgr', 'Clerk') )     , PRIMARY KEY (id)) 

If this import command is issued, what state would the employee table be in?

 import from emp2.del of del insert into emp2 

7:

What will this command do?

 db2look d department a e m x f o db2look.sql 

8:

Bob just completed a load operation to insert 300,000 rows of data into various tables. He performed a RUNSTATS to update the database statistics so that the DB2 optimizer knows about the new data. However, when the user logs in and runs the application, the performance is not acceptable. The application is mainly coded in static SQL and SQL stored procedures. What can Bob do to improve performance?

9:

Bob tries to execute the following command:

 import from largeinputfile.ixf of ixf     messages import.out    create into newtable in datats index in indexts 

However, he receives log full errors. What can he do to solve this problem?

10:

What is the prerequisite for a table to be imported with the insert_update option?

11:

Which of the following tools will read data from an ASCII file and add them to a table?

  1. insert

  2. merge

  3. load

  4. export

  5. import

12:

Which of the following tools will read data from an ASCII file and add them to a view?

  1. insert

  2. merge

  3. load

  4. export

  5. import

13:

Which of the following formats is not supported by the import utility?

  1. IXF

  2. DEL

  3. ASC

  4. XLS

14:

You want to import the following rows of data in the file foo.txt into the table foo:

 "Hello"|"World" "Goodbye"|"Cruel World" 

Which of the following commands must you run?

  1. Import from foo.txt of txt insert into foo

  2. Import from foo.txt of del insert into foo

  3. Import from foo.txt of pipedel insert into foo

  4. Import from foo.txt of del modified by coldel| insert into foo

15:

Which of the following tools cannot act on a view?

  1. Export

  2. Import

  3. Load

16:

Which of the following tools, commands, or statements can be used to rename a database?

  1. Rename database

  2. db2relocatedb

  3. db2move

  4. db2renamedb

17:

Which of the following tools can capture statistics on the data it adds to the table?

  1. Export

  2. Import

  3. Load

18:

Which of the following are true?

  1. The load utility locks the whole table space for the table being loaded.

  2. The load utility locks the whole table being loaded.

  3. The load utility by default locks only the existing data in the table until the load completes.

  4. The load utility allows read access to all data that existed in the table before the load was run.

19:

Which of the following tools can create a new table as well as populating the table?

  1. Load

  2. Import

  3. Export

  4. db2look

20:

Given a table is defined with PCTFREE = 1, which of the following tools will not leave free space in a table for subsequent inserts?

  1. Load

  2. Import

  3. Reorg



Understanding DB2(R. Learning Visually with Examples)
Understanding DB2: Learning Visually with Examples (2nd Edition)
ISBN: 0131580183
EAN: 2147483647
Year: 2004
Pages: 313

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net