Mandalika has Published 477 Articles

How to provide & remove user access to/from DB2 object? Give the DB2 commands?

Mandalika

Mandalika

Updated on 30-Nov-2020 09:25:20

409 Views

DB2 has a concept of DCL, through which we can control the access to DB2 objects like table, plan, etc. DCL stands for Data Control Language and using this we can provide and remove user access to the DB2 objects.GRANT command will give the user access to the mentioned object ... Read More

How will you keep the locks on the resources even after a ROLLBACK?

Mandalika

Mandalika

Updated on 30-Nov-2020 09:23:42

129 Views

DB2 places locks on the resources like table, tablespace, etc., when any application is using that resource. In a COBOL-DB2 program, if we are modifying or deleting data from a table then DB2 places locks. When we give the ROLLBACK statement to revert the changes made in the database, all ... Read More

Purpose and usage of SAVEPOINT in COBOL-DB2 program

Mandalika

Mandalika

Updated on 30-Nov-2020 09:22:26

1K+ Views

Problem: How to use SAVEPOINT in a DB2? What is the purpose of SAVE-POINT in DB2? Explain with the help of an example.SolutionThe SAVEPOINT is used as a marker or tag to save the changes without committing in the database. After making the changes in the database, we can give ... Read More

What is STORED PROCEDURE in a DB2? How will you create a new stored procedure?

Mandalika

Mandalika

Updated on 30-Nov-2020 09:19:19

4K+ Views

The DB2 STORED PROCEDURE are the programs which are directly managed by DBMS. The STORED PROCEDURE generally contains SQLs and they can be called by application programs. The STORED PROCEDURE processes the query and returns the result to the application program. The STORED PROCEDURES can be used for the SQLs ... Read More

How will you find out all the indexes which are built in a particular DB2 table?

Mandalika

Mandalika

Updated on 30-Nov-2020 09:18:19

350 Views

The DB2 indexes are used to increase the query performance and speed up the query result. There can be multiple indexes built on a single table and DB2 optimizer chooses different indexes based on the predicate used in the WHERE clause to fetch the query result.In order to find out ... Read More

How to find out the PLANS which will be impacted if a index is dropped?

Mandalika

Mandalika

Updated on 30-Nov-2020 09:17:32

99 Views

A DB2 PLAN contains all the SQL statements in executable form. To execute any COBOL-DB2 program we need to provide its corresponding PLAN. The DB2 optimizer will evaluate the access path for the SQLs present in the PLAN to fetch the result for the COBOL-DB2 program. The SQLs in PLAN ... Read More

Difference between SCALAR and COLUMN function

Mandalika

Mandalika

Updated on 30-Nov-2020 09:16:24

455 Views

The DB2 SCALAR functions take a single column value and returns a single result. The COLUMN function takes the column value from multiple rows of a DB2 table and returns a single result. In case of SCALAR function only one row is involved.SCALAR FUNCTIONDESCRIPTIONLENGTHGives the length of the column valueREPLACEUsed ... Read More

What are COLUMN functions in DB2? Explain with the help of an example

Mandalika

Mandalika

Updated on 30-Nov-2020 09:15:09

429 Views

The DB2 COLUMN functions are also known as aggregate functions. These functions take the values from a particular column of multiple rows and return a single value.Below is the list of some most commonly used COLUMN functions.COLUMN FUNCTIONDESCRIPTIONSUMFinds the sum of column valuesCOUNTCount the number of column valuesAVGFinds the average ... Read More

Error codes, cause and example of deadlock in DB2

Mandalika

Mandalika

Updated on 30-Nov-2020 09:14:15

981 Views

A DEADLOCK condition occurs when two applications lock the data that is needed by each other. Both the applications wait for the other one to release the lock and hence deadlock occurs.Let us see an example to understand this better:There are two COBOL-DB2 programs in execution: PROG A and PROG ... Read More

Explain SHARED, UPDATE and EXCLUSIVE locks with the help of an example

Mandalika

Mandalika

Updated on 30-Nov-2020 09:13:23

2K+ Views

The SHARED, UPDATE and EXCLUSIVE are the types of locks which are used in concurrent application processing. This means that these locks are used when the two or more applications try to access the same row or page. Below is the description for each type of lock.SHARED LOCKIf any application ... Read More

Previous 1 ... 6 7 8 9 10 ... 48 Next
Advertisements