Suppress warnings re exclusive locking

We're using ASE 15.7 on Windows but this may apply to other platforms. Certain stored procs where we're locking a table in exclusive mode inside a trans generate warnings: (number 12103, Severity 10)
Table 'x' in database 'y' was not locked in 'exclusive' mode because a covering lock in 'exclusive' mode was found.
I guess I have 2 questions - are we doing something wrong that's causing this and is there a way to suppress these?  According to the docs it's informational.

Hi David,
You aren't doing anything particularly wrong.
If you were writing your own reporting client using the Open Client SDK, or perhaps using some existing client that had some features for defining error handlers, you avoid seeing the message by using an error handler that did not output it.  If you are using a general purpose client like isql, there currently isn't a way to directly surpress output of the message.  There is an open feature request for that, CR 234335.  However, it has been open since 2001, and I don't expect to see any action on it soon.  (You could open an incident to express your interest in it and increase its priority if you wish).  However, there is also a way to just avoid the message in the first place.
The message is output when you use LOCK TABLE to request a lock that you already have.
You can avoid it by checking master..syslocks to see if you already have such a lock and only calling LOCK TABLE if you don't have it.
if not exists (
                    select id from master..syslocks
                    where id = object_id("t1")
                    and type = 1
                    and spid = @@spid
begin
      lock table t1 in exclusive mode
end
------  demonstration:
create table t1 (c1 int)
go
begin tran
lock table t1 in exclusive mode - - create an existing exlusive table lock
go
lock table t1 in exclusive mode  -- try to get another exclusive table lock
go                                               -- this outputs the message
if not exists (select id from master..syslocks
  where id = object_id("t1")
  and type = 1
  and spid = @@spid)
begin
lock table t1 in exclusive mode
end
go                                                  -- this does not output the message
rollback tran
go
id          dbid   page       type   spid   class
         fid    context row    loid        partitionid nodeid
(0 rows affected)
id          dbid   page       type   spid   class
         fid    context row    loid        partitionid nodeid
   576002052      6          0      1     14 Non Cursor Lock
              0       0      0          28           0   NULL
(1 row affected)

Similar Messages

  • Stupid Question: Suppress Warnings vs Fixing What Ain't Broken

    Hey all,
    I'm getting about 70 warnings in my code, mostly because I'm using anonymous classes to set up Actions as shown in the code snip below. This generates the warning "The serializable class does not declare a static final serialVersionUID field of type long" every time I create an Action this way:
    final Action defaultUpAction = am.get(im.get(KeyStroke.getKeyStroke("control UP")));
              Action upAction = new AbstractAction(){  //warning generated here
                   public void actionPerformed(ActionEvent e){
                        defaultUpAction.actionPerformed(e);
                        lastAction = "UP";
              };I understand what's causing the warning, and I even know how to fix it (or ignore the warning).
    My question is, which is less of a hack? Do I just throw in a few SuppressWarnings annotations, or should I add a default serialVersionUID in each anonymous class? I'm not using the serialization functionality, but I might want to sometime in the future in which case suppressing the warnings would be a bad idea. Both solutions (adding a field I don't need or suppressing warnings instead of fixing them) seem a bit kludgey to me. Am I just being too touchy, or is there a better way?
    Thanks

    Thanks for the input, that does make quite a bit of sense. I suppose my hesitation comes from the feeling that although I was told by the higher-ups to "fix those warnings", all I'm doing is concealing them. I guess I shouldn't look at it that way, especially since I don't use serialization at all in any of my code (nobody else does, either). So in this case, simply suppressing the warnings probably makes more sense than adding fixes that won't be used anyway (and in fact may mislead future developers into thinking I'm using serialization somewhere).

  • GTT table getting Row Exclusive lock

    I have a procedure which loads a table which is used for reporting.
    Currently it is a single process which picks up most of the data after joining 2-3 big tables(around 70-80GB) and then loading the main table.
    The joins are on PI and also partitions are also being used. Then a lot of updates are done on the main table to update other columns which are being picked from different tables.
    As the processing is happening on huge amount of data(around 1M), so processing is taking a lot of time.
    This process is taking around 40-45 minutes.
    I am planning to use parallelism to run it in 75 sessions. So the initial big insert will be faster and later on all the updates will be done on smaller chunks which will benefit the performance.
    I planned to use GTT table so that i dont have to create 75 temp tables for each sessions.
    But while using GTT table(ON COMMIT DELETE ROWS) in parallel sessions, i am seeing that the GTT table is getting Row Exclusive lock and the time taken by overall process is increasing by lot.
    So i tested by using 75 temp tables. There i saw that the performance has increased by lots as assumed initially.
    Please let me know if there is any other way or how to remove the locks on GTT table.

    First you should question why you think you need 75 GTT.
    Also your question contains no useful information
    (no four digit version of Oracle, no OS, no number of processors) , this paragrah
    Currently it is a single process which picks up most of the data after joining 2-3 big tables(around 70-80GB) and then loading the main table.
    The joins are on PI and also partitions are also being used. Then a lot of updates are done on the main table to update other columns which are being picked from different tables.
    As the processing is happening on huge amount of data(around 1M), so processing is taking a lot of time.
    This process is taking around 40-45 minutes.tells nothing,
    so basically your questions boils down to
    - Hey I come from a sqlserver background (this is just an educated guess), how can I find a workaround to wreck Oracle to make it work like sqlserver.
    75 parallel sessions on say 4 to 8 processors is a very bad idea, as these sessions will be simple competing for resources.
    Also a row exclusive lock is just that: a row level lock. This isn't a problem, usually.
    Sybrand Bakker
    Senior Oracle DBA

  • Failed to acquire exclusive lock on client session - Webdynpro

    Anyone experience this below intermittent error on Webdynpro - e.g. Display Leave Summary functions ?  If user retry/revisit the same screen again. it will be working fine.
    Having some hard to to get thread dump at those short and intermittent moment.
    Any suggestions are welcome.
    Found this note below but doubt it will help at this moment.
    Web Dynpro error page, known error situations, error codes
    SAP Note Number: 1113811 
    NW/EP 7.0 SPS13
    #2#sap.com/pb/PageBuilder#com.sap.tc.webdynpro.services.session.LockException: Thread SAPEngine_Application_Thread[impl:3]_21 failed to acquire exclusive lock on client session ClientSession(id=(J2EE11441500)ID1662520351DB00529024001059157699End_1898143411). Existing locks: LockingManager(ThreadName:SAPEngine_Application_Thread[impl:3]_21, exclusive client session lock: ClientSessionLock(SAPEngine_Application_Thread[impl:3]_16), shared client session locks: ClientSessionSharedLockManager([]), app session locks: ApplicationSessionLockManager([]), current request: sap.com/pb/PageBuilder).Hint: Take a thread dump of the server node to find the blocking thread that causes the problem.
         at com.sap.tc.webdynpro.clientserver.session.ClientSession$LockingManager.lock(ClientSession.java:1511)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:233)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:150)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

    Hi,
    Check this,
    ESS SC Import Problem
    Thanks and Regards,
    gopal.sattiraju

  • Failed to acquire exclusive lock on client session ClientSession

    HI all.
    when I login the Portal as a MSS role,I want to see about the data of employee(about 20000 employee).
    some page can't open succeed.The error:
    500   Internal Server Error
      SAP NetWeaver Application Server 7.00/Java AS 7.00 
    Failed to process request. Please contact your system administrator.
    Error Summary
    While processing the current request, an exception occured which could not be handled by the application or the framework.
    If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator. To facilitate analysis of the problem, keep a copy of this error page. Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).
    Root Cause
    The initial exception that caused the request to fail, was:
       com.sap.tc.webdynpro.services.session.LockException: Thread SAPEngine_Application_Thread[impl:3]_27 failed to acquire exclusive lock on client session ClientSession(id=(DSAPBPRD_DPP_01)ID2006199550DB11722229503911854949End_53412655). Existing locks: LockingManager(ThreadName:SAPEngine_Application_Thread[impl:3]_27, exclusive client session lock: ClientSessionLock(SAPEngine_Application_Thread[impl:3]_29), shared client session locks: ClientSessionSharedLockManager([]), app session locks: ApplicationSessionLockManager([]), current request: sap.com/pb/PageBuilder).Hint: Take a thread dump of the server node to find the blocking thread that causes the problem.
        at java.lang.Throwable.<init>(Throwable.java:56)
        at com.sap.exception.BaseException.<init>(BaseException.java:145)
        at com.sap.tc.webdynpro.services.exceptions.WDException.<init>(WDException.java:61)
        at com.sap.tc.webdynpro.services.exceptions.WDException.<init>(WDException.java:54)
        at com.sap.tc.webdynpro.clientserver.session.ClientSession$LockingManager.lock(ClientSession.java:1511)
        ... 20 more
    Edited by: cui joe on Jun 16, 2009 5:36 AM

    HI,thanks very much.
    Because our data is very huge,so some leader login the system will get the error.I check the st22,It realy found the error:
    Time limit exceeded.
    The program "SAPLRHDB" has exceeded the maximum permitted runtime without
    interruption and has therefore been terminated.
    If I should increase the system profile parameter "rdisp/max_wprun_time"?
    Can else I should turn other parameter?

  • Error: the database could not be exclusively locked to perform the operation in sql server 2008 ?

    I am trying to rename the database but i am getting below exception while doing it-->
    Error: the database could not be exclusively locked to perform the operation.(Microsoft Sql Server,Error 5030)
    Thanks.

    as mentioned earlier by both these users just wait for all the connections to go and then try- it will succed
    or else if it is dev\Uat environment & you can kill the conenctions - make the changes (use this as last option)
    i was just wondering if you are connected to the same DB? If yes change your context to master(means connect to master DB ) and then issue this command.
    Sarabpreet Singh Anand
    Blog ,
    Personal website
    This posting is provided , "AS IS" with no warranties, and confers no rights.
    Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • Loadjava hangs - exclusive lock on sys.javasnm$

    We upgraded from Oracle 9.2.0.4 to 9.2.0.5 (using export then import of the entire database) and have found that our user java classes that compiled fine in 9.2.0.4 aren't as lucky in 9.2.0.5. When we use "loadjava" to recompile the jar files, some compiles are successful and others hang. When we investigate the "hanging" ones we find an exclusive lock on sys.javasnm$. The only session doing a loadjava compile is mine. We kill the Oracle session, the exclusive lock goes away, we compile a few more jars successfully, then the "hanging" begins again. Can anyone explain what is going on? Thanks in advance.

    Solution - We were missing the DROP SYNONYM permission for the Oracle User we were importing the java code for. Once that was in place the locks were no longer an issue.

  • Cmp exclusive locking

    hi, is it possible to implement exclusive locking in cmp 2.0 ?
    just like FOR ... UPDATE statement in oracle ?
    help please

    After having discussion with Mitesh, here is what we think
    There are 2 ways to handle this issue
    Approach 1:
    Using UserTransaction in the servlet
    ut = (UserTransaction) ic.lookup(
    "java:comp/UserTransaction");
    ut.begin();
    findAll();
    doProcessing();
    ut.commit or rollback();
    In this case all rows will be locked till we do commit or rollback
    Approach 2:
    Using BMT/CMT (Bean Managed Transaction/ContainerManagedTransaction) for session bean as a middle layer between servlet and CMP
    For CMT in session beans
    Now session bean will have a business method(having Required transaction attribute in CMT) doing
    busineessmethod() {
    findAll()
    doProcessing()
    BMT in session bean is similar to UserTransaction explained in servlet, only difference in getting usertransaction
    For BMT , we need to do
    context.getUserTransaction();
    Please refer to samples/transaction samples for details

  • Read exclusive lock  FileInputStream

    I would like to read a object from a file , how can it lock the file or read the file as exclusive lock?

    FileInputStream.getChannel().lock()when this method is called, does that ensure that no other application, java or otherwise can open/delete this file?

  • IllegalStateException thread tries to release exclusive lock LockingManager

    Hello,
    I'm having this error,
    java.lang.IllegalStateException: Illegal state: thread tries to release exclusive lock on ApplicationSession which it hasn't acquired! Details: LockingManager(ThreadID:89, threadName: HTTP Worker @1298613650, session lock: null, current request: company.com.pe/wd_hrsolmovpil_v1/Wdhrsolmovpilv1)
    Any of my web dynpros, even the uwl doesn't work.
    This happened after I tried to deploy project. Everything was working fine, but now ... I have this. I've restarted the server, but nothing happens.
    Please, anyone knows how to solve this? Any ideas?
    Regards
    SU

    Hello,
    The problem was because the WAS has the parameter DefaultExpirationTime seted in -1 of all the Web Dynpros (sap.com/tcwddispwda). It only accepts positive values. I had to login through Telnet and execute the parameter,
    add webdynpro
    MANAGE_WD_APP_PROPS sap.com/tcwddispwda
    Thanks & Regards
    SU

  • Updating  a  row  in  table  exclusive  lock on entire table

    Hi
    We have table master table and few child tables .
    when we try to update a row in master table , it is locking entire table
    i.e seems update process holding exclusive lock on entire table
    it is not allowing any furthur update to that table
    Could you please tell me what could be the problem for that
    Thanks,
    - AK

    Does the table has primary key - foreign key relationship? Try disabling the constraint and see if it works. If it works then it is about unindexed foreign key issue.

  • Monitor exclusive lock on a table and send notification email through EM

    Hi,
    I have Oracle10g and EM10G running on different servers.
    now one of my plsql code creates an exclusive lock on one of my tables.
    i want to monitor this exclusive lock on this table through the EM. and when the exclusive lock on the table is continuing for more than 1 hour, i want an email notification sent to me by the EM.
    How can i do this?
    Can someone help me achieve this above situation.
    Thanks.
    Philip.

    One of the nice about OEM is that a lot of the things are self explanatory. E.g. I never read docs to set up our first user defined metrics. It is really just to dive in there. Define a metric and the sql you want to use for monitoring the lock. Then you just go and create email notification for this when it hits warning or critical treshold.

  • Can not get exclusive lock on the shared drive of Azure file storage

    One of my application need exclusive access on the data folder where it writes the data.
    I have setup data folder in Z drive which is shared drive of Azure File system.
    The application is not able to get the exclusive access on the data folder and throws IO exception.
    Is that not possible with shared drive of azure file system

    Hi Subodh,
    You could refer the following link for details on how pessimistic concurrency (Exclusive lock) managed in Azure Storage:
    http://azure.microsoft.com/blog/2014/09/08/managing-concurrency-in-microsoft-azure-storage-2/
    Please be advised that an Exclusive lock on an Azure File Share is not possible using REST Protocol and need to be done using the SMB Protocol.
    You could refer the following link for details on how to manage SMB File locking:
    https://msdn.microsoft.com/en-us/library/azure/dn194265.aspx?f=255&MSPPError=-2147217396
    Hope this helps.
    Regards,
    Malar.

  • Dont want exclusive lock on Shared Object

    Hi,
    I have created a shared object, but by default it seems to be having exclusive lock. I want it to work so that it should be possible to add data or delete data from it by anyone anytime without any locking. Please let me know how I can do this. Is there some property I need to set?
    Thanks for reading

    Yes I have already created shared area and everything is working fine. I have the following statement
    myshmhandle = zsd_zvi2d_area=>attach_for_write( ).
    This statment locks the area handle and if another program or another user tries to again execute the statement above it gives and exception. CX_SHM_EXCLUSIVE_LOCK_ACTIVE. I want it to work in such a way that locking doesnt place at all. Because the way I m adding and removing data, its with a unique key so there is no chance of one instance or user overwriting other persons data

  • Why no exclusive lock for conventional path loading for SQL*Loader?

    why no exclusive lock for conventional path loading for SQL*Loader?
    it use insert statement so it should use exclusive lock right?
    thanks

    ok, so only update statement would put a lock but not for insert statement?
    because I have seen a situation where a user update rows in a sesssion (without commit) prevent another user update the rows.
    thanks

Maybe you are looking for

  • Field posting period is not a document property

    Hi Team We are attaching comment for every manual adjustment. While one of the user posted entry in the pervious preiod and upload comment also. Now in this month he did some changes in comment file.  After that he try to see the attachment for manua

  • Add text to downloaded CSV file

    Hi. I'm trying to place a text at the bottom of the csv file, but I can not find the way to do it. What I'm trying to do is, after all rows downloaded in my csv file, I'd like to place a general comment in the next row regarding some information abou

  • Default size of Cover Flow

    Is it possible to set the default size of the Cover Flow window? And keep the same size when you scale the entire window?

  • List of transactions executed in the last one year along with the count

    Hi all, I want to find the list of transactions executed in the last one year in my IDES system. Also, i want to find how many times these transactions got executed in the last one year. I already saw, ST03 and ST03N tcodes. But im not able to see th

  • Problems exporting query results to Excel

    Hi! I hope you can help me We have a web template that uses the class ZVIG_ART that we created in the transaction SE24, this class display some label in the query results, the problem is when we export this report to excel the label disappear. The nu