Shared Lock --Blocking Process

Team,
I have a sp with dynamic sql, which have around 1500 update stmts.
When i run this proc in prod, am getting alerts that this sp is blocking the process in prod server and it shows lock type as
Lock: Sch-S . How can i avoid this ?

Hello SSDL
Is this still an issue?
If not, then please close the thread, by marking answers and voting usefull responses.
Thanks!
p.s.
>> I saw that you use temporary table. make sure that this is not a global temporary table since it might be a reason for your lock, if you try to change the table on several sessions on the same time.
>> You say that this SP block something. Try to monitor "what is blocked" and not just who is blocking,
>> If you need more help please ADD the SP code + check isolation levels and post it + more information on what is blocked
>> Check that you are not using truncate (this is common issue that people forget
TRUNCATE is a DDL statement and requires a Sch-M lock on the object).
[Personal Site] [Blog] [Facebook]

Similar Messages

  • How to avoid shared locks when validating foreign keys?

    I have a table with a FK and I want to update a row in that table without being blocked by another transaction which is updating the parent row at the same time. Here is an example:
    CREATE TABLE dbo.ParentTable
    PARENT_ID int NOT NULL,
    VALUE varchar(128) NULL,
    CONSTRAINT PK_ParentTable PRIMARY KEY (PARENT_ID)
    GO
    CREATE TABLE dbo.ChildTable
    CHILD_ID int NOT NULL,
    PARENT_ID INT NULL,
    VALUE varchar(128) NULL,
    CONSTRAINT PK_ChildTable PRIMARY KEY (CHILD_ID),
    CONSTRAINT FK_ChildTable__ParentTable FOREIGN KEY (PARENT_ID)
    REFERENCES dbo.ParentTable (PARENT_ID)
    GO
    INSERT INTO ParentTable(PARENT_ID, VALUE)
    VALUES (1, 'Some value');
    INSERT INTO ChildTable(CHILD_ID, PARENT_ID, VALUE)
    VALUES (1, 1, 'Some value');
    GO
    Now I have 2 transactions running at the same time:
    The first transaction:
    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;BEGIN TRAN
    UPDATE ParentTable
    SET VALUE = 'Test'
    WHERE PARENT_ID = 1;
    The second transaction:
    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;BEGIN TRAN
    UPDATE ChildTable
    SET VALUE = 'Test',
    PARENT_ID = 1
    WHERE CHILD_ID = 1;
    If 'UPDATE ParentTable' statement runs a bit earlier, then 'UPDATE ChildTable' statement is blocked untill the first transaction is committed or rollbacked. It happens because SQL Server acquires shared locks when validating foreign keys, even
    if the transaction is using read uncommitted, read committed snapshot (read committed using row versioning) or snapshot isolation level. I cannot see why change in the ParentTable.VALUE should prevent me from updating ChildTable. Please note that ParentTable.PARENT_ID
    is not changed by the first transaction, which means that from FK's point of view whatevere is set to the ParentTable.VALUE is never a problem for referential integrity. So, such blocking behavior seems to me not logical. Furthermore, it contradicts to the
    MSDN:
    Transactions running at the READ UNCOMMITTED level do not issue shared locks to prevent other transactions from modifying data read by the current transaction. READ UNCOMMITTED transactions are also not blocked by exclusive locks that would prevent the
    current transaction from reading rows that have been modified but not committed by other transactions. 
    Does anybody know how to workaround the issue? In other words, are there any tricks to avoid shared locks when validating foreign keys? (Disabling FK is not an option.) Thank you.
    Alexey

    If you change the primary key of the parent table to be nonclustered, there is no blocking.
    Indeed, when I update ParentTable.VALUE, then:
    in case of PK_ParentTable is clustered, a particular row in the clustered index is locked (request_mode:X, resource_type: KEY)
    in case of PK_ParentTable is non-clustered, a particular physical row in the heap is locked (request_mode:X, resource_type: RID).
    and when I update ChildTable.PARENT_ID, then:
    in case of PK_ParentTable is clustered, this index is used to verify referential integrity:
    in case of PK_ParentTable is non-clustered, again this index is used to verify referential integrity, but this time it is not locked:
    It is important to note that in both cases SQL Server acquires shared locks when validating foreign keys. The principal difference is that in case of clustered PK_ParentTable the request is blocked, while for non-clustered index it is granted.
    Thank you, Erland for the idea and explanations.
    The only thing that upsets me is that this solution cannot be applied, because I don't want to convert PK_ParentTable from clustered to non-clustered just to avoid blocking issues. It is a pity that SQL Server is not smart enough to realize that:
    ParentTable.PARENT_ID is not changed and, as a result, should not be locked
    ChildTable.PARENT_ID is not actually changed either (old value in my example is 1 and the new value is also 1) and, as a result, there is no need at all for validating the foreign key.
    In fact, the problem I described is just a tip of the iceberg. The real challenge is that I have deadlocks because of the FK validation. In reality, the first transaction has an additional statement which updates ChildTable:
    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
    BEGIN TRAN
    UPDATE ParentTable
    SET VALUE = 'Test'
    WHERE PARENT_ID = 1;
    UPDATE ChildTable
    SET VALUE = 'Test'
    WHERE PARENT_ID = 1;
    The result is famous message:
    Msg 1205, Level 13, State 51, Line xx
    Transaction (Process ID xx) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    I know that if I change the order of the two statements, it will solve the deadlock issue. But let's imagine I cannot do it. What are the other options?
    Alexey

  • Blocking process each other but not killing..

    Hello,
    I have situation where 2 SPID's 82 and 112 blocking each other but deadlock monitor is not killing one of them. 82 is trying to get the shared lock on few pages of an object and got the shared lock on 1 page where as waiting on other. mean while Spid 112
    got the exclusive lock on the page where 82 is waiting for and trying to convert the lock on other page where 82 already has a lock.
    This is perfect dead lock situation but SQL Server is not detecting it as dead lock so not killing one of the process.
    This is on SQl Server 2008 R2 SP2 , can you please tell me why is this not being resolved by SQL Server?

    I have the sp_locks for both the process here and filtered for the object which is causing it... hope this will help to see this clearly.
    spid
    dbid
    ObjId
    IndId
    Type
    Resource
    Mode
    Status
    82
    32
    0
    0
    DB
    S
    GRANT
    82
    32
    1272391602
    0
    TAB
    IS
    GRANT
    82
    32
    1272391602
    1
    PAG
    1:209437                        
    S
    WAIT
    82
    32
    1272391602
    1
    PAG
    1:209436                        
    S
    GRANT
    spid
    dbid
    ObjId
    IndId
    Type
    Resource
    Mode
    Status
    112
    32
    1272391602
    1
    PAG
    1.052083333
    IX
    GRANT
    112
    32
    1272391602
    2
    PAG
    1:12188                         
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295103                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295137                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295141                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295145                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295149                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295151                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295152                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295155                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295157                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295163                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295165                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295167                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295104                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295117                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295120                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295122                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295126                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295128                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295134                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295172                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295445                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295446                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295441                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295488                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:295489                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:300960                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:307594                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:307593                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:308187                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:308185                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:308188                        
    IX
    GRANT
    112
    32
    1272391602
    0
    TAB
    [UPDSTATS]                      
    X
    GRANT
    112
    32
    1272391602
    0
    TAB
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:714003                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:713990                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:713929                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:713164                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:713166                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:713145                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:713136                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:713123                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:713118                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:713113                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:197314                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:197312                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:203702                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:203700                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:203216                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:208860                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:208856                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:210118                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:209450                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:209449                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:209443                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:209442                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:209447                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:209433                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:209437                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:209436                        
    IU
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:209436                        
    IX
    CNVT
    112
    32
    1272391602
    1
    PAG
    1:209425                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:209391                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:209366                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:209363                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:211926                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:211370                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:211369                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:214621                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:214273                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:214274                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:217073                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:217072                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:215976                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:218335                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:218334                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:218308                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:219454                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:219448                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:103959                        
    IX
    GRANT
    112
    32
    1272391602
    1
    PAG
    1:249456                        
    IX
    GRANT
    112
    32
    1272391602
    2
    PAG
    1:783866                        
    IX
    GRANT
    112
    32
    1272391602
    2
    PAG
    1:783848                        
    U
    GRANT

  • How to prevent shared locks in SELECT statement?

    Hi,
    In SQL Server we can use (NOLOCK) to prevent shared locks on each row:
    Select * from table (NOLOCK)
    Do we have similar technique for oracle so it doesn’t consider a shared lock for each returned row?
    Thank you,
    Alan

    Yes - it's called a query ;-)
    Oracle was designed with a 'consistent read' mechanism that guarantees that a query will see the image of the data at the moment when the query started, regardless of the number of updates (including deletes) that have occurred since the query started. This is done using the rollback (aka undo) segment. Flip side - there is no such thing as a 'dirty read'.
    Because of the implementation, a simple select or subselect without coersion (such as the 'FOR UPDATE' clause) will not block writers, nor will writers (updates/inserts/deletes) block readers.
    In addition, an update in Oracle will only lock the rows affected by the update, there is no escalation of locks needed (or possible), and commits do not introduce any 'lock clearing' overhead.
    The penalties for all of this
    - the rollback segment must be sized appropriately or you end up with ORA-01555 errors;
    - you should not commit in loops, especially not loops controlled by a cursor;
    - code written to be efficient in SQL Server is often inefficient in Oracle, and vice versa.
    Recommended reading is Tom Kyte's book at http://www.apress.com

  • How to create shared lock

    Hi,
    Can any please tell me how create a shared lock in steps.
    Thanks in advance
    Priya

    Hi Swati,
    This may not be possible, because you have created shared lock for the four different views but the table is one.
    So when one is editing then definitely if the other try to access the same entries then the object will be locked.
    First understand how and which lock can do which type of action.
    For your assistance read this and try to find the answer.
    Exclusive lock
    The locked data can be read or processed by one user only. A request for another exclusive lock or for a shared lock is rejected.
    Shared lock
    Several users can read the same data at the same time, but as soon as a user edits the data, a second user can no longer access this data. Requests for further shared locks are accepted, even if they are issued by different users, but exclusive locks are rejected.
    Exclusive but not cumulative lock
    Exclusive locks can be requested by the same transaction more than once and handled successively, but an exclusive but not cumulative lock can only be requested once by a given transaction. All other lock requests are rejected.
    Cheers!!
    VEnk@

  • ALEREMOTE LOCK at Process chain level

    hello experts,
    Please suggest me to resolve this ALEREMOTE LOCK at process chain level.
    Because of this the  chain is failed at different process levels.
    the below mentioned is the job log.
    Job tarted                                                                               
    Step 001 started (program RSPROCESS, variant &0000000464318, user ID ALEREMOTE)                                                                               
    Object requested is currently locked by user ALEREMOTE                                                                               
    Entire chain now has status 'R'                                                                               
    Process Generate Index, variant Generated from LOADING ZPAK_3TLYNXGWP514GLCXQ33XDE has status Undefined (instance )                                          
    Process Execute InfoPackage, variant PC : Quotation NA to Pipe has status Undefined (instance )                                                              
    Process Start Process, variant Start Hist and Pipe load has status Completed (instance 4B15FK2YHXC7EW1D221A4EHIM)                                            
    Process Local Process Chain, variant 6660 ZSDC2ABC has status Successfully completed (instance 4B14MFS6APTW94XB79A4MSTV2)                          
    Process Delete Index, variant Generated from LOADING ZPAK_3TLYNOIAKRPCQAO2X0DLN4 has status Successfully completed (instance DIDX_4B16EOQH4JK3BMJ41536QIHPQ) 
    Process Execute InfoPackage, variant PC : Quotation NA to Historical has status Successfully completed (instance REQU_4B180R5J6D8OIIEK0S9K0OH0U)             
    Process Generate Index, variant Generated from LOADING ZPAK_3TLYNOIAKRPCQAO2X0DLN4 has status Successfully completed (instance INDX_4B18Q9XP4GQZLL7LXGI5JYFXQ)
    Process Delete Index, variant Generated from LOADING ZPAK_3TLYNXGWP514GLCXQ33XDE has status Undefined (instance DIDX_4B18CADCFC1SL10FHBFZ7ZINI)              
    Termination of chain has been reported to meta chain 4B154CLBHDTKWHZEYFNE6RWOE                                                                               
    Job finished    
    Additional information::
    For the fisrt month - Error occured in block load infopackage
    Message text:Process Execute Info Package, variant PC: Quotation NA to Pipe has status Ended with errors (instance REQU_49OKKAVXV8WM75XY9268J
    Second month - Error occured in block load infopackage(same as last month)
    message text:Process Execute Info Package, variant PC: Quotation NA to Pipe has status Ended with errors (instance REQU_4ACQBCYASM88BVNSCWVG6
    Fourth month - error already in the first load
    Message text:Process Execute InfoPackage, variant PC : Quotation NA to Historical has status Ended with errors (instance REQU_4APCZRLE8E4BAY0     
    Fifth month - error in the "delete indexes" step
    Message text: Process Delete Index, variant Generated from LOADING ZPAK_3TLYNXGWP514GLCXQ33XDE has status Ended with errors (instance DIDX_4B1.
    Thanks in advance
    Edited by: S MB on Sep 9, 2008 12:01 PM
    Edited by: S MB on Sep 9, 2008 2:29 PM
    Edited by: S MB on Sep 9, 2008 2:31 PM

    Thanks for replies.
    Its a issue related to Transaction data(No master data is in these PC loading).
    Any body let me know is there any TCode available in BW  to see all jobs which are running on a specific CUBE / ODS.
    I mean...How can we come to know the jobs(all jobs in a same time) which are running on a perticular CUBE/ODS?
    Instead of SM12 & SM58
    Thanks in advance.
    Edited by: S MB on Sep 10, 2008 7:32 AM
    Edited by: S MB on Sep 10, 2008 8:02 AM
    Edited by: S MB on Sep 10, 2008 8:08 AM
    Edited by: S MB on Sep 10, 2008 10:58 AM

  • Mutex shared lock while reading/writing files

    Hi,
    My application is a single threaded application. And I am trying to do the read/write file operation.  But there is a chance that other process may read/write the same file while i am using. So before reading or writing the file, i want to mutex shared
    lock.
    So can please some one tell me how to prevent this situation. Is there some sample code. I checked in net, how to use mutex shared lock, i got some example, but every where before using the mutex loxk, a thread needs to be created. Since my application is
    a single threaded, so i dont want to create a new thread.
    So please help me, how to prevent/stop other process to access the same file while my application is using.
    THanks a lot in advance.

    That's not something that a mutex can help with. Other processes won't know about your mutex and even if they know that's overkill. Normally you simply open that file without allowing read/write sharing - in the case of CreateFile that in general means that
    you pass 0 for the dwShareMode parameter.
    If you use the C runtime functions then you can use fopen_s instead of fopen as it automatically disallows sharing if you open the file for write (if you open for read when it allows shared read which is the normal thing to do).

  • Clarification on Blocked Process Report behavior

    We have team members who are at odds over how this event is handled and it's coverage.
    After enabling this is sp_configure, and for the sake of argument keeping the threshold = 5 (default), and no other trace filters are applied - which of the following is true, false, or misunderstood:
    1. All-inclusive. The report will be generated for ANY transaction that is blocked for more than 5 seconds, meaning all transactions are contrasted against this threshold and no such transactions would be missed.
    2. "ad-hoc query-like" ; point-in-time only. The threshold is only contrasted against at a point-in-time only, in that at a set interval active transactions are reported against. This would mean blocked transactions that occur between this interval
    would not be reported against.
    Reading the MSDN/BOL articles, the language used is terse and somewhat left open to interpretation.
    The general discussion that started this is around whether or not running an external query (such as in SSMS) to report on blocking (which only reports on transactions at that point in time) is basically the same thing as running the blocked process report
    trace event, except in the trace event the "query" is run at "some interval" automatically.
    I am pretty sure I will win a beer if I am right on my answer to this - but I need expert arbitration. Please help me, I'm thirsty!
    Thanks very much for the assist!

    It's number 2: every 5 seconds the "LOCK MONITOR" checks for blocked processes and depending on the threshold will accumulate the sessions which are "still standing" after the threshold time, let's say 30 seconds.
    There is no Event involved until that point of the threshold being exceeded - that then is the event (which one can trace via SQL Trace or Extended Events), not before that.
    Andreas Wolter (Blog |
    Twitter)
    MCSM: Microsoft Certified Solutions Master Data Platform, MCM, MVP
    www.SarpedonQualityLab.com |
    www.SQL-Server-Master-Class.com

  • Shared lock vs exclusive lock

    Hello
    I have a question.
    If we have two scott sessions. I am updating a table EMP in session 1. It means it is exclusively locked.It cannot be used by session 2. Then can we use select command on table EMP in session 2.?? This command shoul not work according to me. But it is working.
    Reply me.
    Thanks in anticipation.

    984426 wrote:
    But in shared / exclusive lock, we have a property that we can't acquire shared lock on data if it is exclusively locked and vice versa. that means readers block writers and vice versa.
    E.g. if T1 is updating a row then how T2 can read that row? If T2 is reading then that is inconsistent data as it will pick the non-updated value of that row until T1 commits.
    Please explain.
    I am having doubts in this topic.
    ThanksYou need to check back again the basic concepts from the Concepts guide. Your understanding about the Oracle's working is completely wrong.
    In Oracle, the Transaction Isolation Level is set to Read Committed . This means any kind of inconsistent data is not possible to be read by you and for that data , Oracle would create for you a consistent image using the Undo Blocks in which the old image is going to be stored till the time that transaction is not over( and even after that too for some time with conditions apply) . So if T1 is updating a row, T2 can't lock the same row as it would be locked exclusively and the S1 (another select) would be seeing an old and consistent image of that change only as long as it's not committed. What you said doesn't and won't work ever in Oracle.
    Read the first link that's given to you already.
    Aman....

  • When shared locks are relesed in read committed.

    hi,
    https://msdn.microsoft.com/en-us/library/cc546518.aspx
    following lines are form above link
    "shared locks are acquired for read operations, but they are released as soon as they have been granted"
    Q1) Are they released after the stmt is executed " select * from a" or they are realease after the row is read and it continues with second row.
    Q2) As far as acquiring of shared lock is concerned i think they are acquired row by row , and mean  while other transaction can update rows which are not having shared lock till now , like last rows?
    yours sincerley

    That means.
    if a stmt select three rows.
    Q1)Then will it get shared lock for first row, reads it, release the lock, then take shared lock on second row and read it then release it again after reading the second row , then it will get thired row lock ....?
    Q2) As far as acquiring of shared lock is concerned i think they are acquired row by row , and mean  while
    other transaction can update rows which are not having shared lock till now , like last rows?
    Q1) Yes, in read committed mode when your query does not have any hints to change the behavior, if a query is only reading data from a table (like a SELECT statement), then the lock on each row is taken just before the row is read, the row is read, the lock
    is freed and it goes on to the next row and does the same process on that row (lock, read, free).
    Q2) Yes, the locks are acquired on a row basis.  Since they are then freed, your query will not stop other connections from updating rows in the table(s) you are reading except for the vary short period of time the lock is held on each row.  So
    your query could read lock row 1, read row 1, free the lock on row1, get a lock on row 2 and be in the process of reading row 2 when some other connection updates row 1.  That connection would be allowed to update row 1.
    Tom

  • Screen Sharing and WindowServer processes using 35-45% of CPU!!

    I have recently relocated and reconfigured my Apple network and computers in the house :1) MacBook Air dual display MBA with 20" cinema screen in the office, and 2) and Mac Mini connected to a large LCD TV in the living room.
    The plan now is to use the MBA as a primary computer and connect via wireless screen sharing to the MM so that I can monitor that system, run more intensive apps, watch EyeTV, file server tasks, etc.
    But now this has increased CPU and fan activity on the MBA beyond what I would expect. The activity monitor indicates that the Screen Sharing and WindowServer processes are using combined between 35-45% of the CPU (screen share process is a constant 25%!!).
    This is not good, and I wonder if it will be fixed in a future release. Any ideas or suggestions on how to limit the impact of screen sharing on CPU?

    It seems to be running better with system update, and use of a faster computer (now using the higher end mac book air)

  • How to implement the shared lock in a  table view

    Hi,
    How to implement the shared lock in a  table view.for multiple users to edit on this same table.
    Thanks in advance
    Swathi

    Hi,
    Please refer this link to find solution to your querry.
    Hope it helps.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c322c690-0201-0010-fb86-811c52b0acc2.
    Regards,
    Rahul

  • How to go for print preview option for locked/blocked items in PO.

    Dear all,
    Can we view PO even all the line items or some items in that PO are locked or blocked, by clicking Print preview button. If not by that button, is there any other way to view locked/blocked items in Print Preview format.
    Can anybody suggest me on this ?
    Thanks
    Hemanth

    Hi,
    Its not possible to see the line item in the print preview if it is blocked...
    You can only display in the PO only...why do you need Print preview of blocked items??
    Added on :
    You can check these locked details in the EKKO and EKPO table in the SE16 tcode for the respective PO and can also download the details if req. from the same table..
    Hope it helps..
    Regards
    Priyanka.P

  • How to Implement shared lock

    Hi friends,
    For a table I have created views. I want to create shared lock for that table.
    How to achieve that.
    can we create shared lock for views?
    Thanks.

    Hi Pagidala,
    Go to Se11-> Select Lock object radiobutton->give some name starting with E for example EZDEMO_LOCK->click on Create ->give short description->clcik on Tables Tab->give the table name for which you want to implement shared lock example ZTABLE ->lock mode you select as Read Lock.After this save check and activate your lock object.
    We have selected READ LOCK since it protects read access to an object. The read lock allows other transactions read access but not write access to the locked area of the table.
    Check the below link for the complete information on Lock Concept.
    http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4c5a79e11d1950f0000e82de14a/content.htm
    Cheers!!
    VEnk@
    Edited by: Venkat Reddy on Oct 29, 2008 11:54 AM

  • "no enough space to create shared lock" Error Occured

    Hi, Everyone
    After creating a new Sales Order in the CRM System, there was a Error "no enough space to create shared lock".
    who have met this issue before?Please tell me, thanks a lot.
    Best Regards,
    Bonnie Spear

    Hi Bonnie,
       Shared Lock means Several users (transactions) can access locked data at the same time in display mode.
    Requests from further shared locks are accepted, even if they are from different users.
    But if you are creating a new sale order this should not occur. May be you should check your customizing settings.There may be some problem in that.
    Hope this helps.
    best regards
    Sourabh

Maybe you are looking for

  • File Content Conversion Mapping problem

    Hi, I tried a file to file simple scenario using FCC on the Sender Side,but I repeatedly get a message mapping error. I tried changing the different parameters in filesender file adapter, checked message mapping for errors . 1.My Mapping is Correct.

  • Bug in FGAC (11g)

    Hello, I perform this script under system user create user test_schema identified by 111; alter user test_schema quota unlimited on users; create table TEST_SCHEMA.TBL1   ID        NUMBER not null,   TBL2_ID NUMBER alter table TEST_SCHEMA.TBL1   add

  • Effect disappears when convert to CMYK

    I have a logo that was sent to me RGB, when I convert the document space the effect (reflection) disappears, I'm not very familiar with the effect that the person created, (mask with gradient). Here's a couple of screen shots, any advice would be app

  • Types in function modules

    hi   i want to know how many types of function modules are there please help in this . thankyou pavan

  • Question about java swing

    I was playing around with the code given in the swing tutorial by Java. It has this frame.getContentPane().add(label);I was looking at it and decided to delete the getContentPane to see what it did. The program still worked fine and I was wondering i