Kbase P7201: How to cause a lock type of IX in Promon?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  30/01/2003 |
|
Status: Unverified
GOAL:
How to cause a lock type of IX in Promon?
FIX:
The (I)ntent e(X)clusive lock type can only be generated by SQL transactions. Therefore, the following code can be executed from the SQL Explorer Tool (SQL-92) or the Procedure Editor Tool (SQL-89) in order to simulate an IX lock type:
/*** 1st step ***/
CREATE TABLE employee
(emp_num INTEGER NOT NULL UNIQUE,
name CHARACTER(30),
job CHARACTER(15),
dept CHARACTER(15),
startdate DATE,
salary DECIMAL(8,2),
UNIQUE(emp_num)).
/*** 2nd step ***/
DEFINE VARIABLE viCounter AS INTEGER NO-UNDO. /* Procedure Editor only */
REPEAT viCounter= 1 TO 10000: /* Procedure Editor only */
INSERT INTO employee
(emp_num,
name,
job,
dept,
startdate,
salary)
VALUES
(viCounter /* 1024 */,
NULL,
NULL,
NULL,
NULL,
NULL).
END. /* Procedure Editor only */