Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ALIM | Exor
  • Product Communities
  • AssetWise
  • ALIM | Exor
  • Cancel
ALIM | Exor
ALIM | Exor - Wiki Useful scripts to identify database sessions and locks
    • Sign In
    • -Exor - Wiki
      • +ALIM Document Manager
      • An Attempt to Reset Your Password Has Failed
      • +AWLRS
      • +Exor Asset Manager
      • +Exor CIM / FIM
      • +Exor Document Manager
      • +Exor Enquiry Manager
      • +Exor Information Manager
      • +Exor Information Manager TMA Reporting Pack
      • +Exor Maintenance Manager
      • +Exor Maintenance Mobile
      • +Exor MapCapture
      • +Exor MapCapture (ESRI)
      • +Exor MCI MapCapture Interface
      • +Exor Network Event Manager
      • -Exor Network Manager
        • 'Group has overlaps' error adding section to group
        • "HIG 0182: User not instantiated correctly. Probable missing INSTANTIATE_USER trigger. Contact exor support for assistance" when login
        • Allow users to use Locator but not to change network data
        • Batch emails ignore table tag
        • Changing Base Themes
        • Create New User
        • Database clone product options
        • Default-web-access.log taking up too much space
        • Elements - Exor Network Manager
        • Error ORA-105100 uploading documents.
        • Error received while resizing route using toolbar, ORA-01422 unhandled exception
        • Error whilst creating theme
        • Errors while creating asset layer using GIS Layer Tool
        • Exor listener processes are not currently running
        • Exor password format rules
        • Export Asset data from grid in Locator cannot locate file once exported
        • Export location of surveyp.ped in NM0580
        • FRM-92101 Error when opening application
        • GRI/GIS Data - Exor Network Manager
        • Groups of Sections - Exor Network Manager
        • HIG-0067 error when entering a form because of user options
        • HIG-0179 error message trying to select local file
        • How to block read-only users from uploading data using CSV files
        • How to Change Highways Owner User Password
        • How to change the user password on a MAS System
        • How To Clear Your Java Cache
        • How to Enable the Java Console
        • How To Find Out Which Fixes Are Installed
        • How To Set Up Exor Listeners
        • How to unlock a user or change a users password
        • In which table is the user account email stored?
        • +Install/Upgrade - Exor Network Manager
        • Instantiate user error
        • Invalid number error ordering results by a string field in the Locator form
        • Java Certificate issue
        • JDBC Datasource Failed error when starting Locator or Map Viewer Servlet Failed
        • +Jobs - Exor Network Manager
        • Legend Tool doesn’t work on Locator
        • +Locator - Exor Network Manager
        • Locator - Initial extent of map does not appear correctly
        • Locator - Measure tool does not work - Your query failed
        • Locator export fails but shows no errors
        • Locator: Map doesn’t open. FRM-92104 A network error or server failure has occurred.
        • My Database has been updated - I can't login - get errors trying to save
        • Navigating between fields in the form
        • Navigator: ORA-28112: failed to execute policy function
        • NET-0339 error when using CSV Loader
        • New Asset Type Not Selectable In Alert Manager
        • New Defect Scheduled Alerts do not work
        • No network found within Tolerance error when creating a Defect
        • No snaps at this position when creating an asset
        • ORA 29279 SMTP Permanent Address error in alerts
        • ORA-20000: HIG-0230: Inconsistency detected error on login
        • ORA-20110: Unable to close Element it has un-replaceable inventory
        • ORA-257: archiver error. Connect internal only, until freed.
        • +Other - Exor Network Manager
        • Popup windows do not display
        • Process Submission module shows wrong time
        • +Reclassify - Exor Network Manager
        • Refresh Java Permissions For An Oracle Directory
        • Report fails with REP-300: CONNECT BY clause
        • +Reports - Exor Network Manager
        • Results are not returned in the correct order in Locator
        • Split/Merge - Exor Network Manager
        • Subordinate users cannot see all options in the Feature Edit menu
        • The specified environment ID EXORLIVE invalid for Job Type report
        • Unable to Delete System or User Menu Items
        • Understanding Datum, Non Datum, Linear groups, Non-Linear groups, Group of groups
        • Useful scripts to identify database sessions and locks
        • Users form HIG1832 FRM-40200. Field is protected against update.
        • WMS alternatives
        • WMS Map is not visible in Locator
        • You do not have privileges to perform this action error on logon
      • +Exor Oracle
      • Exor Problems and Solutions
      • +EXOR product placeholder
      • Exor Public Enquiry Manager API
      • +Exor Schemes Manager
      • +Exor Spatial Manager
      • +Exor Street Gazetteer Manager
      • Exor Streetworks Manager
      • Exor Streetworks Mobile
      • +Exor Structures Manager
      • Exor Structures Mobile
      • +Exor TMA Noticing Manager
      • +Exor TMA Permitting Manager
      • +Exor UKPMS
      • +Transportation Intelligence Gateway
      • Unable to connect to Power BI dataset
      • +Video Series for Exor
      • Working From Home with Exor
    • +AssetWise ALIM for Transportation

     
     Questions about this article, topic, or product? Click here. 

    Useful scripts to identify database sessions and locks

       
      Applies To 
       
      Product(s): Exor Network Manager
      Version(s): N/A
      Environment:  N/A
      Area:  Other
      Subarea: 
      Original Author: Sarah Williams, Bentley Technical Support Group
       

     

     

     

     

     

     

     

    Problem Description

    Sometimes I encounter a 'lock' message when trying to update records and wish to check who is logged in and who is locking which objects so I can resolve the issue.

    Reason

    In Oracle databases, locks are used to maintain the integrity of the data.  Depending on the lock type, users may either see the form 'hang' when they try to enter or update data, or may see an error message advising the record is locked.

    Steps to Resolve

    Option 1 The manual method!

    1. Probably the quickest and easiest way if all users operate in the same location is to ask around if someone else is working on the same data and ask them to let you know as soon as they have committed their changes so you can then make your changes to the record.

    Option 2 Scripts

    The following scripts can be run by your database administrator or system administrator in SQL*Plus (for Managed Service users please contact TSG):

    1. sessions.sql - this lists all sessions logged in to the database.  Any listed as 'active' are currently running something.  Any 'inactive' but locking a table (see next script) may have paused in the middle of updating / inserting and be doing something else outside of Highways.

    2. coe_locks.sql - lists all locks on the database, the username that has the lock and the session ID which can be linked back to the previous script output.

    3. active_sql.sql - shows the session information, username and SQL command being run by anyone who has an active session currently.

    The scripts can be found here.

    To run the scripts, save the zip file somewhere on the machine where SQL*Plus is installed, e.g. c:\temp and unzip it.  Log into SQL*Plus as the Highways owner user (usually highways or atlas) and enter the command to run, e.g.:

    SQL> start c:\temp\sessions.sql

    (replace c:\temp with the location where you stored the files)

    Option 3 TSG

    Very occasionally the locks may be due to a software issue rather than a user action.  If all the above have failed then log a forum post and TSG will assist.

    See Also

    Scripts can be found here: http://communities.bentley.com/products/assetwise/exor/m/mediagallery/257584.aspx.

    More information about Oracle database locks and data integrity can be found here: http://docs.oracle.com/cd/B28359_01/server.111/b28318/consist.htm

    http://avdeo.com/2008/06/21/identifying-locks-on-objects-using-vlocks/

    • Oracle
    • Lock
    • session
    • Exor Network Manager
    • Share
    • History
    • More
    • Cancel
    • Sarah Willis-Culpitt Created by Bentley Colleague Sarah Willis-Culpitt
    • When: Tue, Sep 3 2013 5:52 AM
    • NT Last revision by Bentley Colleague NT
    • When: Thu, Sep 26 2013 7:59 AM
    • Revisions: 4
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies