DATE: PIC X (10)
TIMESTAMP: PIC X (26)
TIME: PIC X (08)
Posted Date:- 2021-09-03 03:14:46
The REMARKS of VARCHAR column are as follows: –
MySQL
10 REMARKS
49 REMARKS – LEN PIC S9 (4) USAGE COMP.
49 REMARKS – TEXT PIC X (1920).
10 REMARKS
49 REMARKS – LEN PIC S9 (4) USAGE COMP.
49 REMARKS – TEXT PIC X (1920).
Posted Date:- 2021-09-03 03:14:05
SELECT is not preferred in embedded SQL programs for three reasons. First; if the table structure is changed by the addition or deletion of a field and the program is modified then using SELECT might retrieve the columns that the user may not use. This would lead to Input-Output overhead and the chances of an index-only scan are also eliminated.
Posted Date:- 2021-09-03 03:12:53
After a load, or after mass updates, inserts, deletes, or after REORG.
What is the reason that the MySQL statement “SELECT AVG (SALARY) FROM EMP” generates inaccurate output? The reason for the statement generating inaccurate outcomes is because of the fact that SALARY has not been declared to have NULL and at the same time the employees whose salary is not known are also counted.
Posted Date:- 2021-09-03 03:11:43
To insert a NULL, move -1 to the null indicator. To insert a valid value, move 0 to the null indicator
Posted Date:- 2021-09-03 03:10:55
-1: the field is null; 0: the field is not null; -2: the field value is truncated
Posted Date:- 2021-09-03 03:10:18
Use null indicators. Syntax .. INTO HOSTVAR: NULLED
Posted Date:- 2021-09-03 03:09:43
As an extra-byte prefix to the column value. Physically, the null prefix is Hex '00" if the value is present and Hex 'FF' if it is not.
Posted Date:- 2021-09-03 03:09:12
There may be one of the following reasons:
probably RUN STATS is not done and the program is using a wrong index due to incorrect stats.
probably RUN STATS is done and the optimizer has chosen a wrong access path based on the latest statistics.
Posted Date:- 2021-09-03 03:08:35
At run time, when the PREPARE statement is issued.
Posted Date:- 2021-09-03 03:07:51
A user-defined name that is the anchor for packages. It has no physical existence. The main usage is to group packages.
Posted Date:- 2021-09-03 03:07:18
The advantages of using PACKAGE are :
Avoid having to bind a large number of DBRM members into a plan
Avoid the cost of a large bind
Avoid the entire transaction being unavailable during bind and automatic rebind of a plan
Minimize fallback complexities if changes result in an error.
Posted Date:- 2021-09-03 03:06:47
PLAN has the executable code for the SQL statements in the host program
Posted Date:- 2021-09-03 03:06:11
DBRM: DataBase Request Module, has the SQL statements extracted from the host language program by the pre-compiler. PLAN: A result of the BIND process. It has the executable code for the SQL statements in the DBRM.
Posted Date:- 2021-09-03 03:05:35
SQL command used to change the definition of DB2 objects.
Posted Date:- 2021-09-03 03:05:05
Promoting a PAGE lock-size to the table or tablespace lock-size when a transaction has acquired more lock than specified in NUMLKTS. Locks should be taken on objects in single tablespace for escalation to occur.
Posted Date:- 2021-09-03 03:04:33
There are three methods to determine lock-size. They are;
-Based on the lock-size given while creating the tablespace.
-Programming can direct the DB2 what lock-size to use
-If lock-size ANY is specified, DB2 usually chooses a lock-size of PAGE
Posted Date:- 2021-09-03 03:03:43
During the BIND process (ISOLATION LEVEL is a parameter for the binding process ). ISOLATION (CS/PR)..
Posted Date:- 2021-09-03 03:03:01
CS: Release the lock on a page after use
RR: Retains all locks acquired till the end of the transaction
Posted Date:- 2021-09-03 03:02:28
There are two methods to achieve this:
Use SPUFI or QMF to EXPLAIN the dynamic SQL statement
Include EXPLAIN command in the embedded by dynamic SQL statements
Posted Date:- 2021-09-03 03:01:25
Use WITH HOLD option in DECLARE CURSOR statement. But, it has no effect on pseudo-conversational CICS programs.
Posted Date:- 2021-09-03 03:00:33
The ability to join rows and combaine data from two or more tables is one of the most powerful features of relational system.Three type of joins:
1. Equi-join
2. Non-equijoin
3. self-join.
Posted Date:- 2021-09-03 02:59:29
The b37 abend in the spufi is because of space requirements , the query has resulted in so many rows that the spufi.out file is not large enough to handle it, increase the space allocation of spufi.out file.
Posted Date:- 2021-09-03 02:58:46
When you use the primary key and only the primary key in the where clause.
Posted Date:- 2021-09-03 02:58:18
join is used to retrive data from different tables using a single sql statement.union is used to combine the results of two or more sql querries.
Posted Date:- 2021-09-03 02:57:49
In a subquerry, if the outer querry reffers back to the outcome of innerquerry it is called corelated subquerry. That's why the outer querry is evaluated first unlike an ordinary subquerry.
Posted Date:- 2021-09-03 02:57:23
BIND mainly performs two things syntax checking and authorization checking.It binds together all packages into an application plan hence the name BIND.Apart from this bind has optimiser as a subcomponent.Its function is to determine the optimum access strategy.
Posted Date:- 2021-09-03 02:56:49
The answer is Locksize = ANY.Unless you are Sure what's the Purpose of tablespace ie.,Read-only or R/W.If you use lock size =any, Db2 would automatically determine what type of locks it should use.
Posted Date:- 2021-09-03 02:56:24
CURRENTDATA option ensures block fetch while selecting rows from a table. In DB2V4 the default has been changed to NO. Therefore it is necessary to change all the bind cards with CURRENTDATA(YES) which is default in DB2V3 & earlier to CURRENTDATA(NO).
Posted Date:- 2021-09-03 02:56:00
TYPE 1 & TYPE 2 are specified when an index is created on the table. TYPE 2 index is the option which comes with DB2V4. With TYPE 2 index data can be retreived faster as only the data pages are locked and not the index pages. Hence TYPE 2 index is recommended.
Posted Date:- 2021-09-03 02:55:38
CS RR UR( added new for DB2V4 which stands for uncommited read which allows to retreive records from the space which has exclusive locks also but data integrity will be affected if this option is used )The best available option for data integrity & data concurrency is CS.
Posted Date:- 2021-09-03 02:55:09
It is a data structure that must be included in any host-language program using SQL. It is used to pass feedback about the sql operations to the program. Fields are return codes, error messages, handling codes and warnings.
Posted Date:- 2021-09-03 02:54:33
When a view is created, system information about the view is stored in SYSIBM.SYSVIEWS.
Posted Date:- 2021-09-03 02:54:02
When an application program executes with repeatable read protection, rows referenced by the program can’t be changed by other programs until the program reaches a commit point.
Posted Date:- 2021-09-03 02:52:39
Included is the name of the database, the tablespace name, and the image copy type (full or incremental, etc..) as well as the date and time each copy was made.
Posted Date:- 2021-09-03 02:50:59
The SYSIBM.SYSCOPY table contains information about image copies made of the tablespaces.
Posted Date:- 2021-09-03 02:50:36
This is a seven-part value that consists of a date (yymmdd) and time (hhmmss and microseconds)
Posted Date:- 2021-09-03 02:50:00
If the tablespace used is only allocated do that STOGROUP :
ALTER STOGROUP- add volume (new ) delete volume (old )
REORG TABLESPACE or RECOVER TABLESPACE
Create a new STOGROUP that points to the new volume. ALTER the tablespace and REORG or RECOVER the tablespace.
Posted Date:- 2021-09-03 02:49:34
When an application program executes with repeatable read protection, rows referenced by the program can't be changed by other programs until the program reaches a commit point.
Posted Date:- 2021-09-03 02:49:07
A predicate is an element of a search condition that expresses or implies a comparison operation.
Posted Date:- 2021-09-03 02:48:28
This is a data item that is used in an SQL statement to receive a value or to supply a value. It must be preceded by a colon (:) to tell DB2 that the variable is not a column name.
Posted Date:- 2021-09-03 02:47:43
The Data Manager is a DB2 component that manages the physical databases. It invokes other system components, as necessary, to perform detailed functions such as locking, logging, and physical I/O operations ( such as search, retrieval, update, and index maintenance).
Posted Date:- 2021-09-03 02:47:12
COMMIT will allow data changes to be permanent. This then permits the data to be accessed by other units of work. When a COMMIT occurs, locks are freed so other applications can reference the just committed data.
Posted Date:- 2021-09-03 02:46:43
UNION – It is the function that eliminates duplicates from the table.
UNION ALL – It is the function used to retain the duplicates in the table.
Both the functions are used to combine the results generated by multiple SELECT statements.
Posted Date:- 2021-09-03 02:45:55
There is a certain point in a program at which DB2 acquires or perhaps releases the locks against tables as well as table-spaces. These include intent locks.
Posted Date:- 2021-09-03 02:44:37
EXPLAIN is basically used to show the path of access by the optimizer basically for an SQL statement. Furthermore, EXPLAIN can also be brought to use in SPUFI or even in BIND step.
Posted Date:- 2021-09-03 02:44:07
Even if DB2 is down at some point of time, even then it will not impact the pre-compilation process of DB2-COBOL program. The reason for the same is that the pre-compiler never refers to the catalogue tables of DB2.
Posted Date:- 2021-09-03 02:43:40
There are primarily two components of DCLGEN. These are: –
A copy book of the host language, which will give alternative definitions for all the column names.
In terms of the data-types of DB2, EXEC SQL DECLARE TABLE shows an aesthetic layout of the table.
Posted Date:- 2021-09-03 02:41:27
SQLERRM, SQLCODE, SQLERRD.
Posted Date:- 2021-09-03 02:40:50
PACKAGES are units, which consist of executable codes that are meant for SQL statements for one respective DBRM.
Posted Date:- 2021-09-03 02:40:18