Ad-Hoc SQL

I'm adding ad-hoc SQL capabilities for Oracle to my application (the application is a database development tool). Essentially, the user has a text editor that they use to type what ever SQL they want. I need to give them a way to execute it. What they execute may consist of 1 individual SQL statement or it may contain many. For example, they may run this all at the same time:
SELECT * FROM TABLEA;
SELECT * FROM TABLEB;
INSERT INTO SOMETABLE
SELECT * FROM ANOTHERTABLE;
DECLARE
Var NUMBER;
BEGIN
Var := 1;
END;
and so on.
I would need to execute this and produce 4 distinct set of results for the user. Can I pass all of this to Oracle? Will Oracle know what to do with this? Will Oracle give me results for the 4 individual statements? Do I need to parse each statement on my own and send them to Oracle one at a time?
I'm trying to figure out how to go about developing this solution. I'm doing this in a PowerBuilder application if that makes any difference.
Thanks,
Brad

Hi Brad,
Like you I am a PB user and I guess new to Oracle, most of my past experience has been with MS SQL Server. But there is nothing like a kick up the bottom to get you thinking again and changing from SQL Server to Oracle does that job quite well.
The code below is executed when the user hits the "GO" button, in my app I wanted the SQL stored in a file so that I could send this out to the users and they could EXEC it with this routine, anyway here goes:
String     ls_file_name, ls_line, ls_sql
Integer     li_handle, li_err = 0
ls_file_name     = sle_enter_filename.text
if (f_empty(ls_file_name)) then
     messageBox("STOP!", "MUST Enter a filename", stopSign!)
     return
end if
li_handle     = fileOpen(ls_file_name, lineMode!)
if (li_handle < 0) then return
ls_sql     = ''
do while (li_err >= 0)
     li_err     = fileRead(li_handle, ls_line)
     if (li_err >= 0) then
          if (lower(ls_line) = 'go') then // go is like / in oracle
               f_execSQL(ls_sql)
               ls_sql     = ''
          else
               ls_sql     += char(13) + char(10) + ls_line // need to put whitespace as fielRead removes CR/LF in affect.
          end if
     end if
loop
fileClose(li_handle)
f_execSQL() is:
EXECUTE IMMEDIATE :as_sql;
f_dispSqlErrors('f_ExecSql - Executing: ' + as_sql)
return(SQLCA.SQLCode)
f_dispSqlErrors() - simply checks sqlcs.sqlCode and if it's not kosher (ie < 0) then reports and terminates.
of_close()
return
Hope this helps.
Bill

