Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
Other Resources:
How To Experiment a Data Lock
How To Experiment a Data Lock? - Oracle DBA FAQ - Understanding SQL Transaction Management
✍: FYIcenter.com
If you want to have some experience with data locks, you can create two windows runing two SQL*Plus sessions. In session 1, you can run a UPDATE statements to create a data lock. Before committing session 2, switch to session 2, and run a UPDATE statements on the same row as session 1. The UPDATE statement will be put into wait status because of the data lock. Follow the tutorial exercise below to experience yourself:
(session 1) SQL> connect HR/fyicenter SQL> SET TRANSACTION ISOLATION LEVEL READ COMMITTED; Transaction set. SQL> SELECT * FROM fyi_links; ID URL NOTES --- ---------------- -------- 101 FYICENTER.COM 110 CENTERFYI.COM SQL> UPDATE fyi_links SET url='fyicenter.com' WHERE id=101; 1 row updated. (lock created on row id=101) (session 2) SQL> connect HR/fyicenter SQL> SET TRANSACTION ISOLATION LEVEL READ COMMITTED; Transaction set. SQL> UPDATE fyi_links SET notes='FAQ Resource' WHERE id=101; (wait on lock at id=101) SQL> COMMIT; (lock on row id=101 released) (ready to run UPDATE) 1 row updated. SQL> SELECT * FROM fyi_links; ID URL NOTES --- ---------------- -------- 101 fyicenter.com 110 CENTERFYI.COM SQL> COMMIT; SQL> SELECT * FROM fyi_links; ID URL NOTES --- ---------------- ------------ 101 fyicenter.com FAQ Resource 110 CENTERFYI.COM
2007-04-17, 4575👍, 0💬
Popular Posts:
How can I check for HTML errors? HTML validators check HTML documents against a formal definition of...
.NET INTERVIEW QUESTIONS - What is the difference between System exceptions and Application exceptio...
How can I implement a thread-safe JSP page? You can make your JSPs thread-safe by having them implem...
How To Retrieve Input Values for Checkboxes Properly? - PHP Script Tips - Processing Web Forms If mu...
How To Get the Last ID Assigned by MySQL? - MySQL FAQs - Managing Tables and Running Queries with PH...