Locks in database object Packages...

Hi,
i want to know how many locks are possible in the database object Packages in windows.
can anybody help me in this.
regards,

In one SQL*Plus session run this:
DECLARE
    n   NUMBER := 0;
    idx NUMBER := 0;
BEGIN
    LOOP
        n := dbms_sql.native;
        dbms_lock.sleep(10);
        idx := idx + 1;
        EXIT WHEN idx > 100;
    END LOOP;
END;
/In another SQL*Plus session (AS SYSDBA) execute this:
SQL> grant execute on dbms_sql to public ;
grant execute on dbms_sql to public
ERROR at line 1:
ORA-04021: timeout occurred while waiting to lock object SYS.DBMS_SQL
SQL>

Similar Messages

  • Re: what is difference between sap locking and database locking

    hi,
        what is difference between sap locking and database locking. Iam locked the table mara by using lock objects.
    But iam unable to unlock the mara table. I give u the coding. Please check it.
    REPORT zlock .
    CALL FUNCTION 'ENQUEUE_EZTEST3'
    EXPORTING
       MODE_MARA            = 'S'
       MANDT                = SY-MANDT
       MATNR                = 'SOU-1'.
    call transaction 'MM02'.
    CALL FUNCTION 'DEQUEUE_EZTEST3'
         EXPORTING
              mode_mara = 'E'
              mandt     = sy-mandt
              matnr     = 'SOU-1'.
    IF sy-subrc = 0.
      WRITE: 'IT IS unlocked'.
    ENDIF.

    Hi Paluri
    Here is the difference between SAP locks and Database locks, i will try to find the solution to your code.
    Regards
    Ashish
    Database Locks: The database system automatically sets database locks when it receives change statements (INSERT, UPDATE, MODIFY, DELETE) from a program. Database locks are physical locks on the database entries affected by these statements. You can only set a lock for an existing database entry, since the lock mechanism uses a lock flag in the entry. These flags are automatically deleted in each database commit. This means that database locks can never be set for longer than a single database LUW; in other words, a single dialog step in an R/3 application program.
    Physical locks in the database system are therefore insufficient for the requirements of an R/3 transaction. Locks in the R/3 System must remain set for the duration of a whole SAP LUW, that is, over several dialog steps. They must also be capable of being handled by different work processes and even different application servers. Consequently, each lock must apply on all servers in that R/3 System.
    SAP Locks:
    To complement the SAP LUW concept, in which bundled database changes are made in a single database LUW, the R/3 System also contains a lock mechanism, fully independent of database locks, that allows you to set a lock that spans several dialog steps. These locks are known as SAP locks.
    The SAP lock concept is based on lock objects. Lock objects allow you to set an SAP lock for an entire application object. An application object consists of one or more entries in a database table, or entries from more than one database table that are linked using foreign key relationships.
    Before you can set an SAP lock in an ABAP program, you must first create a lock object in the ABAP Dictionary.

  • Multiple blocking locks on same object

    we have a database that is providing a great deal of application 'freezing' due to lock problems that were not experienced before moving to a new 10g database environment.
    one of the items i believe to be of interest is the fact that when this 'freezing' occurs then a look at the database locks reveals that more than one TX exclusive blocking lock is held on the same database object without any waits showing.
    my understanding is that this should not be the case? that only one user should possess the exclusive transaction level lock and that the other user should only have an outstanding request for this same level lock?
    any information you can provide would be most appreciated.
    thanks in advance.

    You would need to find out the sql the application is executing when those locks freeze like that. From there determine if there is a logical syntax issue or get the explain plan to ensure it isn't for example an update statement on a massive table that has improper indexing.
    Also, do you see other sessions blocking other sessions as orafad suggested? In this scenario my original explanation is different. If the locks are all chained on waiting on another session, that means the first session that is blocking is updating the same data that the waiters are wanting.
    In my opinion you need to find out the exact SQL causing these locks to ensure it is an issue with one of your applications. Determining the performance of that query is a must.
    The only weird thing is you say there is no waits taking place....did you look in v$session_wait?
    Lee

  • No database object is retrieved in SQL Developer 1.5

    Hi,
    The SQL Developer 1.5 that I have installed can connect to database but when I click on tables, packages or other type, nothing is retrieved.
    I'm very sure I have database objects in above categories as I have been using SQL Developer 1.2.1. What could be not right?
    Please advise
    Thank you.

    I think, the developer forgot the clause for the all_columns view
    where column_id is not null
    Edited by: Lieni on 04.05.2009 13:32
    Edited by: Lieni on 04.05.2009 13:33

  • How to lock a database Z table before updating it through a report program

    Hi,
    How to lock a database Z table before updating it through a report program and also how to unlock it after my updation.
    The whole process is done through report program.

    Hi,
    Go to SE11, in the option 'Lock object' enter the name of your lock,
    begin with 'E', suppose 'EXXXX' And create. In tab 'Tables' fill the
    table name where the record you want to lock exist and select the
    lock mode. Lock mode can be shared and exclusive. If 'shared',
    when you lock the record, other can also read data, but can not
    modify. If 'exclusive', when you lock the record, other can neither
    read nor modify the record. After save and activate, you will get two
    function module.'ENQUEUE_EXXXX' to lock record,
    'DEQUEUE_EXXXX' to release lock on one record.
    When use this function module it only lock one record at a time. It
    does not lock the table.
    Regards,
    Omkaram.

  • Database objects Tables, Views, Indexes not expand in Connections navigator

    In SQL Developer tool when I clicked on any database object: Tables, Views, Indexes, Packages, Procedures, Functions, and Triggers none of them expands in Connections navigator so I am not able to see all tables, Views, Indexes in this schema objects.
    Please advise
    Thanks a lot
    Vincent

    If the user you're connecting with is not the owner of the objects, you can access them through the Other Users node.
    Hope that helps,
    K.

  • Not able to compare PL/SQL body from two different offline database object

    It is not possible to compare two package bodies from two different off line database object in two different off line database and schema.
    JDeveloper display a compare not available message in the middle of the window.
    It is possible to compare the package specification.

    Not able to compare scripts generated from offline database objects too

  • Creating OO database objects by using class diagrams in JDeveloper

    I am new to use JDeveloper. I create UML class diagrams (using Entity Object) in JDeveloper, which has inheritances and associations, and then choose Create Database Objects... try to create oo database, but it only create some tables in the database, not any object types ... .
    What do I missed? Or I have to create those oo database objects manually?
    Thanks.

    Tony,
    You can use database object types with BC4J, but only to implement BC4J domains (these can map to object types).
    For performance reasons, it is less practical to generate a table of object types for a complete EO. Most users view the BC4J layer as the 'pure' OO model, and map to a relational datamodel for optimal performance.
    Below some steps to create a DB object type for a domain:
    You can create Oracle Object Types in the database by creating a business component domain and then forward generating the database object. Forward generation of object tables from entity objects is not supported. To forward generate an Oracle Object Type from a new domain: In the System Navigator, right click on your business component package and choose Create Domain. When the Domain Wizard opens, review the information on the Welcome page and click Next. Enter a Name and Package for the domain or accept the defaults. Select the checkbox for Domain for an Oracle Object Type. Do not select any items on the Available Types list, as you are creating a new one. Enter the name of your new type in the Selected Type field. Click Next. On the Settings page, click New. Provide a name in the New Domain Attribute box. Select the appropriate Java type a[i]Long postings are being truncated to ~1 kB at this time.

  • Database Objects node missing schemas

    When i expand 'Database Objects' in the object navigator i see users but i am wondering why this is only a subset of users when i select from DBA_USERS. How do i get to see all the schemas in the database and why is this not initially possible?
    Many Thanks
    Gus

    Hi
    My understanding is that the list of users that you see in the Navigator in Forms is just those users who own objects that you have privileges on. Create yourself a user with no privileges other than CONNECT - connect as that user in Forms, and all you see is the stuff that's been granted to PUBLIC.
    Most users won't necessarily own any objects, so you don't see them. But you see SYS for example because there are a whole heap of packages/views that are granted to PUBLIC.
    regards
    Andrew
    UK

  • Traitement modules versus database object in Designer 9i

    Hello!
    In our environment, there was Designer 9i installed with non-enabled versioning. So, there is only one Global shared workarea, and all the applications system are granted to public who has all rights, and the developers maintain all the application (database objects and modules).
    Now, we want to revoke the insert, delete and update privileges on database object to the developers.
    The developers continue to maintain their modules and only the DBA, would be able to modify the database objects.
    What is the best way to do it?
    Thanks,
    Malika

    Malika,
    Then you should move the database objects to another workarea and grant only edit priviliges to your DBA - and these objects should be shared to your 'normal' development workarea (where the developers have all privs).
    But why the h*** should you want to do this? Packages, procedures and functions are database objects and should be developed by developers. Imho also views, tables, triggers etc should be developed by developers and not DBA's. A DBA is another kind of expertise than developer. If you try to make the developer's life (work) difficult, they will look for workarounds - and find them. And so making your project less productive and more complex.
    Keep the problem you are trying to solve in mind!
    HTH
    Roel

  • Benefits of Assigning Database Objects to Schemas

    Hi,
    I need some clarification. Sam Alapati states the following in his book "Expert Oracle9i Database Administration:"
    "Dividing a database's objects among various schemas promotes ease of management and a higher level of security."
    Could you kindly explain how dividing a database's objects among various schemas promote
    1) ease of management, and
    2) higher level of security.
    Thanks,
    Karim

    Like it's been discuss in this thread.
    Re: Three database table sets under one schema
    in short
    1) ease of management
    you group your related database objects into schemas so it's easier for you to figure out which applications using which set of tables, packages etc.
    2) higher level of security
    schema owner has full access to it's objects. If you put every tables into one schema, you can't control which table schema holder has access to which he can't, because he owns everything.

  • Identifying database objects referenced in a form

    Is there any utility available that would identify all the database objects (tables, views, packages, etc) that are referenced in a particular form, whether they are base tables for blocks, tables included in record group queries, referenced in triggers, etc? Sure would be nice.

    Designer will allow you to do this kind of dependency analysis. Likewise some partner utilities such as FormsGrep from Aug10.com will provide the same kind of thing

  • How to get the List of Database Objects (Table/View) for a given APEX Page.

    Hi,
    I have an application and that consist of pages like page1,2,3,.....
    *1.* I want a report which can give me the list of all the Pages1,2,3,....
    I am using the following query to acheive this.... THIS IS FINE..
    select a.workspace, a.owner, a.application_name, b.page_id, b.page_name
      from apex_applications a,
           apex_application_pages b
    where a.workspace = b.workspace
       and a.application_id = b.application_id*2. Now, I want for each individual page*, the list all the database objects (tables/views), which that page is using.
    I am using ALL_DEPENDENCIES , but I am not getting the result.
    So, want to know if there any view/table, where I can get the Application Pages & there database object list...
    Thanks,
    Deepak

    Hari,
    Thanks for the response.
    The view APEX_APPLICATION_PAGE_DB_ITEMS will only give me the table name related to any Page Items defined to that page..It will not give me all the database objects..
    suppose we have a Page, having a report based on multiple tables and there is no Page items defined on that page, we will not have any value in this ....DB_ITEMS table. same thing if we have define some PL|SQL(using some table/view) in a Process, that will not be populated in .....DB_ITEMS table. I want some thing like all the database objects (table/views/function/procedure/.....) for a particular Page ID.
    Thanks,
    Deepak

  • Forced to remap one database object at a time

    Our application exposes a set of data objects (views) for external reporting. Field/row level data security conditions are built into the view definitions. Different access levels are segmented by schema names and in order to enable report reuse object names are identical between schemas.
    Users granted schema rights based on their access level.
    For example, user A is granted access only to the schema X which contains View1, View2, etc. while user B is granted access only to the schema Y which also contains View1, View2, etc.
    User A can reuse report created by user B (since object names are identical), however s/he cannot do it without first changing the data source location (since their access levels and therefore schema names are different).
    However, "Set Datasource Location" dialog (see sample screenshot below) does not allow one-click schema remapping. "Current Data Source" hierarchy does not directly expose schema name (it is listed as an "Owner" property of the individual table/view object) which forces user to remap one database object at a time by expanding top and bottom trees, highlighting matching objects and clicking "Update" button.
    Our question is: are there any menu items/settings or any other facilities in Crystal Report that would allow us to make re-mapping process less time-consuming?

    Hi Len,
    No, bottom line is the designer is used to "finalize" the report. It's not designed to be use this way. What I suggest you do is create an application that can set location/schema at view time to that person logging in. This way it's all done in the back end and relatively easy to do using one of our SDK's.
    Depending on what development tool and Report engine you use depends on which forum to post your question to. SAP will not create the application for you so you will need to get a developer involved.
    Thank you
    Don
    Senior Technical Assurance Engineer
    Developer Support Team
    Business Objects, an SAP Company

  • Error: Component failed to run due to a Object Package scheduling failure

    Hi,
    BusinessObjects XI R2 SP 5, FP 5.1
    I am trying to schedule a group of reports (crystal reports) via a package where the output destination is to an email. At the event of execution of the scheduled time for the package; the package fails with the error: Component failed to run due to a Object Package scheduling failure. (Note: When scheduled individually it is successful and it was copied to the package from its original location, so there is no mistake in parameters or ODBC connections)
    When we go to the history and within the instance, we see that some of the reports have the status as success and some are failed with the same error message. Even though some of the reports are made to fail at the event of 'NO DATA'; what I do not understand is that how come some of the other reports (which contains data and which works when trying to run manually or scheduled individually) are failing.
    I would understand something is wrong when the entire package fails which is not the case here as say of 50 reports, 5 are successful and the rest fails with the same error.

    Sorry posted on the wrong section...
    Edited by: Deepu Philip on Mar 18, 2010 5:38 PM

Maybe you are looking for