The largest Interview Solution Library on the web


Interview Questions
« Previous | 0 | 1 | 2 | 3 | 4 | Next »

61.Give some example of statistics collected during RUNSTATS?

# of rows in the table
Percent of rows in clustering sequence
# of distinct values of indexed column
# of rows moved to a nearby/farway page due to row length increase

62.What is REORG? When is it used?

REORG reorganizes data on physical storage to reclutser rows, positioning overflowed rows in their proper sequence, to reclaim space, to restore free space. It is used after heavy updates, inserts and delete activity and after segments of a segmented tablespace have become fragmented.

63.What is IMAGECOPY ?

It is full backup of a DB2 table which can be used in recovery.

64.When do you use the IMAGECOPY?

To take routine backup of tables
After a LOAD with LOG NO
After REORG with LOG NO

65.What is COPY PENDING status?

A state in which, an image copy on a table needs to be taken, In this status, the table is available only for queries. You cannot update this table. To remove the COPY PENDING status, you take an image copy or use REPAIR utility.

66.What is CHECK PENDING ?

When a table is LOADed with ENFORCE NO option, then the table is left in CHECK PENDING status. It means that the LOAD utility did not perform constraint checking.

67.What is QUIESCE?

A QUIESCE flushes all DB2 buffers on to the disk. This gives a correct snapshot of the database and should be used before and after any IMAGECOPY to maintain consistency.

68.What is a clustering index ?

Causes the data rows to be stored in the order specified in the index. A mandatory index defined on a partitioned table space.

69.What is the difference between primary key & unique index ?

Primary : a relational database constraint. Primary key consists of one or more columns that uniquely identify a row in the table. For a normalized relation, there is one designated primary key.
Unique index: a physical object that stores only unique values. There can be one or more unique indexes on a table.

70.What is sqlcode -811?

SELECT statement has resulted in retrieval of more than one row.

71.What does the sqlcode of -818 pertain to?

This is generated when the consistency tokens in the DBRM and the load module are different.

72.Are views updateable ?

Not all of them. Some views are updateable e.g. single table view with all the fields or mandatory fields. Examples of non-updateable views are views which are joins, views that contain aggregate functions(such as MIN), and views that have GROUP BY clause.

73.What are the 4 environments which can access DB2 ?

TSO, CICS, IMS and BATCH

74.What is an inner join, and an outer join ?

Inner Join: combine information from two or more tables by comparing all values that meet the search criteria in the designated column or columns of on e table with all the clause in corresponding columns of the other table or tables. This kind of join which involve a match in both columns are called inner joins.
Outer join is one in which you want both matching and non matching rows to be returned. DB2 has no specific operator for outer joins, it can be simulated by combining a join and a correlated sub query with a UNION.

75.What is FREEPAGE and PCTFREE in TABLESPACE creation?

PCTFREE: percentage of each page to be left free
FREEPAGE: Number of pages to be loaded with data between each free page

76.What are simple, segmented and partitioned table spaces ?

Simple Tablespace:
Can contain one or more tables
Rows from multiple tables can be interleaved on a page under the DBAs control and maintenance
Segmented Tablespace:
Can contain one or more tables
Tablespace is divided into segments of 4 to 64 pages in increments of 4 pages. Each segment is dedicated to single table. A table can occupy multiple segments
Partitioned Tablespace:
Can contain one table
Tablespace is divided into parts and each part is put in a separate VSAM dataset

77.What is a synonym ?

Synonym is an alternate name for a table or view used mainly to hide the leading qualifier of a table or view.. A synonym is accessible only by the creator.

78.What is the difference between SYNONYM and ALIAS?

SYNONYM: is dropped when the table or tablespace is dropped. Synonym is available only to the creator.
ALIAS: is retained even if table or tablespace is dropped. ALIAS can be created even if the table does not exist. It is used mainly in distributed environment to hide the location info from programs. Alias is a global object & is available to all.

79.What do you mean by NOT NULL WITH DEFAULT? When will you use it?

This column cannot have nulls and while insertion, if no value is supplied then it wil have zeroes, spaces or date/time depending on whether it is numeric, character or date/time.
Use it when you do not want to have nulls but at the same time cannot give values all the time you insert this row.

80.When would you prefer to use VARCHAR?

Whe n a column which contains long text, e.g. remarks, notes, may have in most cases less than 50% of the maximum length.

« Previous | 0 | 1 | 2 | 3 | 4 | Next »


copyright © 2014 - all rights riserved by javatechnologycenter.com