Time before unlocking locked tables
Hello,
i have a problem once again:
I execute several SQLs in a database (p.e. insert, update and so on). Before i can execute the transaction commit, the connection to the database breaks. So i can do neither the commit less the rollback.
In the database my session is inactive, the tables stay locked for some time.
And now the question: is it possible for me (or the administrator) to change this internal timer, which controls the unlock of tables in inactive sessions?
greetings
Sabine Herdejürgen
Before i can execute the transaction commit, the connection to the database breaks. So i can do neither the commit less the rollback.
no problem process monitor perfrom these task when
when connection break ,or any other error
The background process PMON cleans up after failed processes by:
Rolling back the users current transaction
Releasing all currently held table or row locks
Freeing other resources currently reserved by the user
and enjoy your life:-)
kuljeet pal singh
Similar Messages
-
FM for locking n unlocking a table for update
I have to update a table named bnka, can anyone tel me the FM for locking and unlocking a table before updating the same..
thnkx
amityou can use FM ENQUEUE_EFBNKA to lock the table vbak
and DEQUEUE_EFBNKA to unlock it
Example:
call function 'ENQUEUE_EFBNKA'
EXPORTING
MODE_BNKA = 'E'
BANKS = bnka-banks
BANKL = bnka-bankl
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
update BNKA .....
call function 'DEQUEUE_EFBNKA'
EXPORTING
MODE_BNKA = 'E'
BANKS = bnka-banks
BANKL = bnka-bankl. -
Hi how to handel the lock and unlock the table
Hi,
i am having the one scenario like,for lock and unlock the table i used the function modules ENQUEUE_E_TABLE and DEQUEUE_E_TABLE but it allowing the edit the first user and suppose to try the editing the second user it is giving the error message it correct but again the second user press any button it is leaving the program it should not happened please help me that.
regards,
Hari.Hi,
i assume it's in table JEST
so select:
SELECT * FROM JEST
WHERE OBJNR = aufk-OBJNR
AND STAT IN S_STATI
Andreas -
Lock and Unlock a table:AFVU
Hi Folks.
I want to modify a standard table (AFVU ) with new user dates from User.For this,First I need to lock and unlock the table.
When I am trying for the standard table lock object (EAFVU) ,it was not there in the system.
Is there any way to find out the lock object for a particular table?
How to proceed for this?
Any Pointers are much helpful.Hi,
Go to SE11 and display your table - do a where used list and select lock objects.
I really hope when you say you are modifying a standard table you are only updating custom appends on that table, and not directly updating standard SAP fields...
Gareth. -
Screen saver unlock/lock times....
I'm looking for a way to track when folks unlock/lock their screen savers. Is there a program or log file that can assist me here? I need to be able to do this so I can track when users are unlocking/locking their machines. Most users don't logout of their machine, so the screen saver is my best option I think. They are running 10.9.2.
Suggestions are welcome for tracking times other than this route as well.
Thanks in advance,My grandmother is 85 years old. The Ipad we bought her is primarily used for receiving emails with pictures from us, which are then displayed in the slide show of the screen saver.
Last night my genious brother decided for some reason to upgrade her Ipad to IOS7. I have no idea why he did that, but he rendered the Ipad useless for her use.
In the time since the last message was posted on this thread, has anyone found any workaround, app or anything that can be of help. Did anyone downgrade to IOS6 successfully?
Please note anything other than the an automatic slideshow including new pictures would not be useful.
I am at a loss and desparately need a solution for this one. -
My iPhone is displaying a "iPhone is disabled" notification. It asked me to enter my password multiple times before locking me out. Can you help with this?
Hey there!
Unfortunetly, in situations like this, the ONLY other way to bypass that four-digit passcode and/or a disabled device is to connect to a computer with the most recent version of iTunes (11.1.3), connect the device in Recovery Mode and restore it to factory settings. Restoring to factory will completely wipe the device, including the four-digit passcode.
The steps to do so are outlined in http://support.apple.com/kb/ht1212
(If there is any other way to bypass the passcode, it would have to be third-party, which I am not familiar with any program that can, sorry!). -
My iphone 4 will not unlock when I press the home button, I have to alternate between the home and off button multiple times before my home scree will appear....please help!!!???
Do a reset
Reset: Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Note: You will not lose any data -
My iPhone freezes every single time it is locked. If I don't lock it, the battery dies within an hour. HELP
Your only chance besides getting it serviced would be setting it up as new device:
http://support.apple.com/kb/HT4137 -
Hi,
We use Oracle 9.2.0.8.
There is a table whose size is almost 30GB.
Considering there are no locks and just one index string on this table, is there a way to estimate the time taken to truncate this table?
I need to plan this activity. Does anybody can give me any idea about time based on old experiences?
Thanks in advance,
FerSeconds... (if there are no locks).
Truncate is an operation on data dictionary metadata. Oracle will free all extents exept the first one and will mark all blocks in the first extent as unused. No data blocks are "formatted" or "cleared". (If you open your datafile in hex editior, you can still see contents of datablocks - names, addresses, phone numbers etc.).
If truncate does not complete in 15 seconds, you can start looking for locks.
You can also try:
LOCK TABLE my_30gig_tab IN EXCLUSIVE MODE;
before attempting TRUNCATE.
If there are locks on the table then your session will "hang" on LOCK TABLE statement (your session will wait, but it can take long time), but subsequent TRUNCATE should be fast. -
Enqueue and Dequeue before updating Database table
Hi all,
We are updating database tables using INSERT, MODIFY and UPDATE statements. Since many people will be running the application at the same time we need to lock the table before updating database table. So we need to use ENQUEUE and DEQUEUE functionality for this purpose.
Can any plz explain what are the steps we should follow now?
Thanks in advance.Hi,
Any Database access should carefully handled as multiple applications may be accessing the database at the same time. To read a record from the database you don't need to implement a lock, but to write you need not only locks but also ideally should use the Update Function Modules to comply SAP "All or Nothing" Principle. This will prevent data inconsistency of the database and the data will be proper state. You need to use the COMMIT WORK and ROLLBACK WORK in you code to handle the consistency part of the database.
The best design approach would be seperate the Database Layer completely from the business layers. This will make your code robust and easy to maintain.
As, for the Locking Concepts, you will get multiple resources from SDN as how to create Locks and implement the Locking modules in your code. But more than that what matters is why and how to implement the SAP Locking concepts to make your application run better.
Have a look at the following link
http://help.sap.com/saphelp_nw70/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
Hope this helps.
Thanks,
Samantak. -
Hi All,
I need to update a ZTABLE with UNIQUE serial number while creating shipment and Delivery.
I have used ENQUEUE_E_TABLE to lock the table before updating table in both the ZProgram which will update the serial numbers.
The problem is even though i locked the table , i am facing problem with creation of duplicate number serial numbers while shipment and delivery happens at the same time.We have tested this with multiuser environment.
Since both shipment and delivery updating in UPDATE TASK i coudnt use COMMIT WORK in the programs.
Please let me know if there are any tricks how to lock the table and also for using COMMIT WORK inside UPDATE TASK.
Give some example program for locking tables especialy used in update task.
Thanks and Regards,
kandakumarHi
Lock the table before updating it and check the locking with sy-subrc and if it is not locked then use do loop to lock the table.
See the dummy code ,hope it will help you.
Do n times.
*Lock the table
*Check sy-subrc if it is 0 exit the loop else
try again.
if locking is suceessfull.
set a flag.
endif.
Enddo.
If flag is not set give the message table is not locked.
else if it is locked then proceed with updation
Cheers
Neha shukla -
what is lock table
Hi
1)Go to se11 transaction.
2)Click on lock object radio button and give a lock object name starting with 'E'.For example 'ESAMPLE'.Click CREATE.
3)In the TABLE tab, you can give the table name for which you require a lock.In the LOCK PARAMETERS tab,you can give the table fields based on which the table should be locked.
4)Call a function module in your program ENQUEUE_lockobjectname to obtain a lock on the required table.In our example the FM will be ENQUEUE_ESAMPLE.
5)To release the lock on the table,call the function module DEQUEUE_lockobjectname.In our example the FM will be DEQUEUE_ESAMPLE.
Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
testing the locking of tables...
data: varkey like rstable-varkey.
varkey = sy-mandt.
locking the tables............................
call function 'ENQUEUE_E_TABLE'
exporting
MODE_RSTABLE = 'E'
tabname = 'MARA'
varkey = varkey
X_TABNAME = ' '
X_VARKEY = ' '
_SCOPE = '2'
_WAIT = ' '
_COLLECT = 'X'
exceptions
foreign_lock = 1
system_failure = 2
others = 3
case sy-subrc.
when 1.
message i184(bctrain) with 'Foreignlock'.
when 2.
message i184(bctrain) with 'system failure'.
when 0.
message i184(bctrain) with 'success'.
when others.
message i184(bctrain) with 'others'.
endcase.
unlocking the table...............
call function 'DEQUEUE_E_TABLE'
exporting
MODE_RSTABLE = 'E'
tabname = 'MARA'
varkey = varkey
X_TABNAME = ' '
X_VARKEY = ' '
_SCOPE = '3'
_SYNCHRON = ' '
_COLLECT
<REMOVED BY MODERATOR>
preet
Edited by: Alvaro Tejada Galindo on Jun 12, 2008 6:21 AM -
Lock table is out of available locker entries
My mail server version is -->
Sun Java(tm) System Messaging Server STORE 6.3-0.15 (built Feb 9 2007)
Not always this thing happened but sometimes, I can find follow error message in deault log file.
---- default log --
[12/May/2009:12:00:00 +0900] epajo01 imdbverify[4106]: General Notice: verify database snapshots started
[12/May/2009:12:00:00 +0900] epajo01 imdbverify[4106]: General Notice: verify snapshots finished: Total verified 3 Total failed = 0
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: General Notice: imexpire started, functions: expire purge
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: General Error: locking error: Lock table is out of available locker entries
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: General Error: DBERR: can't get locker id for file descriptor 20: Not enough space
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: Store Critical: Unable to lock index for user/journal_ms08_i: Not enough space
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: General Error: locking error: Locker does not exist
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: Store Error: locking {StoreRoot}/=user/02/91/=journal_ms08_i/store.exp: Invalid argument
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: General Error: locking error: Locker does not exist
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: Store Critical: Unable to lock index for user/journal_ms08_y: Invalid argument
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: General Error: locking error: Locker does not exist
-------- omit ---------
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: Store Error: locking {StoreRoot}/=user/e1/91/=journal_ms08_g/store.exp: Invalid argument
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: General Error: locking error: Lock table is out of available locker entries
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: General Error: locking error: Locker does not exist
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: General Error: DBERR: can't get locker id for file descriptor 23: Not enough space
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: Store Critical: Unable to lock index for user/journal_ms08_w: Invalid argument
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: Store Error: locking {StoreRoot}/=user/73/e5/=journal/store.exp: Not enough space
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: General Error: locking error: Locker does not exist
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: Store Error: locking {StoreRoot}/=user/e2/91/=journal_ms08_w/store.exp: Invalid argument
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: General Error: locking error: Locker does not exist
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: Store Critical: Unable to lock index for user/journal_ms08_h: Invalid argument
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: General Error: locking error: Locker does not exist
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: Store Error: locking {StoreRoot}/=user/f1/91/=journal_ms08_h/store.exp: Invalid argument
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: General Error: locking error: Locker does not exist
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: Store Critical: Unable to lock index for user/journal_ms08_x: Invalid argument
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: General Error: locking error: Locker does not exist
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: Store Error: locking {StoreRoot}/=user/f2/91/=journal_ms08_x/store.exp: Invalid argument
[12/May/2009:12:00:01 +0900] epajo01 imexpire[4115]: General Notice: Expire finished
When I can see this error message in default log files, all emails are enqueued but not dequeued.
Emails are just piled up in a queue directory, and getting increased.
To solve this thing, I just restart mail server(with stop-msg, start-msg command) and then emails are dequeued.
In a web site, I found those error messages can be found when some interrption occurred like Control-c in product using Berkeley DB .
I know JMS is using Berkeley DB but at that time there is no chance to use Control-c.
With those log, I just can assum imexpire started when snapshots job is not finished completely(although log file shows snapshots job is finished).
Imexpire started before snapshots not release locker
But I am not Sure.
I don't know why this thing happened and what is solid workaround.
If someone had the same problem as mine, plz reply
Thanks in advance.
Edited by: leeky41 on May 12, 2009 7:22 AMleeky41 wrote:
Sun Java(tm) System Messaging Server STORE 6.3-0.15 (built Feb 9 2007) Please always provide the full output of ./imsimta version. I cannot tell for example what platform you are using (Solaris SPARC/x86/Linux).
I don't know why this thing happened and what is solid workaround.I suggest your first step is to upgrade to a recent release of MS6.3 and see if the problem persists.
Regards,
Shane. -
Lock table is out of available lock entries
Hi,
I'm using BDB 4.8 via Berkeley DB XML. I'm adding a lot of XML documents (ca. 1000) in one transaction and get "Lock table is out of available lock entries". My locks number is set to 100000 (it's too much but still...).
I know that I probably should not put so many docs in the same transaction, but why BDB throws "not enough locks" error? Aren't 100000 locks enough? (I also tried to set 1 million for testing purposes)
As a side effect question, may I change the number of locks after environment creation (but before opening it)?
P.S. Hope it's not offtop on this forum
Thanks in advance,
VyacheslavHello,
As you mention, "Lock table is out of available lock entries" indicates that there are more locks than your underlying database environment is configured for. Please take a look at the documentation on "Configuring locking: sizing the system" section of the Berkeley DB Reference Guide at:
http://www.oracle.com/technology/documentation/berkeley-
db/db/programmer_reference/lock_max.html
From there:
The maximum number of locks required by an application cannot be easily estimated. It is possible to calculate a maximum number of locks by multiplying the maximum number of lockers, times the maximum number of lock objects, times two (two for the two possible lock modes for each object, read and write). However, this is a pessimal value, and real applications are unlikely to actually need that many locks. Reviewing the Lock subsystem statistics is the best way to determine this value.
What information is the lock subsystem statistics showing? You can get this with db_stat -c or programmatically with the environment lock_stat method.
Thanks,
Sandra -
hi
i have a problem about lock table now .
i have a program(A) to LOCK TABLE ZSTUDENT.
NOW program(A) have locked TABLE ZSTUDENT ,before TABLE ZSTUDENT was unlocked, i open anther program(B) to lock TABLE ZSTUDENT,now sy-subrc mustn't be 0, now i hope the program(B) could wait until program(A) unlock TABLE ZSTUDENT ,how should i do?
if program(A) lock the TABLE ZSTUDENT for 20mins,i hope program(B) could wait for 20mins.
thanks.Hello,
Use the below function module. Then sy-subrc will not be 0 when called from program B.
CALL FUNCTION 'ENQUEUE_E_TABLES'
EXPORTING
mode_rstable = 'E'
tabname = <table name>
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
In program B, you can call this in Do - EndDo and exit when sy-subrc is 0
Regards,
Janani
Edited by: janani chakrapani on Jan 8, 2010 1:42 PM
Maybe you are looking for
-
Dear All, I want to create report in oracle application which gives output in 2 excel worksheets. And both worksheet will display data. Is this possible in XML or Discoverer . Pls Help me.
-
I broke my Iphone 4 - and would now like to know how to retrieve my song purchased on the old phone.I have got a new Iphone 5s. I have a Itunes account, but not on a Mac computer
-
DV NTSC Video Playback on external monitor
I can't get my DV NTSC sequence to play on my external monitor. I know I have the computer/Canopus/external monitor connected correctly b/c I can playback some of my old Final Cut Express sequences on the external monitor. I used that as a test to ma
-
I need help finishing my cover letter! :)
I wrote a resume on web pages and as it was being edited there were vertical lines, one along each paragraph. How can these be deleted? Thank you!
-
Developer site not working?
I have been trying to download the SDK for the past 3 - 4 hours but every time I try and login I get the following error message: "We are processing your request. Please wait a few moments then refresh this page". Anyone else have the same problem?