How to find out locks in tables?

Any query have to find out the locks in a table.any body plz suggest.

set linesize 150;
set head on;
col sid_serial form a13
col ora_user for a15;
col object_name for a35;
col object_type for a10;
col lock_mode for a15;
col last_ddl for a8;
col status for a10;
break on sid_serial;
SELECT l.session_id||','||v.serial# sid_serial,
       l.ORACLE_USERNAME ora_user,
       o.object_name,
       o.object_type,
       DECODE(l.locked_mode,
          0, 'None',
          1, 'Null',
          2, 'Row-S (SS)',
          3, 'Row-X (SX)',
          4, 'Share',
          5, 'S/Row-X (SSX)',
          6, 'Exclusive',
          TO_CHAR(l.locked_mode)
       ) lock_mode,
       o.status,
       to_char(o.last_ddl_time,'dd.mm.yy') last_ddl
FROM dba_objects o, gv$locked_object l, v$session v
WHERE o.object_id = l.object_id
      and l.SESSION_ID=v.sid
order by 2,3;

Similar Messages

  • How to Find out the all  tables in module wise ?

    Dear Friends,
    1.How to Find out the all  tables in module wise ?
       what are the total number of table in SAP ?
    2. how to find out all existing functions in SAP ?
    Thanks and regards,
    Subasha Chandra Sahoo.

    Hi,
    You will get the module wise list from:
    http://www.sourceveda.com/SAPReference.htm
    http://www.sourceveda.com/
    Regards...

  • How to find out  Locks on the database objects

    how to find out Locks on the database objects

    The following notes should be helpful:
    Note: 200590.1 - bde_session_locks.sql - Locks for given Session ID
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=200590.1
    Note: 1039273.6 - SCRIPT: VIEWING LOCKS ON OBJECTS HELD BY SPECIFIC USER
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=1039273.6
    You can also search Metalink, there are many notes/scripts published there which would be also helpful.

  • How to find out name of table for a structure.

    hello all,
                I want to find out name of table for a structure ADDR1_DATA. can anybody pls tell me how to find out it?
    Thanks,
    Ashu

    Hi Ashu,
    You write the structure name in se11
    after selecting the database table radio button
    click on the where used list button in the application tool bar.
    You will find the table name if it is used else where.
    Check out the website at:
    http://sap-idoc2edi-consulting.com/
    Read the blog at:
    http://blogs.ittoolbox.com/sap/ehadzipetros
    Regards,
    Jagadish

  • How to find out list of tables

    how to find out list of tables

    Hi,
    You can check table DD02L via transaction SE16/SE16N.
    Also please check this links.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e944e133-0b01-0010-caa2-be2cb240f657
    http://www.erpgenie.com/abap/tables.htm
    Regards,
    Ferry Lianto

  • How to find out if a table has logging on?

    I need to temporarily turn off logging, and restore the logging setting afterward.
    How do I find out if a table has logging on or off before my change?

    TUBBY_TUBBZ?alter table tablea nologging;
    Table altered.
    Elapsed: 00:00:00.28
    TUBBY_TUBBZ?select logging from dba_tables where table_name = 'TABLEA';
    LOGGING
    NO
    1 row selected.
    Elapsed: 00:00:00.00

  • How to find out size of tables

    Can you please suggest me how to find out the size of tables?
    I need to find what would be the appropriate size required for rollback segment.
    Your quick help would be highly appreciated.

    Sizing the Rollback Segments (rollback segment) is an iterative process and requires several scheduled maintenance windows to re-size the rollback segment, based on the DML load. The optimal rollback segment size is a function of system update load (as determined by v$rollstat and v$transaction):
    a) The COMMIT frequency.
    b) The size of RAM log buffers.
    c) Specific Oracle parameters (log_buffer, db_writer_processes, log_checkpoint_interval).
    d) The size of the rollback segment data files.
    The total size of the UNDO area for a specific transaction is as follows:
    If the undo is 'x' bytes for 'n' number of rows then
    T = x * (N / n) * 1.05
    Where T = Approximate Total undo for the transaction in bytes.
    x = Undo for the individual transaction.
    N = Total number of rows in the original table.
    n = Total number of rows in the test table.
    Optimal rollback segment sizing is an iterative process, and is normally "tuned" over a period of several weeks. Generally, we build spreadsheets to track usage and determine the optimal size:

  • How to find out all the tables in a schema with a particular column

    Hi
    Is there a way to find out all the tables in schema1 that has col1 as one of the columns?

    select table_name from dba_tab_cols where owner='schema' and column_name='col1';

  • How to find out when a table was last updated?

    Is there a way to find out when a table was last updated/inserted/deleted? Thanks!

    There may be an easier way but if you are trying to get info on something that has already happened look at your redo logs and archived logs. It would be hard but in V$LOGMNR_CONTENTS you could find the max time for a given object. Note to use this you need to set up log miner. Since you did not give a version try the Oracle 9i DBA Guide pg 9-1.

  • How to find out all the tables associated with particular T-code or Program

    Hi All,
    In 4.6B we have a transaction code SE49, where we can see all the tables associated with particular Transaction code or Program.
    But in ECC 5.0 or in ECC 6.0 this transaction code is not available.So is there any alternative where i can find out all the tables associated with particular T-code or Program.
    Thanks
    Shubham

    Hi,
    you are right, Transaction SE49 as well as SE48 do not exist anymore I'm afraid, they        
    are discontinued.                                                              
    You might try to create a transaction variant:                                        
    1) Start SE93 to create a transaction variant                                         
    2) Specify a name, eg. ZSE49, and choose the first option:                            
       "program and screen (dialog transaction)                                           
    3) Here specify SAPMSEUZ as program, and 200 as screen number                         
    4) Choose a suitable development class (package) if you want it to be                 
       transportable or Local (=$TMP) if non-transportable                                
    5) press Save                                                                         
    Same applies for SE48, same program but dynpro 100.                                   
    Sorry for not being able the reasons behind the decision to discontinue            
    these transactions. I suppose at least part of the functionality was               
    integrated in SE38.           
    Best regards
    Erika

  • How to find out if a table has been changed?

    hello
    how can I find out in a zreport, if a specific table has been changed and  data has been added or deleted?
    like for instance the date of last change to the table?
    thanks
    Alisa

    Alisa...you can do it following manner
    * Execute the report RSVTPROT to extract the changes done to database table
    * table with output going into memory
    TYPES: BEGIN OF ty_abap_list.
            INCLUDE STRUCTURE abaplist.
    TYPES: END OF ty_abap_list.
    DATA: gt_abap_list  TYPE STANDARD TABLE OF ty_abap_list.
      SUBMIT rsvtprot AND RETURN
        EXPORTING LIST TO MEMORY  USING SELECTION-SCREEN 1000
                                  WITH cusobj   EQ c_tabname "Table Name
                                  WITH dbeg     EQ gv_begdate
                                  WITH tbeg     EQ c_begtime
                                  WITH dend     EQ gv_enddate
                                  WITH tend     EQ c_endtime
                                  WITH objfirst EQ ''
                                  WITH tabfirst EQ 'X'.
    * Extract the list from memory
      CALL FUNCTION 'LIST_FROM_MEMORY'
           TABLES
                listobject = gt_abap_list
           EXCEPTIONS
                not_found  = 1
                OTHERS     = 2.

  • How to find out where a table is used in the code ?

    I have a huge database, and I am adding a column to a table...
    is there a query to find out if this would impact the code ? I mean I want to find all the places in the code with
    insert into mytable, or update mytable.....
    how to include both insert into mytable, and update mytable in dba_source ?

    Use DBA_DEPENDENCIES:
    select owner,name,type from dba_dependencies where referenced_name = 'TABLE_NAME'
    and referenced_owner = 'TABLE_OWNER';For example:
    SQL> select owner,name,type from dba_dependencies where referenced_name = 'EMP'
      2  and referenced_owner = 'SCOTT';
    OWNER                          NAME                           TYPE
    PUBLIC                         TABLE1                         SYNONYM
    SCOTT                          SELECT_EMP                     PROCEDURE
    SCOTT                          EMP_DEPT_VW                    VIEW
    SCOTT                          PP                             SYNONYM
    SCOTT                          EMP_MV                         MATERIALIZED VIEW
    SCOTT                          EMP_VIEW                       VIEW
    6 rows selected.
    SQL> However, keep in mind DBA_DEPENDENCIES stores statis references only. If your code references table in question in dynamic SQL you will have to parse DBA_SOURCE and in some cases, even that will not give you all answers.
    SY.

  • How to find out index from table?

    Hi all,
    I've tried to create indexes to some columns from some tables to use for Oracle Text.
    I ve got a error message saying that I can not create an index:
    "cannot create multiple domain indexes on a column list using same indextype".
    I was wondering if an index already exists for that column, how do I find out the name of the index that points to that paticular colum?
    Thanks a lot
    E.

    Check the view dba_ind_columns
    That will tell you.
    something like;
    select index_name, column_position, column_name from dba_ind_columns
    where table_name = '<table name>'
    order by 1,2

  • How to find out if a table is in the replication process?

    Hi, I'm trying to figure out if one of the table in the database is replicated from outside. What should I do to find out this? Can anyone help me out? Thanks a lot! _meg                                                                                                                                                                                                                                                                                                                                                       

    Try this query
    select gname,oname,status from dba_repobject where oname='TABLE_NAME';

  • How to find out the orizinal table for any wiew

    I have a maintaince view (name of the view is V_T001K_ASSIGNV) so i cant make a selection quarry on that view as it is maintaince view. is thare any table in sap for for a particular maintaince view and what is the way to find out that table for that view so i can make a quarry.

    Go to SE11 --->  display the view, there right side you will find tables related to that view, based on your requiremnt take the table,
    Regards,
    Mallik.

