Reg database logical locks

hii all,
     I want to keep locks(logically) to the existing database records as my ztables(3 tables with 1 parent table,containing header data and 2 line item tables having the foreign key relationships with header table) are accessed at time by many users(different users might try to change the same record).what is the best way to go ahead.
with regards,
sandeep akella.

Hi,
check the following link
http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4c5a79e11d1950f0000e82de14a/content.htm
Regards,
Madhu

Similar Messages

  • Lock(Enque/Deque) is a logical lock & database lock

    Hi All,
    I have gone through various portals and SDN too, and found that locks are the logical locks and sometimes database locks too but still have some confusion.
    1) If these are the logical locks then why they are created by SE11 and once created then FM has been generated. All FM are stored somewhere right? So they would be in database.
    2) If these are the database locks then why they are at the application server level and few more things.
    Can anybody explain with the valid reasons? In which queue they fall and why?
    Thanks.
    An

    Hi Anurag,
    The SAP locks are created with naming standard EZ. They are not connected with the DB. It work like this
    You create Lock -> FM is automaically generated as follow EXample:   CALL FUNCTION 'DEQUEUE_EZARS_TRHDR_T'
        EXPORTING
    generated In your program you add CALL FUNCTION <name of your new lock enqueue FM>
    3. if object is not locked you can modify it.
    4. unlock it with second (dequeue) FM
    Information about these locks are stored in queue on specific application server (usually central instance) - in SM51 you can see it with description "Enqueue".
    So this is kind of mechanism that works if everybody goes according to rules. If someone will write it's own report were he access your objects, but he will ommitt this FM call (or ignore it's results), then he will be free to change it as he likes even if someone has already locked it.
    To use DB lockes other technices are used like SELECT SINGLE * FOR UPDATE

  • Database is Locking While Priview the PLD converted Crystal report

    Hi All
    I converted a Purchase Order PLD into Crystal Report to design a PO according to user requirement in a TEST company
    and save this report physically and again I use this Converted Crystal Report as a  Layout in the TEST1 company on the Purchase Order.While priview the Purchase Order document it is working fine
    when this same layout is used in TEST2 and preview the document it asking the login details and same thing is happening in the other database TEST1 (in which Report is working fine)  also and i came to know that the all the databases are locked
    unlock the database and remove that layout from TEST2 database and again add same layout in the same database and  now i just open this layout through REPORT LAYOUT MANAGER and click edit button the report is opened in edit mode then also total sql server with user sa is locked and i didnt saw the company list at the start of the sap business one
    Can any one give the solution for this issue
    Thank you

    You may keep all original fields and move or hide fields to meet your customer's need. System field should not be removed.
    Thanks,
    Gordon

  • Database logical structure

    Anyone know online documentation that explains database logical structure ?
    The relationships between database, tablespace, datafile, segment, extent, and blocks ... storage structure.
    In an easy to understand document :)
    I am learning Oracle 9i, any helps are really appreciated.
    Thanks in advance.

    I'd start with [url http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96524/toc.htm]     Oracle9i Database Concepts

  • Creating logical locks generates two fm

    Hi Expert!,
      AS far I know, When we create logical locks in se11 transaction, two Function modules get generated by the the system.
    My Question is , is there any other Function module which gets generated by system?
    3rd FM?

    Hii  Mithilesh,
    When u create  a lock object In SE11 only 2 FMs  are generated by the system  that is "ENQUE" and "DEQUE" .as par  i know no third FM is generated automatically.
    regards,
    Archana

  • Address Book database is locked?

    Hello,
    I'm having a constant problem when trying to sync (using MySync): the sync services engine says that mingling failed and looking at the log I see:
    <pre>
    2006-06-21 09:09:59.357 SyncServer[216] NSGenericException: error 5 executing 'pragma synchronous=normal': database is locked
    2006-06-21 09:09:59.358 SyncServer[216] ISyncManager caught exception NSGenericException trying to open truth record store at /Users/schmitta/Library/Application Support/SyncServices/Local. Reason: error 5 executing 'pragma synchronous=normal': database is locked
    2006-06-21 09:10:00.877 AddressBookSync[227] AddressBookSync (client id: com.apple.AddressBook) error: Exception running AddressBookSync: Session <ISyncConcreteSession: 0x35ea30> cancelled. SyncServer failed to merge the changes from some clients: NSGenericException error 5 executing 'pragma synchronous=normal': database is locked
    </pre>
    So it seems that my address book database is locked. I tried rebooting both machines, but it did not do anything.
    Anybody knows how to unlock an address book database?
    Thanks a lot.
    PowerMac G5 2x2GHz   Mac OS X (10.4.1)  

    Thank you for the suggestion, I'll try it. (The new user account thing might be difficult as I'll have to tell MySync to synchronize accounts with different names.)
    The strange thing is that this started happening with two machines at the same time.

  • Logical locking not working

    Our system consists of ABAP and java stack. There are two server processes running on the system.  We have a web application that is deployed.  We want to lock an object in the init method of the servlet. We are using  logicallocking to do that.
    We want it so that when the application is deploying and running the init method on one server it obtains the lock. The other server process should wait till it obtains the lock.
    This is the code I have
    try {
                        lockOmscb(); 
                        _omscb.start();
                    } catch (LockException e1) {
                        _logger.logInfoExt("Omscb instance already running, cannot access lock on object.");
                        // TODO Auto-generated catch block
                        e1.printStackTrace();
    private void lockOmscb() throws NamingException, LockException, TechnicalLockException, IllegalArgumentException {
            Context initialContext = new InitialContext();
            LogicalLockingFactory factory = (LogicalLockingFactory) initialContext.lookup(LogicalLockingFactory.JNDI_NAME);
            _logger.logInfoExt("Got intial context lookup");
            _lock = factory.createLogicalLocking("NWCPM", "NWCPM workspace" );
            _logger.logInfoExt("created logical locking");
            lock.lock(LogicalLocking.LIFETIMEUSERSESSION, "NWCPM/OMSCB", cfg.toString(), LogicalLocking. MODEEXCLUSIVE_NONCUMULATIVE);
            _logger.logInfoExt("Got lock");
    In the locking adapter I can see two locks being obtained at the same time. They are not getting it one after the other.
    If I try to obtain the lock twice in the same method then it is throwing the lockException.
    But this is not happening when the web application is being  initialized in the two server processes.
    Logicallocking is supposed to be access the lock between applications.
    Is there a way I can acheive this ? If so how?
    Can you please let me know.
    thanks
    Padmaja

    Hi Padmaja,
    the argument you are trying to lock is _cfg. As you do not deliver the code that defines this I cannot say what it contains, but it is easily predictable that this value is different in two different servers.
    Make it a hard coded string with a value like "Humble" and then you are sure all instances will try to save exactly same value, which will make it work as expected.
    Regards,
    Benny

  • WCMException logical locking error

    I am recieveing the error
    Failed to perform job: com.sapportals.wcm.WcmException: Error when acquiring logical locking
         at com.sapportals.wcm.service.taskqueue.TaskQueue$Lock.getLocking(TaskQueue.java:421)
         at com.sapportals.wcm.service.taskqueue.TaskQueue$Lock.lock(TaskQueue.java:316)
         at com.sapportals.wcm.service.taskqueue.TaskQueue$Lock.writeLock(TaskQueue.java:293)
         at com.sapportals.wcm.service.taskqueue.TaskQueue.writeLock(TaskQueue.java:467)
         at com.sapportals.wcm.service.taskqueue.TaskQueue.get(TaskQueue.java:122)
         at com.sapportals.wcm.service.taskqueue.TaskQueueReader.get(TaskQueueReader.java:68)
         at com.sapportals.wcm.service.taskqueue.TaskQueueReader.get(TaskQueueReader.java:58)
         at com.sapportals.wcm.service.jobprocessor.LocalDispatcher.stopJobs(LocalDispatcher.java:161)
         at com.sapportals.wcm.service.jobprocessor.LocalDispatcher.run(LocalDispatcher.java:101)
         at java.lang.Thread.run(Thread.java:761)
    Error when acquiring logical locking java.lang.ClassCastException: com.sap.engine.services.jndi.persistent.UnsatisfiedReferenceImpl incompatible with com.sap.engine.services.applocking.LogicalLockingFactory
         at com.sapportals.wcm.service.taskqueue.TaskQueue$Lock.getLocking(TaskQueue.java:412)
         at com.sapportals.wcm.service.taskqueue.TaskQueue$Lock.lock(TaskQueue.java:316)
         at com.sapportals.wcm.service.taskqueue.TaskQueue$Lock.writeLock(TaskQueue.java:293)
         at com.sapportals.wcm.service.taskqueue.TaskQueue.writeLock(TaskQueue.java:467)
         at com.sapportals.wcm.service.taskqueue.TaskQueue.get(TaskQueue.java:122)
         at com.sapportals.wcm.service.taskqueue.TaskQueueReader.get(TaskQueueReader.java:68)
         at com.sapportals.wcm.service.taskqueue.TaskQueueReader.get(TaskQueueReader.java:58)
         at com.sapportals.wcm.service.jobprocessor.LocalDispatcher.stopJobs(LocalDispatcher.java:161)
         at com.sapportals.wcm.service.jobprocessor.LocalDispatcher.run(LocalDispatcher.java:101)
         at java.lang.Thread.run(Thread.java:761)
    error when acquiring logical locking (com.sap.engine.services.jndi.persistent.UnsatisfiedReferenceImpl incompatible with com.sap.engine.services.applocking.LogicalLockingFactory)
    This is occuring on the Dialog node. I know it has something to do with KM but it is occuring so rapidly that the logs fillup 2 gig in minutes and I am unable to even login to the node. This is an SP12 system. Any ideas would be greatly appreciated.
    Thanks
    Paul

    We are experiencing the same problem with SP17. Nothing in the SAP Notes about LogicalLockingFactory.
    Anyone, any idea?
    Thank you in advance,
    Todor

  • Sql for database logical segment details...

    db: 11g
    OS: unix
    friends.. I am trying to get database logical segment details along with datafile id and tablespace name...
    just want to confirm I'm progressing in right direction...
    trying to get following
    1. owner,
    2. segment_name,
    3. partition_name,
    4. file_id (datafile id)
    5. segment_type
    6. extent_ct (number of extents occupies in datafile)
    7. size_k (space in kb occupy in datafile)
    I have come up with below sql... is it correct or more changes required?
    I have got feeling I'm missing something for 6 & 7
    SELECT
    dbs.owner, dbs.segment_name, dbs.partition_name, df.file_id, dbs.segment_type, dbs.extents, (dbs.bytes)/1024 size_k
    FROM
    dba_data_files df,
    dba_tablespaces tbs,
    dba_segments dbs
    WHERE
    df.tablespace_name = tbs.tablespace_name
    and tbs.tablespace_name = dbs.tablespace_name
    and tbs.contents = 'PERMANENT'
    order by 1,2
    /thanks,

    posted in correct segment...

  • Database logical segment details..

    db: 11g
    OS: unix
    friends & gurus,
    I am trying to get database logical segment details along with datafile id and tablespace name...
    just want to confirm I'm progressing in right direction...
    trying to get following
    1. owner,
    2. segment_name,
    3. partition_name,
    4. file_id (datafile id)
    5. segment_type
    6. extent_ct (number of extents occupies in the datafile)
    7. size_k (space in kb occupy that this obect is occupying in the datafile)
    I have come up with below sql... is it correct or more changes required?
    I have got feeling that I'm missing something for 6 & 7
    SELECT
    dbs.owner, dbs.segment_name, dbs.partition_name, df.file_id, dbs.segment_type, dbs.extents, (dbs.bytes)/1024 size_k
    FROM
    dba_data_files df,
    dba_tablespaces tbs,
    dba_segments dbs
    WHERE
    df.tablespace_name = tbs.tablespace_name
    and tbs.tablespace_name = dbs.tablespace_name
    and tbs.contents = 'PERMANENT'
    order by 1,2
    / thank you...

    This is not exactly what you want but is maybe close enough: to get extent numbers and extents size per owner, segment_name, segment_type and datafile:
    set echo on
    set linesize 132
    spool tes.log
    column owner format a10
    column segment_name format a40
    select owner, segment_name, segment_type, file_id, count(*) as ext_nb, sum(bytes/1024/1024) as ext_mb
    from dba_extents
    group by owner, segment_name, segment_type, file_id
    order by 1,2,3,4;
    OUTLN      OL$                                      TABLE                       1          1      .0625
    OUTLN      OL$HINTS                                 TABLE                       1          1      .0625
    OUTLN      OL$HNT_NUM                               INDEX                       1          1      .0625
    OUTLN      OL$NAME                                  INDEX                       1          1      .0625
    OUTLN      OL$NODES                                 TABLE                       1          1      .0625
    OUTLN      OL$NODE_OL_NAME                          INDEX                       1          1      .0625
    OUTLN      OL$SIGNATURE                             INDEX                       1          1      .0625
    OWNER      SEGMENT_NAME                             SEGMENT_TYPE          FILE_ID     EXT_NB     EXT_MB
    OUTLN      SYS_IL0000000453C00021$$                 LOBINDEX                    1          1      .0625
    OUTLN      SYS_LOB0000000453C00021$$                LOBSEGMENT                  1          1      .0625
    SCOTT      BONUS                                    TABLE                       4          2       .125
    SCOTT      DEPT                                     TABLE                       4          1      .0625
    SCOTT      EMP                                      TABLE                       4          1      .0625
    SCOTT      EMP_RANGE                                TABLE PARTITION             4          5      .3125
    SCOTT      PK_DEPT                                  INDEX                       4          1      .0625
    SCOTT      PK_EMP                                   INDEX                       4          1      .0625
    SCOTT      SALGRADE                                 TABLE                       4          1      .0625
    SYS        ACCESS$                                  TABLE                       1         18          3
    SYS        ALERT_QT                                 TABLE                       3          3      .1875
    OWNER      SEGMENT_NAME                             SEGMENT_TYPE          FILE_ID     EXT_NB     EXT_MB
    SYS        APPLY$_CONF_HDLR_COLUMNS                 TABLE                       1          1      .0625
    SYS        APPLY$_CONF_HDLR_COLUMNS_UNQ1            INDEX                       1          1      .0625
    SYS        APPLY$_CONF_HDLR_COLUMNS_UNQ2            INDEX                       1          1      .0625
    SYS        APPLY$_CONSTRAINT_COLUMNS                TABLE                       1          1      .0625
    SYS        APPLY$_CONSTRAINT_COLUMNS_IDX1           INDEX                       1          1      .0625
    SYS        APPLY$_CONSTRAINT_COLUMNS_UIX1           INDEX                       1          1      .0625
    SQL>

  • Check Mate? Logic locks when I save

    I've been using Logic for two years without a major problem. One day last week logic decided to freeze whenever I save, nothing to do but to force quit. Every song every possible combination of saving also to different drives. i rushed into the Apple store with my mac and paid the experts to give it a thorough going over, hardware test etc. The verdict, perfect health. So my puter is OK but what about the system software? Reinstalled! Same problem. So i went and bought logic pro cross grade from 7 to 7.2 uninstalled logic properly and did a fresh install of logic, ran setup assistant and same problem, Logic lock when i try to save.
    Any Ideas anyone because apple stores can't help and neither can Pro tech support.
    Anyone?
    Cheers
    jamie

    I would do what I used to have to do in Windows every couple of dang months: wipe the HD totally and reinstall everything from scratch.
    Lot of work, but pretty much eliminates the software variable.

  • Oracle RDC Application - Database was locked but updates still allowed

    I am working in the Oracle RDC application for a clinical study. The study ended and the Oracle database administrator locked the database, however, the users were able to go into the study and approve additional pages after the database had been locked. According to documentation, once the database is locked, the users should only be able to view the information and not make changes unless they have been provided "privilige updates" which was not granted to the users.

    In that case, you probably want to ask this question in one of the Oracle Applications forums. You're far more likely to find someone familiar with the particular application you're using over there.
    Justin

  • Reg. Logical Database

    Hi Experts,
          This is with reference to Logical Database (LDB) , I have some Doubts\Clarifications ,
    1, What is the Significance of the Hierarchy of LDB structure (I.e Nodes\Tables).?
    2, How to find the relation between to Nodes\Tables that is with which field references the tables were interlinked.
    Thanks in Advance,
    Regards,
    Sen

    Hi
    The Hierarchy/Tree structure of tables indicates the order of database tables data fetching. As per the order it should fetch.
    For example take sales order 3tables VBAK,VBAP, VBEP
    so the data has to be fetched from VBAK first, then VBAP and lastly from VBEP.
    You can't fetch the data from VBEP starting. it is wrong.
    Always tables were interlinked with the correct Keys fields.
    for example if you take the above tables VBAK and VBAP are linked with VBELN field
    and VBAP and VBEP are linked with VBELN and POSNR fields
    So always LDB is created with such a linking tables only, not with any table just like that.
    Reward points if useful
    Regards
    Anji

  • Database account locked as it tries to connect different ports for 16 times

    I need a help in answering one of the issue encountered last week.
    I have created a database link and tried to access the information from a table using the program written in another language. The password provided was incorrect for that user while creating database link. So we expected that,while retrieving the data, Database connection has to be errored out as password provided is incorrrect.
    But unfortunately, user account was locked out. When i checked with DBAs they mentioned that it tries to connect 16 ports with in a min of time.we were shocked as it STOPS another scheduled jobs with that user. and affects production badly.
    As per the program, it has to connect only one time and yesterday we tried to execute the program in DBAs observation and it errored out as expected. Didn't tried for multiple ports.
    Now the question is, WHY the database connection established 16 times last week and caused user account locked. DBAs are unable to answer it. Any EXPERTs opinion on this would greatly appreciated.
    I have verified managing ports in oracle documentation, it was mentioned that if one port is busy it will try to connect to another port in the range of ports mentioned during the installtion. DBAs verified ports related file and it was blank. and they are not agreeing with this reason. Please HELP me in finding the correct REASON for this.
    is it a NETWORK issue or issue with DATABASE SERVER only?
    Thanks
    SSP
    Edited by: 960738 on Sep 22, 2012 9:13 PM

    960738 wrote:
    I need a help in answering one of the issue encountered last week.
    I have created a database link and tried to access the information from a table using the program written in another language. The password provided was incorrect for that user while creating database link. So we expected that,while retrieving the data, Database connection has to be errored out as password provided is incorrrect.
    But unfortunately, user account was locked out. When i checked with DBAs they mentioned that it tries to connect 16 ports with in a min of time.we were shocked as it STOPS another scheduled jobs with that user. and affects production badly.
    As per the program, it has to connect only one time and yesterday we tried to execute the program in DBAs observation and it errored out as expected. Didn't tried for multiple ports.
    Now the question is, WHY the database connection established 16 times last week and caused user account locked. DBAs are unable to answer it. Any EXPERTs opinion on this would greatly appreciated.
    I have verified managing ports in oracle documentation, it was mentioned that if one port is busy it will try to connect to another port in the range of ports mentioned during the installtion. DBAs verified ports related file and it was blank. and they are not agreeing with this reason. Please HELP me in finding the correct REASON for this.
    is it a NETWORK issue or issue with DATABASE SERVER only?
    Thanks
    SSP
    Edited by: 960738 on Sep 22, 2012 9:13 PMDBLINK is 100% oblivious to the fact any port exists.
    DBLINK only contains username, password & TNS Alias.
    can you post actual SQL & results?

  • How would I unit test database logic?

    I am still having a issue getting over a small issue when it comes to TDD.
    I need a method that will get a certain record set of filtered data from the data layer (linq2SQL). Please note that i am using the linq generated classes from that are generated from the DBML. Now the problem is that i want to write a test for this.
    do i:
    a) first insert the records in the test and then execute the method and test the results
    b) use data that might be in the database. Not to keen on this logic cause it could cause things to break.
    c) what ever you suggest?

    Variation on (a).
    Have a test db or subsection of the db that can be used for testing. When you are setting up your tests, have a routine that initializes the DB as you need it to begin testing (this can be done before each test, as appropriate). This may include deleting data,
    inserting data, etc. Then run your tests. In the Teardown phase, clean up after yourself. Can be repeated as much as is needed, without risk of disrupting live system (not a good idea to test using data in the database that is needed for anything else).
    Really, all one has to do is use System.Transactions and Rollback the transactions at the end of each tests. That's what I have seen done in integration testing, which UT does not apply in testing DB transactions.

Maybe you are looking for