Similar Messages

  • OEM - No ad-hoc SQL tuning?

    Am I correct that there is no way to say to Oracle Enterprise Manager's SQL Tuning Advisor, "here is some SQL - please analyze and tune it". The only way to get it to tune something is to find it running and then say "please run the SQL tuning advisor on it".
    In other words, no way to tune a query without running it first...?
    I've been looking for a way to do this in OEM and can't find it.
    Thanks!

    sb92075 wrote:
    Last I checked, explain plans tell you what will happen, not how you might change things to improve itIf/when an experienced & KNOWLEDGEABLE person see a BAD plan, they may be able to reformulate the SQL to produce a better plan.
    which is what the SQL Tuning Advisor does.Those who live by the GUI, die by the GUI.
    Some/many folks would be incapable of doing anything with or to Oracle RDBMS if OEM did not exist or was broken.Did I ask for opinions on the One True Way to be a DBA, or for a comparison of SQL*Plus vs. OEM, or a survey of the competence level of typical DBAs?
    No.
    I asked a simple, technical question about OEM.

  • AD HOC SQL request

    Hi,
    Sorry if this one is a bit silly but how can I create a SQL request such as 'SELECT FIELDA,FIELDB,FIELDC FROM TABLE WHERE FIELDC = 'BLA'' and use the result as an input for an interface?
    JF

    Use ODI for that :)
    Create or reverse the datastore "TABLE" with column FIELDA etc..
    create an interface
    drag and drop your datastore "TABLE' and create the mapping do not forget the filter FIELDC="BLA"

  • Creating a ad-hoc calculation using sql query

    Hi All,
    I want to know if its possible some way to create a ad-hoc sql query inside a workbook so as to create a calculation using that sql.
    I have a folder which gives me balance for any period. My requirement is to display current period balance along with prior years closing balance in same record for each code combination. I dont want to modify folder definition.
    Thanks for your inputs.
    Vishal.

    You could try creating a custom function for this purpose. You would need to register the function in the End User Layer and then you can call the function from your report.

  • GeoRaptor 3.0 for SQL Developer 3.0 and 2.1 has now been released

    Folks,
    I am pleased to announce that, after 5 months of development and testing, a new release of GeoRaptor for SQL Developer 2.1 and 3.0 is now available.
    GeoRaptor for SQL Developer 3 is available via the SQL Developer Update centre. GeoRaptor 3 for SQL Developer 2.1 is being made available
    via a download fro the GeoRaptor website.
    No release notes have been compiled as the principal developer (oops, that's me!) is currently busy doing real work for a change (another 3 weeks), earning a living
    and keeping the wolves at bay. More extensive notes (with images) will be compiled when I get back. (Unless anyone is offering! See next.)
    We are still looking for people to:
    1. Provide translations of the English dialog menus etc.
    2. Write more extensive user documentation. If you use a particular part of GeoRaptor a lot and think
    you have found out all its functionality and quirks, contact us and offer to write a few pages of
    documentation on it. (Open Office or Microsoft Word is fine.) Easiest way to do this is to simply
    make screen captures and annotate with text.
    3. Conduct beta testing.
    Here are the things that are in the new release.
    New functionality:
    Overhaul of Validation Functionality.
    1. User can specify own validation SELECT SQL as long as it returns three required columns. The SQL is thus totally editable.
    2. Validation update code now allows user to associate a PL/SQL function with an error number which is applied in the UPDATE SQL.
    3. UPDATE SQL can use WHERE clause of validation SELECT SQL (1) to update specific errors.
       NOTE: The generated UPDATE statement can be manually edited. It is NEVER run by GeoRaptor. To run any UPDATE, copy the statement
       to the clipboard and run in an appropriate SQL Worksheet session within SQL Developer.
    4. Main validation table allows:
       a. Sorting (click on column header) and
       b. Filtering.
       c. Copying to Clipboard via right mouse click sub menu of:
          - Geometry's SDO_ELEM_INFO array constructor.
          - SDO_GEOMETRY constructor
          - Error + validation string.
       d. Access to Draw/Zoom functions which were previously buttons.
       e. Added a new right mouse click menu "Show Feature's Individual Errors" that gathers up all the errors
          it can process - along with the ring / element that is host to the error (if it can) - and displays
          them in the Attribute/Geometry tabs at the bottom of the Map Window (where "Identify" places its results).
          The power of this will be evident to all those who have wanted a way of stepping through errors in a geometry.
       f. Selected rows can now be deleted (select rows: press <DELETE> key or right mouse click>Delete).
       g. Table now has only one primary key column, and has a separate error column holding the actual error code.
       h. Right mouse click men added to table menu to display description of error in the new column (drawn from Oracle documentation)
       i. Optimisations added to improve performance for large error lists.
    5. Functionality now has its own validation layer that is automatically added to the correct view.
       Access to layer properties via button on validation dialog or via normal right mouse click in view/layer tree.
    Improved Rendering Options.
    1. Linestring colour can now be random or drawn from column in database (as per Fill and Point colouring)
    2. Marking of SDO_GEOMETRY objects overhauled.
       - Ability to mark or LABEL vertices/points of all SDO_GEOMETRY types with coordinate identifier and
         option {X,Y} location. Access is via Labelling tab in layer>properties. Thus, coordinate 25 of a linestring
         could be shown as: <25> or {x,y} or <25> {x,y}
       - There is a nice "stacked" option where the coordinate {x,y} can be written one line below the id.
       - For linestrings and polygons the <id> {x,y} label can be oriented to the angle between the vectors or
         edges that come in, and go out of, a vertex. Access is via "Orient" tick box in Labelling tab.
       - Uses Tools>Preferences>GeoRaptor>Visualisation>SDO_ORDINATE_ARRAY bracket around x,y string.
    3. Start point of linestring/polygon and all other vertices can be marked with user selectable point marker
       rather than previously fixed markers.
    4. Can now set a NULL point marker by selecting "None" for point marker style pulldown menu.
    5. Positioning of the arrow for linestring/polygons has extra options:
       * NONE
       * START    - All segments of a line have the arrow positioned at the start
       * MIDDLE   - All segments of a line have the arrow positioning in the middle.
       * END      - All segments of a line have the arrow positioning in the END.
       * END_ONLY - Only the last segment has an arrow and at its end.
    ScaleBar.
    1. A new graphic ScaleBar option has been added for the map of each view.
       For geographic/geodetic SRIDs distances are currently shown in meters;
       For all SRIDs an attempt is made to "adapt" the scaleBar units depending
       on the zoom level. So, if you zoom right in you might get the distance shown
       as mm, and as you zoom out, cm/m/km as appropriate.
    2. As the scaleBar is drawn, a 1:<DEMONINATOR> style MapScale value is written
       to the map's right most status bar element.
    3. ScaleBar and MapScale can be turned off/on in View>Properties right mouse
       click menu.
    Export Capabilities.
    1. The ability to export a selection from a result set table (ie result of
       executing ad-hoc SQL SELECT statement to GML, KML, SHP/TAB (TAB file
       adds TAB file "wrapper" over SHP) has been added.
    2. Ability to export table/view/materialised view to GML, KML, SHP/TAB also
       added. If no attributes are selected when exporting to a SHP/TAB file, GeoRaptor
       automatically adds a field that holds a unique row number.
    3. When exporting to KML:
       * one can optionally export attributes.
       * Web sensitive characters < > & etc for KML export are replaced with &gt; &lt; &amp; etc.
       * If a column in the SELECTION or table/view/Mview equals "name" then its value is
         written to the KML tag <name> and not to the list of associated attributes.
         - Similarly for "description" -> <description> AND "styleUrl" -> <styleUrl>
    4. When exporting to GML one can optionally export attributes in FME or OGR "flavour".
    5. Exporting Measured SDO_GEOMETRY objects to SHP not supported until missing functionality
       in GeoTools is corrected (working with GeoTools community to fix).
    6. Writing PRJ and MapInfo CoordSys is done by pasting a string into appropriate export dialog box.
       Last value pasted is remembered between sessions which is useful for users who work with a single SRID.
    7. Export directory is remembered between sessions in case a user uses a standard export directory.
    8. Result sets containing MDSYS.SDO_POINT and/or MDSYS.VERTEX_TYPE can also be written to GML/KML/SHP/TAB.
       Example:
       SELECT a.geom.sdo_point as point
         FROM (SELECT sdo_geometry(2002,null,sdo_point_type(1,2,null),sdo_elem_info_array(1,2,1),sdo_ordinate_array(1,1,2,2)) as geom
                 FROM DUAL) a;
       SELECT mdsys.vertex_type(a.x,a.y,a.z,a.w,a.v5,a.v6,a.v7,a.v8,a.v9,a.v10,a.v11,a.id) as vertex
         FROM TABLE(mdsys.sdo_util.getVertices(mdsys.sdo_geometry(2002,null,null,sdo_elem_info_array(1,2,1),sdo_ordinate_array(1,1,2,2)))) a;
    9. A dialog appears at the end of each export which details (eg total) what was exported when the exported recordset/table contains more
       than on shape type. For example, if you export only points eg 2001/3001 from a table that also contains multipoints eg 2005/3005 then
       the number of points exported, and multipoints skipped will be displayed.
    10. SHP/TAB export is "transactional". If you set the commit interval to 100 then only 100 records are held in memory before writing.
        However, this does not currently apply to the associated DBASE records.
    11. SHP/TAB export supports dBase III, dBase III + Memo, dBase IV and dBase IV + Memo.
        Note: Memo allows text columns > 255 characters to be exported. Non-Memo formats do not and any varchar2 columns will be truncated
        to 255 chars. Some GIS packages support MEMO eg Manifold GIS, some do not.
    12. Note. GeoRaptor does not ensure that the SRID of SDO_GEOMETRY data exported to KML is in the correct Google Projection.
        Please read the Oracle documentation on how to project your data is this is necessary. An example is:
        SELECT OBJECTID,
               CODIGO as name,
               NOME as description,
               MI_STYLE,
               SDO_CS.TRANSFORM(shape,'USE_SPHERICAL',4055) as shape
          FROM MUB.REGIONAL;
    13. NOTE: The SHP exporter uses the Java Topology Suite (JTS) to convert from SDO_GEOMETRY to the ESRI Shape format. JTS does not handle
        circular curves in SDO_GEOMETRY objects you must "stroke" them using sdo_util.arc_densify(). See the Oracle documentation on how
        to use this.
    Miscellaneous.
    1. Selection View - Measurement has been modified so that the final result only shows those geometry
       types that were actually measured.
    2. In Layer Properties the Miscellaneous tab has been removed because the only elements in it were the
       Geometry Output options which have now been replaced by the new GML/KML/etc export capabilities.
    3. Shapefile import's user entered tablename now checked for Oracle naming convention compliance.
    4. Identify based on SDO_NN has been removed from GeoRaptor given the myriad problems that it seems to create across versions
       and partitioned/non-partitioned tables. Instead SDO_WITHIN_DISTANCE is now used with the actual search distance (see circle
       in map display): everything within that distance is returned.
    5. Displaying/Not displaying embedded sdo_point in line/polygon (Jamie Keene), is now controlled by
       a preference.
    6. New View Menu options to switch all layers on/off
    7. Tools/Preferences/GeoRaptor layout has been improved.
    8. If Identify is called on a geometry a new right mouse click menu entry has been added called "Mark" which
       has two sub-menus called ID and ID(X,Y) that will add the labeling to the selected geometry independently of
       what the layer is set to being.
    9. Two new methods for rendering an SDO_GEOMETRY object in a table or SQL recordset have been added: a) Show geometry as ICON
       and b) Show geometry as THUMBNAIL. When the latter is chosen, the actual geometry is shown in an image _inside_ the row/column cell it occupies.
       In addition, the existing textual methods for visualisation: WKT, KML, GML etc have been collected together with ICON and THUMBNAIL in a new
       right mouse click menu.
    10. Tables/Views/MViews without spatial indexes can now be added to a Spatial View. To stop large tables from killing rendering, a new preference
        has been added "Table Count Limit" (default 1,000) which controls how many geometry records can be displayed. A table without a spatial
        index will have its layer name rendered in Italics and will write a warning message in red to the status bar for each redraw. Adding an index
        which the layer exists will be recognised by GeoRaptor during drawing and switch the layer across to normal rendering.
    Some Bug Fixes.
    * Error in manage metadata related to getting metadata across all schemas
    * Bug with no display of rowid in Identify results fixed;
    * Some fixes relating to where clause application in geometry validation.
    * Fixes bug with scrollbars on view/layer tree not working.
    * Problem with the spatial networks fixed. Actions for spatial networks can now only be done in the
      schema of the current user, as it could happen that a user opens the tree for another schema that
      has the same network as in the user's schema. Dropping a drops only the network of the current connected user.
    * Recordset "find sdo_geometry cell" code has been modified so that it now appears only if a suitable geometry object is
      in a recordset.  Please note that there is a bug in SQL Developer (2.1 and 3.0) that causes SQL Developer to not
      register a change in selection from a single cell to a whole row when one left clicks at the left-most "row number"
      column that is not part of the SELECT statements user columns, as a short cut to selecting a whole row.  It appears
      that this is a SQL Developer bug so nothing can be done about it until it is fixed. To select a whole row, select all
      cells in the row.
    * Copy to clipboard of SDO_GEOMETRY with M and Z values forgot has extraneous "," at the end.
    * Column based colouring of markers fixed
    * Bunch of performance improvements.
    * Plus (happily) others that I can't remember!If you find any bugs register a bug report at our website.
    If you want to help with testing, contact us at our website.
    My thanks for help in this release to:
    1. John O'Toole
    2. Holger Labe
    3. Sandro Costa
    4. Marco Giana
    5. Luc van Linden
    6. Pieter Minnaar
    7. Warwick Wilson
    8. Jody Garnett (GeoTools bug issues)
    Finally, when at the Washington User Conference I explained the willingness of the GeoRaptor Team to work
    for some sort of integration of our "product" with the new Spatial extension that has just been released in SQL
    Developer 3.0. Nothing much has come of that initial contact and I hope more will come of it.
    In the end, it is you, the real users who should and will decide the way forward. If you have ideas, wishes etc,
    please contact the GeoRaptor team via our SourceForge website, or start a "wishlist" thread on this forum
    expressing ideas for future functionality and integration opportunities.
    regards
    Simon
    Edited by: sgreener on Jun 12, 2011 2:15 PM

    Thank you for this.
    I have been messing around with this last few days, and i really love the feature to pinpoint the validation errors on map.
    I has always been so annoying to try pinpoint these errors using some other GIS software while doing your sql.
    I have stumbled to few bugs:
    1. In "Validate geometry column" dialog checking option "Use DimInfo" actually still uses value entered in tolerance text box.
    I found this because in my language settings , is the decimal operators
    2. In "Validate geometry column" dialog textboxs showing sql, doesn't always show everything from long lines of text (clipping text from right)
    3. In "Validate geometry column" dialog the "Create Update SQL" has few bugs:
    - if you have selected multiple rows from results and check the "Use Selected Geometries" the generated IN-clause in SQL with have same rowid (rowid for first selected result) for all entries
    Also the other generated IN clause in WHERE-clause is missing separator if you select more than one corrective function
    4. "Validate geometry column" dialog stays annoyingly top most when using "Create Update SQL" dialog

  • What's the best out-of-the-box web interface for a SQL DB?

    I'm developing a Java web application that will be backed by an Oracle database. Users would like a simple web interface that allows them to accomplish what they could with SQL queries without knowing SQL. The basic operations would be:
    * displaying a database table in a table format
    * downloading the table as a text or Excel file
    * customizing the columns in a table display
    * displaying a query result set in a table format
    * constructing a query using drop-down menus
    I'd probably want to program in a simplified UI for a few common queries.
    This really looks like functionality someone should have invented before me. Question: what is the right tool for me to be using? I'm surprised I haven't found something by searching.
    It looks like I could just directly write JSP, but I think something else might be simpler. I think related functionality exists in Spring, but I didn't find exactly what I'm looking for, and Spring brings a lot of other stuff also. Nothing in my application is more complicated than this, so I'd be happy to keep things simple.
    How would you write this?
    Edited by: 1010007 on Jun 5, 2013 7:22 AM

    Welcome to the forum!
    >
    I'm developing a Java web application that will be backed by an Oracle database. Users would like a simple web interface that allows them to accomplish what they could with SQL queries without knowing SQL. The basic operations would be:
    * displaying a database table in a table format
    * downloading the table as a text or Excel file
    * customizing the columns in a table display
    * displaying a query result set in a table format
    * constructing a query using drop-down menus
    I'd probably want to program in a simplified UI for a few common queries.
    This really looks like functionality someone should have invented before me. Question: what is the right tool for me to be using? I'm surprised I haven't found something by searching.
    It looks like I could just directly write JSP, but I think something else might be simpler. I think related functionality exists in Spring, but I didn't find exactly what I'm looking for, and Spring brings a lot of other stuff also. Nothing in my application is more complicated than this, so I'd be happy to keep things simple.
    How would you write this?
    >
    I wouldn't write it. I would just use Oracle's FREE Apex application which does all of that and more and is fully supported even on Oracle's FREE Express edition data database.
    http://www.oracle.com/technetwork/developer-tools/apex/overview/index.html
    >
    About Application Express
    Oracle Application Express (Oracle APEX), formerly called HTML DB, is a fully supported "no-cost" option of the Oracle Database. Oracle Application Express is certified against all editions of the Oracle Database 10.2.0.3 and above, including Oracle Database 10g Express Edition (Oracle XE).
    Oracle Application Express installs as part of the seed database installation with Oracle Database 11g.
    >
    The feature page (http://apex.oracle.com/pls/otn/f?p=4600:6:0) describes some of the major features of Apex
    >
    Browser Based
    Using only a Web browser and limited programming experience you can develop data centric applications in minutes. Browser-based development enables you to develop applications on most computers using only a modern Web browser.
    Rapid Application Development (RAD)
    Use simple wizards and declarative programming to create powerful reporting and data entry applications. You can create applications from spreadsheet uploads, or on existing database tables and views. Oracle Application Express includes SQL Workshop to create and manage the database objects that support your application.
    Application Express Components
    Application Builder - Database Applications
    Application developers use wizards to declaratively assemble applications organized in pages. Page content is organized into regions. Regions can contain text, custom PL/SQL, reports, charts, maps, calendars, web service references or forms. Forms are made up of fields (called items) which can be selected from the multitude of built-in types (such as text fields, text areas, radio groups, select lists, check boxes, date pickers, and popup list of values) or a developer can create their own types using plug-in support. Table update functionality is built-in and PL/SQL can be used to process data. Session state (or application context) is transparently managed and the user interface presentation is separated from the application logic so that the look and feel of an application can be changed simply by selected a different theme.
    Application Builder - Websheets
    Using Websheet Applications, end users can manage structured and unstructured data without developer assistance. Page sections contain unstructured data and are edited using a WYSIWYG editor. Reports provide access to database data by writing SQL. Data Grids can manage structured data without writing SQL. Adding columns, renaming column, and validations are defined using runtime dialogs. Each page and row of data grid data can be annotated with files, tags, notes, and links. Pages can contain sections as well as reports and data grids and all can be linked together providing navigation. All information is searchable and completely controlled by the end-user.
    SQL Workshop
    The SQL Workshop provides tools that enable you to view and manage database objects. Object Browser enables you to use a tree control to view object properties and create new objects. The SQL Command tool enables you to enter ad-hoc SQL. Query Builder enables you to create join queries using drag and drop. SQL Scripts enables you to store and run scripts. The Data Workshop enables you to load and unload text, DML, and spreadsheet data.
    RESTful Services
    RESTful Services allow for the declarative specification of RESTful services mapped to SQL and PL/SQL.
    Team Development
    Team Development helps manage the life-cycle of an application's development. It provides tracking and management of application features, to do entries, bugs, and end user feedback. Team Development is tightly integrated with the Oracle Application Express Application Builder. For example, edit page lists open feedback, bugs, and to do's.
    Administration
    Each Oracle Application Express workspace is a separate application development environment that is fully insulated from other workspaces. The administration component provides workspace management, including services (available schemas, space requests, and preferences), users (both developers and end-users), and workspace activity (page views, login attempts, and developer activity). Access is limited to Oracle Application Express developers who have workspace administration privileges.

  • Sql query to find out the space issues in not able to allocate next extent

    hi,
    i have oracel 11g on linux.
    my datafiles are autoextend off. i am looking for query to make sure the segments does not stop growing by reaching the maximum segment allocated or no free contigous space available in allocating new extent,.
    i need to know periodically the owner,object_name and object type (table or index) which are suffocating for space.
    any ad-hoc sql query exists?
    thanks in advance.

    Connect as sysdba and try..
    To list all objects >100M in size.
    SQL> select owner, segment_type, segment_name, sum(bytes)/(1024*1021) from dba_segments
    group by owner, segment_type, segment_name
    having sum(bytes)/(1024*1021) > 100
    For tablespaces ..
    select tablespace_name, sum(bytes) tablespace_size
    from dba_data_files
    group by tablespace_name
    union all
    select tablespace_name, sum(bytes) tablespace_size
    from dba_temp_files
    group by tablespace_name
    order by tablespace_name

  • SQL Developer 3.x won't horizontal slide with 2 fingers

    My SQL Developer 2.x allowed sliding left & right via 2-fingers. e.g. When looking at a large number of columns (data) in a table.
    SQL Developer 3.x doesn't seem to have a way to enable this - or it doesn't work?
    Is there a workaround or a way to get this working?

    Bryan,
    I made an Early Access release (not an official release) yesterday to make GeoRaptor available to someone in Europe who identified a bug that only shows itself if you try to change the zoom/pan percentage in preferences.
    The bug is caused because I used String.format() in the code and the format string that is supplied (stored as a preference) contains a % symbol on its own which String.format() interprets as a format token and tries to associate the percentage value with it rather than the actual parameter. The bug release contains a changed preference string (the % is "escaped" to be %%). Trivial really. We don't have enough testers.
    I have not heard that the fix worked (though it worked in my testing).
    There was also a minor change to the way GeoRaptor's Java code accesses the database connection associated with a result set generated by an ad-hoc SQL statement or table grid as occasionally GeoRaptor lost the connection. I am hoping for some testing of these two things before pushing for a bug fix release to the current one in the public domain.
    No other work has been commenced on the next release of GeoRaptor as I am writing a book and I have had little communications from any GeoRaptor user about what they would like in a release.
    regards
    Simon

  • Deadlocks - conflicting sqls

    Hi: I am on 10.2.0.3.
    Can someone help me with identifying conflicting sqls in deadlock? Is the first (update) sql waiting while the insert one is locking? If so, why they refer to different tables?
    Dump file /db/dbdump/XXPRD/udump/fsprd_ora_27440.trc
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    ORACLE_HOME = /oracle/app/oracle/product/10.2.0
    System name: HP-UX
    Node name: indxxx17
    Release: B.11.23
    Version: U
    Machine: ia64
    Instance name: XXPRD
    Redo thread mounted by this instance: 1
    Oracle process number: 123
    Unix process pid: 27440, image: oracleXXPRD@indxxx17
    *** SERVICE NAME:(FSPRD) 2009-02-26 10:28:32.262
    *** SESSION ID:(446.2263) 2009-02-26 10:28:32.262
    DEADLOCK DETECTED ( ORA-00060 )
    [Transaction Deadlock]
    The following deadlock is not an ORACLE error. It is a
    deadlock due to user error in the design of an application
    or from issuing incorrect ad-hoc SQL. The following
    information may aid in determining the deadlock:
    Deadlock graph:
    ---------Blocker(s)-------- ---------Waiter(s)---------
    Resource Name process session holds waits process session holds waits
    TX-000a0000-0002a5d5 123 446 X 122 404 X
    TX-000b002a-0001b1ea 122 404 X 123 446 S
    session 446: DID 0001-007B-0000034A session 404: DID 0001-007A-00000278
    session 404: DID 0001-007A-00000278 session 446: DID 0001-007B-0000034A
    Rows waited on:
    Session 404: obj - rowid = 0000D536 - AAANU2AAXAAAAMeAAA
    (dictionary objn - 54582, file - 23, block - 798, slot - 0)
    Session 446: obj - rowid = 00000000 - D/////ADAAAAB0eAAA
    (dictionary objn - 0, file - 192, block - 7454, slot - 0)
    Information on the OTHER waiting sessions:
    Session 404:
    pid=122 serial=59321 audsid=1173413 user: 59/SYSADM
    O/S info: user: SYSTEM, term: INDXXX80, ospid: 2424:4888, machine: ENT\INDXXX80
    program: sqrw.exe
    client info: BGILBERT,2424
    application name: sqrw.exe, hash value=0
    Current SQL Statement:
    UPDATE PS_BI_LOADGL_PROC SET BI_LOAD_GL_STAT = :1 where OPRID = :2 and RUN_CNTL_ID = :3 and SEQ_NUM = :4
    End of information on OTHER waiting sessions.
    Current SQL statement for this session:
    INSERT INTO PS_BI_ACCT_ENTRY (BUSINESS_UNIT,INVOICE,LINE_SEQ_NUM,ACCOUNTING_DT,ACCT_ENTRY_TYPE,DISC_SUR_LVL,DISC_SUR_ID,LINE_DST_SEQ_NUM,TAX_AUTHORITY_CD,D
    ISC_SUR_INDICATOR,BUSINESS_UNIT_GL,LEDGER_GROUP,LEDGER,ACCOUNTING_PERIOD,FISCAL_YEAR,ACCOUNT,ALTACCT,DEPTID,OPERATING_UNIT,PRODUCT,FUND_CODE,CLASS_FLD,PROGRA
    M_CODE,BUDGET_REF,AFFILIATE,AFFILIATE_INTRA1,AFFILIATE_INTRA2,CHARTFIELD1,CHARTFIELD2,CHARTFIELD3,PROJECT_ID,STATISTICS_CODE,MONETARY_AMOUNT,STATISTIC_AMOUNT
    ,OPEN_ITEM_KEY,JRNL_LN_REF,LINE_DESCR,USER1,USER2,USER3,USER4,USER5,JOURNAL_ID,JOURNAL_LINE,BUDGET_HDR_STATUS,BUDGET_LINE_STATUS,KK_TRAN_OVER_FLAG,KK_TRAN_OV
    ER_OPRID,GL_DISTRIB_STATUS,PROCESS_INSTANCE,APPL_JRNL_ID,CURRENCY_CD,FOREIGN_CURRENCY,FOREIGN_AMOUNT,RT_TYPE,RATE_MULT,RATE_DIV,DOC_TYPE,DOC_SEQ_NBR,DOC_SEQ_
    DATE,FROM_ACCRUAL,BUSINESS_UNIT_PC,ACTIVITY_ID,RESOURCE_TYPE,RESOURCE_CATEGORY,RESOURCE_SUB_CAT,ANALYSIS_TYPE,ENTRY_EVENT) select B2.BUSINESS_UNIT, B2.INVOIC
    E, B2.LINE_SEQ_NUM, B2.ACCOUNTING_DT, B2.ACCT_ENTRY_TYPE, B2.DISC_SUR_LVL, B2.DISC_SUR_ID, B2.LINE_DST_SEQ_NUM, B2.TAX_AUTHORITY_CD, B2.DISC_SUR_INDICATOR, B
    2.BUSINESS_UNIT_GL, B2.LEDGER_GROUP, B2.LEDGER, B2.ACCOUNTING_PERIOD, B2.FISCAL_YEAR, B2.ACCOUNT,B2.ALTACCT,B2.DEPTID,B2.OPERATING_UNIT,B2.PRODUCT,B2.FUND_CO
    DE,B2.CLASS_FLD,B2.PROGRAM_CODE,B2.BUDGET_REF,B2.AFFILIATE,B2.AFFILIATE_INTRA1,B2.AFFILIATE_INTRA2,B2.CHARTFIELD1,B2.CHARTFIELD2,B2.CHARTFIELD3,B2.PROJECT_ID
    ,B2.STATISTICS_CODE, B2.MONETARY_AMOUNT, B2.STATISTIC_AMOUNT, B2.OPEN_ITEM_KEY, B2.JRNL_LN_REF, B2.LINE_DESCR, B2.USER1, B2.USER2, B2.USER3, B2.USER4,
    B2.USER5, B2.JOURNAL_ID, B2.JOURNAL_LINE, 'V', 'V', ' ', ' ', 'N', 319204, B2.APPL_JRNL_ID, B2.CURRENCY_CD, B2.FOREIGN_CURRENCY, B2.FOREIGN_AMOUN
    T, B2.RT_TYPE, B2.RATE_MULT, B2.RATE_DIV, B2.DOC_TYPE, B2.DOC_SEQ_NBR, B2.DOC_SEQ_DATE, B2.FROM_ACCRUAL, B2.BUSINESS_UNIT_PC, B2.ACTIVITY_ID, B2.RESOU
    RCE_TYPE, B2.RESOURCE_CATEGORY, B2.RESOURCE_SUB_CAT, B2.ANALYSIS_TYPE, B2.ENTRY_EVENT from PS_BI_ACCT_LN_STG B2, PS_BI_LDGL_TMP D2 where B2.BUSINESS_UN
    IT = D2.BUSINESS_UNIT and B2.INVOICE = D2.INVOICE and B2.BUSINESS_UNIT = :1 and B2.ACCT_ENTRY_TYPE = 'AR' and
    D2.PROCESS_INSTANCE = :2
    ===================================================
    PROCESS STATE
    Process global information:
    process: c00000012b3c9698, call: c0000000ad6da080, xact: c000000129b02ab0, curses: c00000012e53f6f8, usrses: c00000012e53f6f8
    SO: c00000012b3c9698, type: 2, owner: 0000000000000000, flag: INIT/-/-/0x00
    (process) Oracle pid=123, calls cur/top: c0000000ad6da080/c0000000ad6da080, flag: (0) -
    int error: 0, call error: 0, sess error: 0, txn error 0
    (post info) last post received: 115 0 4
    last post received-location: kslpsr
    last process to post me: c00000012e3a3c20 1 6
    last post sent: 0 0 24
    last post sent-location: ksasnd
    last process posted by me: c00000012e3a3c20 1 6
    (latch info) wait_event=0 bits=0
    Process Group: DEFAULT, pseudo proc: c00000012b428278
    O/S info: user: oracle, term: UNKNOWN, ospid: 27440
    OSD pid info: Unix process pid: 27440

    Taking a somewhat wild guess:
    Deadlock graph:
                           ---------Blocker(s)--------  ---------Waiter(s)---------
    Resource Name          process session holds waits  process session holds waits
    TX-000a0000-0002a5d5       123     446     X            122     404           X
    TX-000b002a-0001b1ea       122     404     X            123     446           S
    session 446: DID 0001-007B-0000034A     session 404: DID 0001-007A-00000278
    session 404: DID 0001-007A-00000278     session 446: DID 0001-007B-0000034A
    Rows waited on:
    Session 404: obj - rowid = 0000D536 - AAANU2AAXAAAAMeAAA
      (dictionary objn - 54582, file - 23, block - 798, slot - 0)
    Session 446: obj - rowid = 00000000 - D/////ADAAAAB0eAAA
      (dictionary objn - 0, file - 192, block - 7454, slot - 0)If I were to take a guess from the above, session 123 inserted into the child table (or modified a row) and is attemping to insert into the parent table, but was blocked by session 122. Session 122 modified another row in the parent table, but the child table has a missing foreign key index, so the modification of the parent table tried to generate a mode 4 share lock on the child table, but is blocked due to the mode 6 exclusive row lock on the child table acquired by session 123. The mode 4 share lock may be caused by other problems including potential duplicate values in a primary/unique column (should the other session commit), a problem with initrans, bitmap indexes, a session trying to modify a row already modified by another session, or a handful of other problems.
    If you search the forum, I have previously posted a couple different deadlock graphs and the SQL code that I used to generate those deadlock graphs. You might find an exact match for the above pattern.
    Charles Hooper
    IT Manager/Oracle DBA
    K&M Machine-Fabricating Inc.
    Edited by: Charles Hooper on Mar 3, 2009 7:46 PM
    See (/* Test 4 - Transaction table that does not use a sequence contributes to the problem */):
    Re:  Deadlock ( holds: S, waits: SSX )

  • Why did Oracle remove GUI version of SQL*PLUS from 11g client?

    SQLPLUSW.exe is a very handy tool for running ad hoc SQL, performance is much better than SQL Developer

    Hello,
    sqlplus.exe is still available.

  • Using stored procedure vs ad hoc query

    Dears,
    I am using Visual Studio 2003 with Oracle. It is said that we can performance benefits by using SPs. Definitly it will have some drawbacks as well. Some peoples says we should write everything in SP even simple select/insert. Others beleive using SP only when lengthy manipulation is reqd. So i want i know when one should use SPs.
    Thanx in Advance,

    I know Sql Server supportes parameterized queries,
    but I was under the impression that in doing so the
    query is "hard-parsed" each time the request is sent,
    where as Oracle will cache the execution plan.Actually SQL has some pretty sophisiticated mechanisms for storing and reusing query plans even when the clients send nothing but ad-hoc SQL.
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql7/html/sqlquerproc.asp
    And so SQL doesn't really suffer as badly from un-parameritized queries as Oracle.
    >
    Where I am still hung up, when porting to Oracle from
    Sql Server, is when multiple rows are returned (using
    .net as the application and presentation layers). I
    have read that the oracle sp must return a ref
    cursor, which is a poor performer. Ref cursors are fine. Their performance is good, but that doesn't really even matter since they are the only game in town. If you are porting SQL Server stored procedures, then you probably can't live without return result sets from stored procedures. To do that in Oracle, you are going to have to use ref cursors. It'll cost you some soft parses, but it's really a small price. Really.
    >
    For methods that create or update data (no result,
    except maybe an output variable in some cases), or
    return a single row (such as fetching by rowID), use
    a stored proc.
    For methods that return multiple rows, use a select
    statement with binding.I think you're a bit too woried about performance. If you have a good logical design, and take some care with the physical design (you have a ton of choices in Oracle you didn't have in SQL Server), and use either parameritized queries or stored procedures your performance will be 99% of what it could be.
    For everything else, make your code as simple and easy to live with as possible.
    David

  • How To Do???  Text1: SQL Query..... Text2: Query Result

    Hi All!!!!!!!!!!
    My user required a form where he could write sql command and he requires
    return data on same form in a text field i.e.
    Select empno, ename
    From emp
    where deptno= 10
    Output:
    EMPNO ENAME
    1001 XYZ
    1002 ABC
    SOME ONE HAVE ANY IDEA HOW TO DO.....
    Message was edited by:
    rashad980
    Message was edited by:
    rashad980

    You will need to use Exec_SQL, NOT DBMS_SQL, since Oracle does not support using DBMS_SQL from Forms.  If you were to do this from scratch, it would take you weeks... No, change that to months!
    <p>There is a form called Tadpole, and the fmb is available.  The author is a sharp fellow named Gary Myers.  You can enter a select statement in one area, and the results are displayed like a spreadsheet below.
    <p>Here is the link:<br>    Tadpole: Form for Ad-Hoc SQL
    <p>If the above link requires a login, here is the full sequence of links.  I thought you could get in there as a guest.  If not, then somewhere it should allow you to sign up and then log in.<br>Start with this:  www.quest-pipelines.com<br>
    Click on the Oracle picture.<br>
    Click on PL/SQL Discussion Forum<br>
    Scroll down and click on Oracle Tools - Forms, Reports, Etc.<br>
    Scroll down and click on Tadpole: Form for Ad-Hoc SQL.  Date on the topic is 08/02/05 (02 Aug 2005)

  • Imminent Release of new GeoRaptor Version

    Folks,
    I am pleased to announce, after 4 months of development and testing, that a new release of GeoRaptor should be released hopefully before
    the 2011 Oracle Spatial User Conference in Washington DC this Thursday 19th.
    The release manager will make that release but firstly we have to work out how to handle support for SQL Developer 2.1 (which a lot of you
    use) and 3.0 (which has recently been released). The reason for this is that the SQL Developer team changed some API calls such that
    we have to make separate compilations. We are not sure how to support these within the SQL Developer extensions distribution framework.
    It may be that we support download of the 3.0 version via the Oracle extension publication mechanism and the 2.1 version via direct download
    from our Sourceforge website. We will inform you when this has been resolved.
    No release notes have been compiled as the principal developer (oops, that's me!) will be leaving Australia tomorrow to attend the DC User Conference.
    More extensive notes (with images) will be compiled when I get back.
    We are still looking for people to:
    1. Provide translations of the English dialog menus etc.
    2. Write more extensive user documentation. If you use a particular part of GeoRaptor a lot and think you have found out all its functionality and quirks, contact
    us and offer to write a few pages of documentation on it. (Open Office or Microsoft Word is fine.)
    Here are the things that are in the next release.
    New functionality:
    Overhaul of Validation Functionality.
    1. User can specify own validation SELECT SQL as long as it returns three required columns. The SQL is thus totally editable.
    2. Validation update code now allows user to associate a PL/SQL function with an error number which is applied in the UPDATE SQL.
    3. UPDATE SQL can use WHERE clause of validation SELECT SQL (1) to update specific errors.
       NOTE: The generated UPDATE statement can be manually edited. It is NEVER run by GeoRaptor. To run any UPDATE, copy the statement
       to the clipboard and run in an appropriate SQL Worksheet session within SQL Developer.
    4. Main validation table allows:
       a. Sorting (click on column header) and
       b. Filtering.
       c. Copying to Clipboard via right mouse click sub menu of:
          - Geometry's SDO_ELEM_INFO array constructor.
          - SDO_GEOMETRY constructor
          - Error + validation string.
       d. Access to Draw/Zoom functions which were previously buttons.
       e. Added a new right mouse click menu "Show Feature's Individual Errors" that gathers up all the errors
          it can process - along with the ring / element that is host to the error (if it can) - and displays
          them in the Attribute/Geometry tabs at the bottom of the Map Window (where "Identify" places its results).
          The power of this will be evident to all those who have wanted a way of stepping through errors in a geometry.
       f. Selected rows can now be deleted (select rows: press <DELETE> key or right mouse click>Delete).
       g. Table now has only one primary key column, and has a separate error column holding the actual error code.
       h. Right mouse click men added to table menu to display description of error in the new column (drawn from Oracle documentation)
       i. Optimisations added to improve performance for large error lists.
    5. Functionality now has its own validation layer that is automatically added to the correct view.
       Access to layer properties via button on validation dialog or via normal right mouse click in view/layer tree.
    Improved Rendering Options.
    1. Linestring colour can now be random or drawn from column in database (as per Fill and Point colouring)
    2. Marking of SDO_GEOMETRY objects overhauled.
       - Ability to mark or LABEL vertices/points of all SDO_GEOMETRY types with coordinate identifier and
         option {X,Y} location. Access is via Labelling tab in layer>properties. Thus, coordinate 25 of a linestring
         could be shown as: <25> or {x,y} or <25> {x,y}
       - There is a nice "stacked" option where the coordinate {x,y} can be written one line below the id.
       - For linestrings and polygons the <id> {x,y} label can be oriented to the angle between the vectors or
         edges that come in, and go out of, a vertex. Access is via "Orient" tick box in Labelling tab.
       - Uses Tools>Preferences>GeoRaptor>Visualisation>SDO_ORDINATE_ARRAY bracket around x,y string.
    3. Start point of linestring/polygon and all other vertices can be marked with user selectable point marker
       rather than previously fixed markers.
    4. Can now set a NULL point marker by selecting "None" for point marker style pulldown menu.
    5. Positioning of the arrow for linestring/polygons has extra options:
       * NONE
       * START    - All segments of a line have the arrow positioned at the start
       * MIDDLE   - All segments of a line have the arrow positioning in the middle.
       * END      - All segments of a line have the arrow positioning in the END.
       * END_ONLY - Only the last segment has an arrow and at its end.
    ScaleBar.
    1. A new graphic ScaleBar option has been added for the map of each view.
       For geographic/geodetic SRIDs distances are currently shown in meters;
       For all SRIDs an attempt is made to "adapt" the scaleBar units depending
       on the zoom level. So, if you zoom right in you might get the distance shown
       as mm, and as you zoom out, cm/m/km as appropriate.
    2. As the scaleBar is drawn, a 1:<DEMONINATOR> style MapScale value is written
       to the map's left most element in the status bar.
    3. ScaleBar and MapScale can be turned off/on in View>Properties right mouse
       click menu.
    Export Capabilities.
    1. The ability to export a selection from a result set table (ie result of
       executing ad-hoc SQL SELECT statement to GML, KML, SHP/TAB (TAB file
       adds TAB file "wrapper" over SHP) has been added.
    2. Ability to export table/view/materialised view to GML, KML, SHP/TAB also
       added. If no attributes are selected when exporting to a SHP/TAB file, GeoRaptor
       automatically adds a field that holds a unique row number.
    3. When exporting to KML:
       * one can optionally export attributes.
       * Web sensitive characters < > & etc for KML export are replaced with &gt; &lt; &amp; etc.
       * If a column in the SELECTION or table/view/Mview equals "name" then its value is
         written to the KML tag <name> and not to the list of associated attributes.
         - Similarly for "description" -> <description> AND "styleUrl" -> <styleUrl>
    4. When exporting to GML one can optionally export attributes in FME or OGR "flavour".
    5. Exporting Measured SDO_GEOMETRY objects to SHP not supported until missing functionality
       in GeoTools is corrected (working with GeoTools community to fix).
    6. Writing PRJ and MapInfo CoordSys is done by pasting a string into appropriate export dialog box.
       Last value pasted is remembered between sessions which is useful for users who work with a single SRID.
    7. Export directory is remembered between sessions in case a user uses a standard export directory.
    8. Result sets containing MDSYS.SDO_POINT and/or MDSYS.VERTEX_TYPE can also be written to GML/KML/SHP/TAB.
       Example:
       SELECT a.geom.sdo_point as point
         FROM (SELECT sdo_geometry(2002,null,sdo_point_type(1,2,null),sdo_elem_info_array(1,2,1),sdo_ordinate_array(1,1,2,2)) as geom
                 FROM DUAL) a;
       SELECT mdsys.vertex_type(a.x,a.y,a.z,a.w,a.v5,a.v6,a.v7,a.v8,a.v9,a.v10,a.v11,a.id) as vertex
         FROM TABLE(mdsys.sdo_util.getVertices(mdsys.sdo_geometry(2002,null,null,sdo_elem_info_array(1,2,1),sdo_ordinate_array(1,1,2,2)))) a;
    9. A dialog appears at the end of each export which details (eg total) what was exported when the exported recordset/table contains more
       than on shape type. For example, if you export only points eg 2001/3001 from a table that also contains multipoints eg 2005/3005 then
       the number of points exported, and multipoints skipped will be displayed.
    10. SHP/TAB export is "transactional". If you set the commit interval to 100 then only 100 records are held in memory before writing.
        However, this does not currently apply to the associated DBASE records.
    11. SHP/TAB export supports dBase III, dBase III + Memo, dBase IV and dBase IV + Memo.
        Note: Memo allows text columns > 255 characters to be exported. Non-Memo formats do not and any varchar2 columns will be truncated
        to 255 chars. Some GIS packages support MEMO eg Manifold GIS, some do not.
    12. Note. GeoRaptor does not ensure that the SRID of SDO_GEOMETRY data exported to KML is in the correct Google Projection.
        Please read the Oracle documentation on how to project your data is this is necessary. An example is:
        SELECT OBJECTID,
               CODIGO as name,
               NOME as description,
               MI_STYLE,
               SDO_CS.TRANSFORM(shape,'USE_SPHERICAL',4055) as shape
          FROM MUB.REGIONAL;
    13. NOTE: The SHP exporter uses the Java Topology Suite (JTS) to convert from SDO_GEOMETRY to the ESRI Shape format. JTS does not handle
        circular curves in SDO_GEOMETRY objects you must "stroke" them using sdo_util.arc_densify(). See the Oracle documentation on how
        to use this.
    Miscellaneous.
    1. Selection View - Measurement has been modified so that the final result only shows those geometry
       types that were actually measured.
    2. In Layer Properties the Miscellaneous tab has been removed because the only elements in it were the
       Geometry Output options which have now been replaced by the new GML/KML/etc export capabilities.
    3. Shapefile import's user entered tablename now checked for Oracle naming convention compliance.
    4. Identify based on SDO_NN has been removed from GeoRaptor given the myriad problems that it seems to create across versions
       and partitioned/non-partitioned tables. Instead SDO_WITHIN_DISTANCE is now used with the actual search distance (see circle
       in map display): everything within that distance is returned.
    5. Displaying/Not displaying embedded sdo_point in line/polygon (Jamie Keene), is now controlled by
       a preference.
    6. New View Menu options to switch all layers on/off
    7. Tools/Preferences/GeoRaptor layout has been improved.
    8. If Identify is called on a geometry a new right mouse click menu entry has been added called "Mark" which
       has two sub-menus called ID and ID(X,Y) that will add the labeling to the selected geometry independently of
       what the layer is set to being.
    Some Bug Fixes.
    * Error in manage metadata related to getting metadata across all schemas
    * Bug with no display of rowid in Identify results fixed;
    * Some fixes relating to where clause application in geometry validation.
    * Fixes bug with scrollbars on view/layer tree not working.
    * Problem with the spatial networks fixed. Actions for spatial networks can now only be done in the
      schema of the current user, as it could happen that a user opens the tree for another schema that
      has the same network as in the user's schema. Dropping a drops only the network of the current connected user.
    * Recordset "find sdo_geometry cell" code has been modified so that it now appears only if a suitable geometry object is
      in a recordset.  Please note that there is a bug in SQL Developer (2.1 and 3.0) that causes SQL Developer to not
      register a change in selection from a single cell to a whole row when one left clicks at the left-most "row number"
      column that is not part of the SELECT statements user columns, as a short cut to selecting a whole row.  It appears
      that this is a SQL Developer bug so nothing can be done about it until it is fixed. To select a whole row, select all
      cells in the row.
    * Copy to clipboard of SDO_GEOMETRY with M and Z values forgot has extraneous "," at the end.
    * Column based colouring of markers fixed
    * Bunch of performance improvements.
    * Plus (happily) others that I can't remember!If you find any bugs register a bug report at our website.
    If you want to help with testing, contact us at our website.
    regards
    Simon

    Hi buddy,
    > Yes, it is: Intel site not Toshiba, I'm sorry!
    No problem but not its clear what we talk about ;)
    > why Toshiba don't pretest latest driver and I must install it on my own risk? The last update is from 1,5 years ago...
    I think because Tecra A10 is older model and there is already a successor on the market, Tecra A11.
    Well, dont worry about this. Usually the Intel drivers also work. I have tested this on my Satellite U400 and its running with Intel display driver. No problems so installation is worth a try.
    Please send some feedback after Intel display driver installation, its really interesting! :)

  • Deadlock detected...without any info after"Information on the OTHER waiting

    i got ORA-00060: Deadlock detected.
    My trace file is as the follow:
    Current SQL statement for this session:
    UPDATE APPLSYS.FND_FORMULA_PARAMETERS SET PARAM_NAME_FRPAR = :B5 , DESC_PARAM_FRPAR = :B4 , TYPE_FRPAR = :B3 , INOUT_FRPAR = :B2 WHERE FRML_FRML_ID = :B1 The following deadlock is not an ORACLE error. It is a
    deadlock due to user error in the design of an application
    or from issuing incorrect ad-hoc SQL. The following
    information may aid in determining the deadlock:
    Deadlock graph:
    ---------Blocker(s)-------- ---------Waiter(s)---------
    Resource Name process session holds waits process session holds waits
    TX-00050018-00002c3f 28 501 X 28 501 X
    session 501: DID 0001-001C-00000459     session 501: DID 0001-001C-00000459
    Rows waited on:
    Session 501: obj - rowid = 0000CAD7 - AAAMrXAAFAAAGIQAAE
    (dictionary objn - 51927, file - 5, block - 25104, slot - 4)
    Information on the OTHER waiting sessions:
    End of information on OTHER waiting sessions.
    As you see there isn't any info after *"Information on the OTHER waiting sessions:"*
    what is the cause of this deadlock?

    user13344656 wrote:
    i got ORA-00060: Deadlock detected.
    My trace file is as the follow:
    Current SQL statement for this session:
    UPDATE APPLSYS.FND_FORMULA_PARAMETERS SET PARAM_NAME_FRPAR = :B5 , DESC_PARAM_FRPAR = :B4 , TYPE_FRPAR = :B3 , INOUT_FRPAR = :B2 WHERE FRML_FRML_ID = :B1 The following deadlock is not an ORACLE error. It is a
    deadlock due to user error in the design of an application
    or from issuing incorrect ad-hoc SQL. The following
    information may aid in determining the deadlock:
    Deadlock graph:
    ---------Blocker(s)--------  ---------Waiter(s)---------
    Resource Name          process session holds waits  process session holds waits
    TX-00050018-00002c3f        28     501     X             28     501           X
    session 501: DID 0001-001C-00000459     session 501: DID 0001-001C-00000459
    Rows waited on:
    Session 501: obj - rowid = 0000CAD7 - AAAMrXAAFAAAGIQAAE
    (dictionary objn - 51927, file - 5, block - 25104, slot - 4)
    *Information on the OTHER waiting sessions:*
    *End of information on OTHER waiting sessions.*-----------------------------------------------------------------
    As you see there isn't any info after *"Information on the OTHER waiting sessions:"*
    what is the cause of this deadlock?I believe that what you are seeing is termed a self deadlock. Such a deadlock could be caused by an autonomous transaction.
    Take a look at the following Asktom thread:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1528515465282
    In the above thread, search for: August 24, 2004 - 9am Central time zone
    Read down to at least the comment that was posted on: September 21, 2004 - 2pm Central time zone
    Charles Hooper
    http://hoopercharles.wordpress.com/
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • Deadlock detected  as ORA-00060

    hi,
    deadlock detected in DEV box with below warnings :
    BR0976W Database message alert - level: WARNING, line: 38869, time: 2008-05-12 00.31.38, message:
    ORA-00060: Deadlock detected. More info in file /oracle/DV1/saptrace/usertrace/dv1_ora_1187980.trc .
    BR0280I BRCONNECT time stamp: 2008-05-12 06.20.37
    I checked at OS level also. I found following message :
    DEADLOCK DETECTED ( ORA-00060 )
    The following deadlock is not an ORACLE error. It is a
    deadlock due to user error in the design of an application
    or from issuing incorrect ad-hoc SQL. The following
    information may aid in determining the deadlock:
    Deadlock graph:
    Blocker(s)-- -Waiter(s)--
    Resource Name
    process session holds waits process session holds waits
    TX-0012000c-00003699
    21
    37
    X
    19
    25
    X
    TX-0007001c-000035f9
    19
    25
    X
    21
    37
    X
    session 37: DID 0001-0015-0000000A
    session 25: DID 0001-0013-00000016
    session 25: DID 0001-0013-00000016
    session 37: DID 0001-0015-0000000A
    Rows waited on:
    Session 25: obj - rowid = 0000489B - AAAEibAAfAAAAUTAAE
    (dictionary objn - 18587, file - 31, block - 1299, slot - 4)
    Session 37: obj - rowid = 0000489B - AAAEibAAfAAAAUPAAa
    (dictionary objn - 18587, file - 31, block - 1295, slot - 26)
    Information on the OTHER waiting sessions:
    can anybody help me out for exact solution..
    regards
    Anju

    Hi,
    When you are facing this problem you have to identify the process which is causing the deadlock. You can run DB01 transaction to see the lock waits and deadlocks occured in Database level. So find the PID which is causing the deadlocks, analyze the process what it is doing and its importance by contacting the user who is running the process and then terminate it to resolve the deadlock.
    Regards,
    N.Amarnath

