Table getting locked

Hi
I am extracting data from a third party system which uses SQL server as a backend database...so when ever i run the info pack to extract data..the table  from where i am pulling the data is getting locked..
can any one tell me as to how to over come this problem..is there any additional settings to  be done when i extract the data?
Regards
Shilpa

Hi
yes, It is possible to set delta by flatfile.
But you can ask the third party SQL team to get the data on daily basis in File and BI can extract data from Application Folder...
As per I know the Info Package enhancement will not work in this scenario to avoid the lock...
Also check with the Third party team why it is locking Write lock on this table when we are just executing this for extraction that is only Read Mode... Ask them to check the Table setting in SQL side...
Regards,
Mahesh

Similar Messages

  • Unable to update when executed, table gets lock Execution does not stop Execution even for an hour

    Following is my Query unable to update when Executed table gets lock Execution does not stop even for an hour.
    update Employees 
          set Status = 'Close'
          where statusid IN (select statusid 
                                             from MyView 
                                              where DownloadedDate ='2014-07-27 00:00:00.000'
    here Employee contains 3,00,000 of records and Subquery return 1,50,000 Empid 
    i tried in various ways but not able to solve, statusid  column have no index on,  i tried using cursor but it does not work.
    plz let me know how to solve this Issue, THANKS IN ADVANCE.

    Hello,
    You should better post your question to a more related Forum, like Transact-SQL or SQL Server Database Engine; this Forum is for samples & community Projects.
    Have you checked the execution plan if indexes are used?
    You could update the data in chunks, e.g. 10.000 rows per execution. For this you have to add a TOP clause and a filter to update only those, who are not updated yet.
    update TOP (10000) Employees
    set Status = 'Close'
    where statusid IN
    (select statusid
    from MyView
    where DownloadedDate ='2014-07-27 00:00:00.000')
    AND Status <> 'Close'
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Unable to update, when executed table gets lock and Execution does not stop even for an hour.

    Following is my Query, which unables to update. When Executed, table gets lock and Execution does not stop even for an hour.
    update Employees 
          set Status = 'Close'
          where statusid IN (select statusid 
                                             from MyView 
                                              where DownloadedDate ='2014-07-27 00:00:00.000'
    here Employee contains 3,00,000 of records and Subquery return 1,50,000 Empid 
    i tried in various ways but not able to solve, statusid  column have no index on,  i tried using cursor but it does not work.
    plz let me know how to solve this Issue, Its very Important to get solve as all my further work depends on Updation
    , THANKS IN ADVANCE.

    See also your other thread with the same question:
    http://social.msdn.microsoft.com/Forums/en-US/80243625-fc3b-4ee1-bce1-4adcdbc16c14/unable-to-update-when-executed-table-gets-lock-execution-does-not-stop-execution-even-for-an-hour?forum=sqlserversamples
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Buffer table and Locking issues

    We have a real table and a buffer table. The real table gets locked on occation for processing, at which times, incoming data is deposited into the buffer table.
    I am looking for a way to dump all the information from the buffer table into the real table whenever the real table is released from its lock. I would prefer not to write and schedule a program to run based on time (i.e. every 2 seconds, a procedure is called that looks to see if the table still has a lock on it...)
    Does anyone have any ideas how I can do this? I have thought about using the DBMS_ALERTS package or DBMS_AQ somehow, but I am not as familiar with the two as I'd like. I'd be happy to explain this further if required.
    Thank you.

    Thank you for the suggestion, but this does not look like a viable option. For this to work, the trigger would have to fire everytime a DDL event was fired, and I would have to build if...then logic into the trigger. Besides, in the documentation, I don't think table locks would be considered DDL.
    Any other ideas? Again, thanks for the help. I did not previously know I could create triggers on these type of events.
    RW
    null

  • Table gets maintained via Zprogram although it is locked

    Hi Experts,
    I have one doubt ,i am maintaining one table suppose z22_ekko via SM30. As soon as i go to sm30 ,an entry gets created in Central Lock table by SAP
    As you can see this entry (Transaction SM12)
    Table is locked in 'Write Mode (E)' means no other user can maintain same table same time. In other session when i am trying to maintain via 'SM30' it is ok showing error 'Table is locked'. But when i try to maintain z22_ekko via a Z program with modify or Insert statement ,table gets modified although it is locked . How is it possible? If table is locked it should not allow user to modify via Zprogram also.
    please clarify this doubt.
    Regards,
    A.Trivedi

    Hi Ashish,
         If we try to visualise the SAP as a product deeply, we will realise that SAP is nothing but the same existing java .net c c++ technology where in it stores data using the similar RDMS concepts. Then what makes it different, Standardization of not only business process but also the way a developer diggs into the code. If using some standard function module we try to update a table it wont update it will say object is locked.
         Standard Procedure
              1.   Check object(table) is locked or not
              2a. If locked then show message
              2b. if not locked then lock the object
              3.   update/insert into table
              4.   unlock the table.
         Non Standard way(directly to step 3)
              update/insert into table
         So physically the tables are not locked using SM30. These are conceputally locked by lock objects using ENQUEUE and DEQUEUE. Hence we check these locks we will find the table as locked and we will not read it. Logically its always open.
    For details try out this link
    http://help.sap.com/erp2005_ehp_06/helpdata/EN/91/01274dc2e048d4b473fe5c45ae4e29/frameset.htm
    I hope this might help you
    HAPPY ABAPing
    -VIshal

  • To get Lock object for Standard Table

    Hi all,
    i want to update table FKK_GPSHAD,so i need corresponding lock object for this table.can any one sughgest me the solution for this.
    Thanks in advance,...

    Hi,
    Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
    SAP Provide three type of Lock objects.
    Read Lock(Shared Locked)
    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
    Write Lock(exclusive lock)
    protects write access to an object. The write lock allows other transactions neither read nor write access to
    the locked area of the table.
    Enhanced write lock (exclusive lock without cumulating)
    works like a write lock except that the enhanced write lock also protects from further accesses from the
    same transaction.
    You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
    Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
    Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
    Technicaly:
    When you create a lock object System automatically creat two function module.
    1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
    2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
    You have to use these function module in your program.
    check this link for example.
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    tables:vbak.
    call function 'ENQUEUE_EZLOCK3'
    exporting
    mode_vbak = 'E'
    mandt = sy-mandt
    vbeln = vbak-vbeln
    X_VBELN = ' '
    _SCOPE = '2'
    _WAIT = ' '
    _COLLECT = ' '
    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.
    Normally ABAPers will create the Lock objects, because we know when to lock and how to lock and where to lock the Object then after completing our updations we unlock the Objects in the Tables
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    purpose: If multiple user try to access a database object, inconsistency may occer. To avoid that inconsistency and to let multiple user give the accessibility of the database objects the locking mechanism is used.
    Steps: first we create a loc object in se11 . Suppose for a table mara. It will create two functional module.:
    1. enque_lockobject
    1. deque_lockobject
    before updating any table first we lock the table by calling enque_lockobject fm and then after updating we release the lock by deque_lockobject.
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    GO TO SE11
    Select the radio button "Lock object"..
    Give the name starts with EZ or EY..
    Example: EYTEST
    Press Create button..
    Give the short description..
    Example: Lock object for table ZTABLE..
    In the tables tab..Give the table name..
    Example: ZTABLE
    Save and generate..
    Your lock object is now created..You can see the LOCK MODULES..
    In the menu ..GOTO -> LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function
    Lock objects:
    http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    Match Code Objects:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
    http://searchsap.techtarget.com/tip/0,289483,sid21_gci553386,00.html
    See this link:
    http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
    Check these links -
    lock objects
    Lock Objects
    Lock Objects
    Please reward points if useful.
    Regards
    Rose

  • Table is locked by app server

    I am using MS SQL Server 2000 with MS SQL Server JDBC Driver and JBoss 3.2.3.
    I have a stored procedure. This stored procedure does one insert in Table1 and multiple inserts in Table2. The stored procedure starts with a begin transaction; if any of the inserts fails (I check @@error) then i rollback transaction; if everything works ok then i do a commit transaction.
    I have a Stateless Session Bean one of its method is calling this stored procedure.
    If the stored procedure runs successfully then every thing is ok. But if one of the inserts in stored procedure fails, i see 2 bad things happening:
    * no SQLException is thrown
    * the Table1 gets locked and only unlocks when i close application server.
    Any explanation?
    Thanks

    ok to perform simple tests, I:
    * create 2 identical tables "ttt" and "ttt1" for testing purpose with each's one column not accepting nulls:
    CREATE TABLE [dbo].[ttt] (
         [id] [int] IDENTITY (1, 1) NOT NULL PRIMARY KEY,
         [col1] [varchar(50)] NULL ,
         [col2] [varchar(50)] NULL ,
         [col3] [varchar(50)] NOT NULL )
    CREATE TABLE [dbo].[ttt1] (
         [id] [int] IDENTITY (1, 1) NOT NULL PRIMARY KEY,
         [col1] [varchar(50)] NULL ,
         [col2] [varchar(50)] NULL ,
         [col3] [varchar(50)] NOT NULL ) * Simplify the stored proc to insert one row in ttt and one row in ttt1. The ttt row will be successfully inserted while ttt1 row insertion will fail as i try to insert null in a non-null column:
    CREATE  PROCEDURE ta_ProcessPayroll
    AS
    BEGIN
    declare @v_CommitTransaction     int
    declare @v_ErrorCode          int
    declare @v_ErrorMessage     varchar(300)
    SET NOCOUNT OFF
    SET @v_CommitTransaction = 0
    SET @v_ErrorCode = 0
    -- Manage separate transaction if not invoked from within another transaction.
    if ( @@trancount = 0 )
    begin
         begin transaction ta_ProcessPayroll
         set @v_CommitTransaction = 1
    end
    insert into ttt (col1, col2, col3) values ('A', 'B', 'C')
    set @v_ErrorCode = @@error
    if ( @v_ErrorCode <> 0 )
    begin
         set @v_ErrorMessage = cast( @@PROCID as varchar(300) )+ ': failed with error code ' + cast( @v_ErrorCode as varchar(20) )
         goto error_handler
    end
    insert into ttt1 (col1, col2, col3) values ('A1', 'B1', null)
    set @v_ErrorCode = @@error
    if ( @v_ErrorCode <> 0 )
    begin
         set @v_ErrorMessage = cast( @@PROCID as varchar(300) )+ ': failed with error code ' + cast( @v_ErrorCode as varchar(20) )
         goto error_handler
    end
    if ( @v_CommitTransaction = 1 )
    begin
         commit transaction ta_ProcessPayroll
    end
    error_handler:
    if ( @v_ErrorCode <> 0 )
    begin
         if ( @v_CommitTransaction = 1 )
         begin
              rollback transaction ta_ProcessPayroll
         end
         RAISERROR( @v_ErrorMessage, 16, 1 )
    end
    END
    GO* use this java code in a SSB's method to execute the stored proc :
    Connection conn = null;
    CallableStatement stmt = null;
    try {
      conn = ConnectionHelper.getConnection(); // get connection (use JNDI)
      stmt = conn.prepareCall("{call ta_ProcessPayroll()}");
      stmt.execute();
    } catch (SQLException sqle) {
      sqle.printStackTrace();
    } finally {
    }Now I execute the stored proc through my java code and get the SQLException but the table ttt gets locked while table ttt1 does not get locked.
    I checked it through query analyzer tool of sql server by typing " select * from ttt " and it hangs instead of giving me result set until i cancel it. No such thing happens when i type " select * from ttt1 " in query analyzer. When I type "select * from ttt with (nolock)" I can see the row being inserted by my stored proc.
    Now here is what I observe:
    * If i shut down my JBoss right away the lock on ttt gets released. When I query it there is no data in it which is good as the transaction gets rollback.
    * If I dont shut down my JBoss and instead go to another jsp in the same web application which retrieves data from another table, then the llock on ttt gets released. But when I query it I can see 1 row in there which was put by my stored proc. So the transaction do not gets rollback.
    I have a feeling I am missing some thing on my java code side. Please explain.
    Thanks

  • Is there way to get lock holder by row id?

    My problem is that sometimes some rows get locked for long time and I don't know who holds lock.
    Ideally I want query which takes table_name and primary key value and outputs lock holder information. (e.g sql text, how long query is being running, etc)
    I've found in documentation that there is no central place where row locks are stored and that this is row level metadata.
    My question is: Can I get this row level metadata somehow for concrete row? (I believe this should be possible)
    My usecase would be as follows:
    1. try to get lock for row for id=#N (select for update semantics, actually hibernate is used for that but it shouldn't make difference here)
    2. get error (now i'm getting ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired)
    3. This step is what I want to add. Get information about lock holder for row with id=#N and write it into log file.
    Here is query I was playing with which outputs general information about transactions having locks but it's not what I need in terms of row level locking:
    select a.sql_text, l.ctime, s.STATUS, s.SQL_EXEC_START, s.PROGRAM from
    v$lock l join v$session s on (l.sid = s.sid)
    join v$sqlarea a on (a.hash_value = s.sql_hash_value)
    where l.type='TX' and l.lmode>0;

    Welcome to the forum!
    Whenever you post provide your 4 digit Oracle version.
    >
    My problem is that sometimes some rows get locked for long time and I don't know who holds lock.
    >
    See this Oracle Magazine article.
    http://www.oracle.com/technetwork/issue-archive/2012/12-jul/o42dba-1566567.html
    >
    You can find the specific row that is locked by first finding the table containing that row. To find that table, use the same V$SESSION view; in this case, the information is in the ROW_WAIT_OBJ# column, which shows the object number of the table whose row is being locked. You can then get the name of the table from the DBA_OBJECTS view, using this object number, as shown in Listing 3.
    >
    For 'who holds the lock' see this thread
    How to check Locking sessions in oracle 10g
    There are many other similar results on the net.

  • Contract getting locked forever after save

    Hi Gurus ,
    This problem is happening only in our production system with some contracts only when we save a contract through VA42.
    contract is getting locked forever. when we see lock entries from SM12, it shows us entries for that contracts in blue. VBLOG table also have some entries for this lock entry. How could i identify that where the problem has occured. from blue entries we can say that it has been locked by some call to function module in update task. is there any way to find out which function module is causing the problem.
    thanks
    Rajpal Sehrawat

    Hi Max,
    thanks for the reply.
    the lock entries in SM12 are in blue which means main program has submitted some function modules in update task and those tasks have not finished. that is why i am able to see entries in VBLOG. why these entries are not getting deleted. and VBLOG table is not showing any error also.
    user comes out of the contract imidiately after save. even he kills his session also.

  • User gets locked in lesser attempts than security policy setting

    Hi
    I have written my customized login code to login a user to the
    portal and I user the following code:
    IUser myUser = UMFactory.getUserFactory().getUserByLogonAlias(username, null);
    IUserAccountFactory accountFactory = UMFactory.getUserAccountFactory();
    IUserAccount account = accountFactory.getUserAccountByLogonId(myUser.getUniqueName());
    ILogonAuthentication ILA = UMFactory.getLogonAuthenticator();
    req.setAttribute(JUSER,myUser.getUniqueName());
    req.setAttribute(JPASSWORD,password);
    ILA.logon(req,res,AUTHSCHDEFAULT);     
    I notice that whenever I try to logon using my code with a
    wrong password, the user gets locked in 3 attemps even though the security policy
    (at ABAP and in Portal UME Configuration) setting for number of failed attempts is set to 5.
    (Although, please note that my code works fine logging the
    user into the portal when he enters the correct password)
    I try to check if the same thing happens with the standard logon module - com.sap.portals.runtime.logon,
    and notice that it locks correctly after 5 attempts.
    Would I have to add anything else in my code to make it work
    correctly?
    Thanks
    oj

    Hi All
    I tried to check in the CUA table the incorrect logon attempts value, and noticed that for every time I login (using my above code) with the wrong password, it increments the count by 2!! And that's the reason it gets locked out by the third time.
    What am I doing wrong?
    Thanks
    OJ

  • Material is getting lock with BAPI_GOODSMVT_CREATE

    Hi,
      I have made a RFC by using BAPI_GOODSMVT_CREATE,  but some some times in case the document is not posted due to some error  the material is getting lock  entry in SM12,  and system is not allowing to perform any other work for that material  the code part is below
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
       EXPORTING
         goodsmvt_header               = goodsmvt_header
         goodsmvt_code                 = goodsmvt_code
       TESTRUN                       =  TESTRUN
       GOODSMVT_REF_EWM              =
      IMPORTING
        goodsmvt_headret              = goodsmvt_headret
        materialdocument              = materialdocument
        matdocumentyear               = matdocumentyear
       TABLES
         goodsmvt_item                 = goodsmvt_item
        goodsmvt_serialnumber          = goodsmvt_serialnumber
         return                        = return
       GOODSMVT_SERV_PART_DATA       =
       EXTENSIONIN                   =
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
    what can be done for this  also try by adding the
      IF NOT materialdocument IS INITIAL.,                      " befoe commit FM
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
    endif.
    regards,
    zafar

    Hi,
      Thanks for your reply, as per your suggestion i modify the code
    as below
    if not materialdocument is initial.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
      else.
      CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
       IMPORTING
         RETURN        = RETURN1.
      endif.
    after this the problem solve , just want to confirm whether this concept is ok. as we are executing this from non sap system.
    regards,
    zafar

  • Material codes getting locked

    Hi
    We have a major problem with materials getting locked when the same material used in Sales Order and OBD or packing and OBD. If the same material is getting packed, we can not do OBD.
    As suggested by SAP we have selected delayed blocking in OMJI.
    Is there any work around for this issue?
    Regards
    Shaji

    Hi
    There is no other work around for this aprt from OMJI. Please contact SAP only for any help if required, they may be helpful in providing late locks to the Material master tables.
    Thanks & Regards
    Kishore

  • AD account getting locked out after password change in Jabber

    When user changes his network credentials and does not update them in Jabber. Jabber will still try to connect to phone services and voicemail with the old credentials which is leading to their account getting locked in AD after three attempts.
    We are using Jabber 9.6.1, so a fairly new version.
    Can some suggest if there is a workaround?

    Hi,
    We are seeing a similar issue after the user has changed their AD password the account repeatedly gets locked out when they try to log into Jabber. 
    We are also using Cisco IM&P and our CUCM is LDAP synced
    I am interested to know why you are asking if LDAP authentication is configured?
    Regards,
    Andries

  • Unity Connection - Users with system default password getting locked out

    Hi all, hope everyone is well !!
    I am experiencing a strange problem and hope someone can give me some direction on where to start digging on this issue.
    I am getting a good number of users reporting they are getting locked out of their voice mail and they all claim that they have not changed their password and some user even got their greeting recorded by someone else. One thing in common for the users who reported the issue is that they all using the system default password. I am trying to trace to find out who/what has access to these users' mailbox but so far I have not had any luck.
    Thanks in advance !!
    Danny

    Thanks, yes am doing that now and cant really find any new/unique pattern. Plus the trace is pretty hard to follow. Cant really figure out any times stamps in the trace also. The current trace file is defaultTrace.18.trc and it has very simiiar content as some of the older ones before the problem. Right now the ESS portal is working and the slddsuser password is not locked. It seems the problem takes place on start up?
    /usr/sap/ESS/JC77/j2ee/cluster/server0/log
    Tough thing to test in production.
    I wonder what takes place at startup that would kick this problem off?
    brad

  • My mac will not copy more than one file at a time and gets locked up if the file is too large, my mac will not copy more than one file at a time and gets locked up if the file is too large

    my mac will not copy more than one file at a time and gets locked up if the file is too large, my mac will not copy more than one file at a time and gets locked up if the file is too large

    So now that you have repeated the same thing three times that doesn't make things any clearer at all.
    You are copying files from where to where?
    How are you attempting to copy files, software or click and drag?
    Any other detail would be helpful.
    Allan

Maybe you are looking for

  • How can I import my home movies (.dv) into iTunes?

    I'm getting frustrated with the lack of information about converting movies with all the recent upgrades. I have many short home movies in a variety of formats (.dv, .mov. Mp4, etc) - how in the world can I get them into iTunes (and ultimately on my

  • Second hand iMac - Reinstall Lion

    I have a friend who purchased a 2010 iMac that was originally shipped with Snow Leopard but was later upgraded to Lion by the original owner. He would like to wipe this system clean and reinstall Lion, but I believe he will have to download his own c

  • Oracle.xdb.XMLType extract function

    I have an external java program that connect to the database using a thick connection so I can use the methods extract and existsNode available with the XMLType from oracle.xdb.XMLType. DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver

  • Is the new iMac USB 2.0 Bootable ???

    Two questions really: Is it possible to boot the new iMac from an external USB 2.0 device ??? If it is possible, how do I use the install disks that came with my new iMac to install a copy of Mac OS 10.4.10 onto an external USB 2.0 hard drive connect

  • Costing - Overriding Salary Payable Account captured in Balancing Segment

    As a standard Functionality Costing Information(Salary Payable Account) recorded in the Balancing Segment of the element Link Screen cannot be over ridden at any Other Level. Our Accounting set up involves payment from more than one salary payable ac