![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a server program that should run in active/standby mode: * *- a copy of the program is running on two different computers * *- only one copy should be active * *- if the active copy exits, fails, etc, the standby should take * * *over and become the active * *- when the original active resumes, it is now the standby Using a dbms_lock makes this quite simple, put this code at the top of the program: * * dbms_lock.allocate_unique('myserver', v_lockhandle); * * v_result := dbms_lock.request(v_lockhandle, dbms_lock.x_mode); 1. *Is there any problem with holding a lock for a long time? *The * * active may stay active for months on end. 2. *If there is a problem with holding a lock for a long time, * * what is a "reasonable" time to keep a lock open? 3. *The most common way this lock will be released is for the * * process or the computer to die. *Are there any problems * * related to this? Many TIA, Mark -- Mark Harrison Pixar Animation Studios |
#3
| |||
| |||
|
|
I do not see any issue with a session holding the UL for as long as the instance is running even if it is months. Oracle does the same with file recovery locks. |
![]() |
| Thread Tools | |
| Display Modes | |
| |