Maybe you are looking for

  • Running a Java program at startup in Linux

    Hello How do I run a Java program at startup in Linux? I know in Windows I can put a .bat file in C:\Windows\Start Menu\Programs\StartUp\ directory, but in Linux I have no idea how it is done. Thank you, Mihai

  • Access from Inside to Outside ASA 5510 ver 9.1

    Hi All, I need some help in getting an ASA up and processing traffic from the inside network to the internet. I have a Cisco 2811 Router behind a Cisco ASA 5510. From the ASA I can ping the 2811 and I can ping IP addresses on the internet. I have upd

  • [SOLVED] Can no longer connect to networks since update

    I have a Realtek RTL8723AE wireless apapter, and since last night (I think caused by an update), I haven't been able to get a connection with it. lspci -v 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723AE PCIe Wireless Network Ada

  • Check printing :-- APP (F110)

    Hi Sapgurus, Could you please tell how to print a check using F110. I have clicked on Schedule print, also a background job is generated but there is no spool with it. Morover when we click on log of payment run, payment run details gives us the summ

  • Nested frames on SDN

    Hi SDN folks, I guess this is not new but may I suggest to enhance usability of the SDN forums by changing the site design to get rid of the nested frames! Forum messages often do not 'line-break' adequately, so one has to scroll to the right to read