|
COMMIT [WORK]: Makes changes permanent
Ex:
INSERT INTO EMPLOYEE (Empl_ID, FirstName, LastName,
Department) VALUES (‘SA00120’,’Max‘, ‘Johnson’, ‘Sales’);
COMMIT;
INSERT INTO EMPL_Salaries (Empl_ID, Amount , Vacation ) VALUES
(‘SA00120’,1500,5);
COMMIT WORK;
COMMIT COMMENT [Comment_Text]; Add a text to the commit
instruction. The maximum size for Comment_Text=255. Oracle stores COMMIT
COMMENT into data dictionary.
Ex:
INSERT INTO EMPLOYEE (Empl_ID, FirstName, LastName,
Department) VALUES (‘HR0457’,’Michelle‘, ‘LEE’, HR’);
COMMIT COMMENT 'New employee in the house!';
COMMIT WRITE FORCE [Text], [Number]; This command Manually
force changes to be permanent. It is mostly used in case of doubtful
distributed transactions.
Ex:
INSERT INTO EMPLOYEE (Empl_ID, FirstName, LastName,
Department) VALUES (‘ACT45210’,’Vincent‘, ‘DeAndre’, ‘Accounting’);
COMMIT WRITE FORCE;
COMMIT WRITE BATCH [WAIT | NOWAIT]; This commit statement is
perform while redo instructions are written in the buffer redo to be batch move
into the online redo log.
Ex:
INSERT INTO EMPLOYEE (Empl_ID, FirstName, LastName,
Department) VALUES (‘SA45010’,Jackie‘, ‘Fullton’, ‘Sales’);
COMMIT WRITE BATCH WAIT;
COMMIT WRITE [IMMEDIATE | WAIT | NOWAIT]; Making a commit with
these options defines the way Oracle log writer process will proceed towrite
the redo instruction in the redo log.
COMMIT WRITE IMMEDIATE; Makes a commit and forces Oracle Log
writer process to write the redo instruction in the online redo log
immediately.
Ex:
INSERT INTO EMPLOYEE (Empl_ID, FirstName, LastName,
Department) VALUES (‘SA004520’,’Denise‘, ‘Brown’, ‘Sales’);
COMMIT WRITE IMMEDIATE;
COMMIT WRITE NOWAIT: When this command is run, Commit statement
will not wait for the redo instruction to be written into the redo log before
it takes effects.
Ex:
INSERT INTO EMPLOYEE (Empl_ID, FirstName, LastName,
Department) VALUES (‘SA450120’,’Eunice‘, ‘Hernandez’, ‘Sales’);
COMMIT WRITE NOWAIT;
COMMIT WRITE WAIT: This command forces Commit instruction to
return the handle only when the corresponding redo statement is permanently
written in the redo lo.
INSERT INTO EMPLOYEE (Empl_ID, FirstName, LastName,
Department) VALUES (‘SA451450’,’Gerard‘, ‘Dufour’, ‘Sales’);
COMMIT WRITE WAIT;
|