Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Administration & Installation

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 26th June 2003, 18:49
Baan-Anna's Avatar
Baan-Anna Baan-Anna is offline
Junior Member
 
Join Date: Jun 2003
Location: USA
Posts: 5
Baan-Anna is on a distinguished road
Baan: 5.0b - DB: Oracle - OS: SunSparc 8
Unhappy application locks

I'm seeing a lot of records in the application locks session (ttadv9598m000).
Some are obviously hanging there and can be removed, others are clearly current, but there is a big grey area with locks that I'm not so sure off.

What are the consequences of removing an application lock that is still in use (isn't the record locked on the DB-level)?

What are the consequences of not removing an application lock that is no longer used?

Are there some general guidelines for maintaining this session?

Reply With Quote
Sponsored Links
  #2  
Old 26th June 2003, 20:38
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,028
NPRao will become famous soon enough
Baan: iBaanERP-5.2a(Reger),SSA-ERP-LN-6.1,Infor LN-10.x - DB: Oracle-10g,11g,12c,MS-SQL - OS: HP-UX, Linux, Windows
Here is some info-

Application Locks are not deleted when a user exits bshell or disconnects. This is creating several application locks on the functional sessions for several days. We have to now go to the application locks sessions and delete them manually after the developers advise what has to be done.

If the user exits session normally the application lock must be release by the application itself. It is possible for a session(s) that the application lock will not been deleted ( could be a programming problem ), if these is the case, please let us know in which specific session the lock is not deleted.

If for some reason the bshell is disconnected and the session will not be closed normally, there will be an application lock. The only way to release it is using session ttadv9598m000 " Remove application Locks"

If you uncomment these lines from the $BSE/etc/rc.start shell, the application locks will be removed when you start the Baan product.
#Optional Remove all Application Locks
#${BSE}/etc/rc.start_remall
You can use the same shell when no users are log on the system to delete all the Application Locks.

By using the session 'Remove range of application locks' [ttadv9298m000] you are able to remove a range of application locks. You can use this for instance in a night job after all the users have left the system and when no other programs are running. When running this program you must ensure that no locks are set. They may cause problems when running other programs in a night job.

The "exit" option located at the option dialog, is not a normal way to finish a session, the session will be terminated as a "kill" and it will not follow the program logic and the application log will not be deleted.

If you exit from Worktop, and there is an open session with an application lock, the system will display the next message: " There are sessions with an application lock that cannot be closed", then Worktop will be closed but the session will remain open until the user exits from the session, and at that moment the application lock will be released.

Application Locks Explanation:
An application lock is set in applications, where data must be locked for a long period, e.g. in the text editor. In normal situations, application locks are removed by the application, which has also set the lock. Only in case of system crashes/failures, it is possible that application locks remain in the system. In this session you can remove these application locks. Remove only the application locks, if you are sure that the application which has set the lock, is not running anymore
Attached Images
File Type: jpg app-lock.jpg (11.2 KB, 266 views)
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
  #3  
Old 13th August 2003, 22:20
Baan-Anna's Avatar
Baan-Anna Baan-Anna is offline
Junior Member
 
Join Date: Jun 2003
Location: USA
Posts: 5
Baan-Anna is on a distinguished road
Baan: 5.0b - DB: Oracle - OS: SunSparc 8
Question Still unclear

Thanks for your response NPRao, but I am still unclear on the situation.

What are the ramifications if an application lock is (accidently) removed while the application that set the lock is still running?

Also, what is the purpose of these locks when the records are already locked at the database level?
Reply With Quote
  #4  
Old 13th August 2003, 22:38
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,028
NPRao will become famous soon enough
Baan: iBaanERP-5.2a(Reger),SSA-ERP-LN-6.1,Infor LN-10.x - DB: Oracle-10g,11g,12c,MS-SQL - OS: HP-UX, Linux, Windows
Baan-Anna,

Refer to - Application locks: overview
Quote:
Application locks: overview
--------------------------------------------------------------------------------
Use these functions to handle application locks for 4GL processes.

You use application locks to prevent other applications and users from reading and/or modifying an application's data during critical operations. For example, to prevent access to data when it is being updated.

You can set an application lock only for the current 4GL process. You can test for or delete an application lock only within the application to which it applies.

Application lock features
Each application lock has an owner, which is automatically assigned. The owner consists of a combination of the login ID of the application user, and the process ID of the application.
Each application lock has a unique name, which you define when you create the lock.
An application lock is automatically removed when the application ends. You can also remove it with the appl.delete() function.
An application lock applies only to an application and that application's data. It is not part of the RDBMS and is not linked to a table or a particular database transaction. To set table locks, use db.lock.table().
The ramifications depends on the functionality of the sessions in use.

I hope the last bold line clears your 2nd Q.

You can also use the Search on the board here with keyword - application lock to see others problems.
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
  #5  
Old 13th August 2003, 23:57
lbencic's Avatar
lbencic lbencic is offline
Guru
 
Join Date: Dec 2001
Location: Lisle, IL, USA
Posts: 1,148
lbencic will become famous soon enough
Baan: 2.2d - LN - DB: most - OS: most
Also, please review the Baan method of 'locking records'. Baan uses a 'delayed locking' mechanism. That is, the record updates are 'qued' so to speak, until a commit transaction is issued. This can create the situation of 'dirty reads'. This happens when the logic reads a record say, 5 seconds ago, changes some values, then does an update. When the commit is issued, it is VERY possible that a change has been made to the record, through some other process. This generates a 'db.retry', and the whole process it tried again. This problem has to then be handled programatically - lots of more complex discussions on that.

The application locks are out there as an attempt to stop this. You cannot modify an hours accounting record, for instance, if someone else is already modifying that. The database really doesn't care - it will process 1 on top of the other, or return a dirty ready error, but the programmer knows this would not be good, so uses an application lock in that instance. Same is true for large processes, if 2 people start a large process, they may both select the data, but 1 performs the commitsd before the other, and the 2nd one is ...basically hosed or acting unpredictably unless you write complex db.retry logic, which is not done much. That's why the large process also have application locks.
Reply With Quote
  #6  
Old 14th August 2003, 00:18
Baan-Anna's Avatar
Baan-Anna Baan-Anna is offline
Junior Member
 
Join Date: Jun 2003
Location: USA
Posts: 5
Baan-Anna is on a distinguished road
Baan: 5.0b - DB: Oracle - OS: SunSparc 8
Lightbulb Now that makes sense

Thanks guys!!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Baan Application Administrator mmalik70 Jobs and Resumes 1 17th August 2004 13:28
Application Locks with username ******** raghunath13 Tools Administration & Installation 4 18th May 2004 22:44
Enterprise Application Specialist Available asolution Jobs and Resumes 0 29th May 2002 12:57


All times are GMT +2. The time now is 09:19.


©2001-2017 - Baanboard.com - Baanforums.com