DB2 is the database management system that delivers a flexible and cost-effective database platform to build robust on demand business applications. DB2 further leverages your resources with broad support for open standards and popular development platforms like J2EE and Microsoft .NET. The DB2 family also includes solutions tailored for specific needs like business intelligence and advanced tooling. Whether your business is large or small, DB2 has a solution built and priced to meet your unique needs.
DB2 Interviews are getting tough these days as the technology grows faster. To get through the DB2 interview one needs to update him/herself in a regular manner. Having said that, just before the interview, it is very important to have a quick glance of the reputed DB2 questions and answers to make yourself comfortable during the interview process. This is where DoAnswers.com helps you in renewing yourself on DB2 and various other technologies interview preparation.
1. If I have two programs say A&B,A is only cobol program,B iscobol-db2 program, how to compile both programs?
By create single plan and two packages.
2. After retrieving the elements from production,how can do the testing before moving the changes to production. Whether we have to create the JCL for testing or it will automatically tested and compiled?
Whenever a component is retrieved from the production base to a package, the component automatically gets compiled and staged. If not, then you can restage/recompile (by issuing 'r'/'s' command) the component after it is pulled in to the package. If testing means seeing the output, then you have to have JCL to execute it.
3. 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.
4. 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.
5. Assuming that a site's standard is that pgm name = plan name, what is the easiest way to find out which pgms are affected by change in a table's structure?
Query the catalogue tables SYSPLANDEP and SYSPACKDEP.
6. Can anyone tell me when do we need a COLLECTION? I know the concept of PLAN and PACKAGE, but unable to understand about COLLECTION.
package is normally linked to plan, however Suppose you want that in a same package , some particular sets of SQLs should have different properties and other set should have different properties then you give the collection id option within a package,for eg: if there are 2 queries and i require that 1st query should have isolation level CS to be for 1st query and RR for the second query then u need to give collection id option within the package for these different isolation levels. Collection is not a property of a plan. Collection is a property of a package. Within a plan there are package lists (PKLIST) which identifies collection and/or packages that are available through that plan. Collection is to package as schema is to table.
7. Can GROUP BY and ORDERED BY used in a single query?
GROUP BY and ORDER BY can be used in the same query and it is NOT required that they be the same column. GROUP BY controls the way the data is organized for sumarization. ORDER BY simply sorts the rows of the result. The following is legal: SELECT DEPARTMENT, AVG(SALARY) AS AVG FROM EMPLOYEE GROUP BY DEPARTMENT ORDER BY AVG
8. Can I use LOCK TABLE on a view?
No. To lock a view, take lock on the underlying tables.
9. Can you display the index?
u can display index in DB2 using syscat.sysindexes & syscat.syskeys system tables the common linking columns in the tables being tbname (table name) and tbcreator.
10. Can you have more than one cursor open at any one time in a program ?
Yes.