Maybe you are looking for

  • Mono into Stereo fill right doesn't work

    Hello, I am trying to convert a mono track into stereo. When I put the fill right effect on the whole audio track goes dead. There aren't any levels or any other remote signs of the audio. Is there a problem with it and what is the work around?

  • Failed to start  "admin server" and "BI publisher" :  Reason java.io.IOException openWallet

    Hello, I need your help to fix a critical problem to start Admin server and BI server : # ...domains/bifoundation_domain/bin/startWebLogic.sh .... Failed with 17-Mar-2015 17:17:33 oracle.security.jps.internal.credstore.ssp.CsfWalletManager openWallet

  • Initializing an ADC

    Hi There, I am trying to do something that is very much simple to do in C, but since I dont have much experience in LABVIEW, I am loosing so many precious hours. Here is what I want to do. I have two sections of the code as the way I wanted. Its just

  • I am having issues with my touchscreen ability in photoshop with my HP Split x2..

    In all honesty, this software is not new to me. However, using a touchscreen/tablet in the art field is. I downloaded photoshop recently and I started playing around with it and checking out the newest features that PS CC had to offer. I then tried t

  • Inserting CD causes error

    ITunes works very well for me. However... Everytime that I insert a music CD into my laptop CD drive, I get a dialog pop up that states "Access to specified drive, path, or file is denied." iTunes seems to import the songs just fine and updates my iP