Need help about distributed sql statement

Hello everybody
Enviroment:
Oracle 11g R1.
This Database was fine, 'till some days ago that a new system was deployed on other database. New system runs some SELECT querys to a my database using db_links. These statements are blocking some resources and 'cause that they are blocking many users of my database. I can see on Enterprise Manager this wait event : "enq: TM contention".
Now my question is, why are these querys are blocking resources and users if they are only of type SELECT??? I thought that querys that did this were DML and DDL statements.
Does this behavior is related with that those querys are executed by a distributed way (using dblinks)??
Thanks a lot

user652447 wrote:
Distributed Transactions require commit even if a Select. See the following FAQ post from Jonathan Lewis for some basic information.
http://www.jlcomp.demon.co.uk/faq/dblink_commit.html
HTHNot always true though, it depends. The article you are linking to is quite old and covers, as stated, Oracle version(s): 7.0 – 9.2. Whereas the OP is on 11.
http://download.oracle.com/docs/cd/B10500_01/server.920/a96521/ds_txns.htm
In the section "Read-Only Response"
Note that if a distributed transaction is set to read-only, then it does not use rollback segments. If many users connect to the database and their transactions are not set to READ ONLY, then they allocate *rollback space* even if they are only performing queries.
In the OP's version
http://download.oracle.com/docs/cd/E11882_01/server.112/e17120/ds_txns003.htm#ADMIN12226
Note that if a distributed transaction is set to read-only, then it does not use undo segments. If many users connect to the database and their transactions are not set to READ ONLY, then they allocate *undo space* even if they are only performing queries.
However that doesn't account for the types of lock the OP is experiencing.

Similar Messages

  • Need help on my SQL statement

    Hello experts,
    I need to write a dynamic sql statement which will enable users to pick the date and the BI system will take them 3 months back. I tried 3 months variables I kept getting SQL error then I tried 90 days. Now it keep showing that there is no data which for sure I know its not trure.
    This is my statement: +"GL Calendar"."Fiscal Date" >=timestampadd(SQL_TSI_DAY,-90, timestamp'@{ABCcost}{2013-05-16 00:00:00}')AND("GL Calendar"."Fiscal Date">=timestamp'@{ABCcost}{2013-05-16 00:00:00}')+
    Anything that Im missing..

    Rayan,
    I am not sure if I am following you, cause we want to enable the user to pick whatever date and then from there they will get 3 months back and the rest of their info. I tried it didn't work, may be I placed at wrong place
    Can you probably copy my statement above and insert in-between.
    thanks,
    Edited by: 994621 on May 17, 2013 11:28 AM

  • Need help for the sql statement !!!!!

    hi all,
    i need a sql statement for a query, how can i get the result from the rownum between 100 and 150?
    plz help

    use a scrollable statement:
    PreparedStatement stat = Connection.prepareStement("select * from blah", ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_UPDATABLE);
    ResultSet rs = stat.executeQuery();
    rs.absolute(100);
    while (rs.next()) {
    String something = rs.get(1);
    Look into the JDK API reference for ResultSet to get an expalantion of scrollable statements.

  • Need help on coverting sql statement to NamedQueries

    hi, all,
    I have a problem on converting the following SQL statement returning last 10 records from an Oracle database.
    The SQL statement is as followings:
    select * from (select * from TABLE1 where ATT1 = 1 order by ATT2 desc) where rownum<11
    However, how should I convert this statement into NamedQuery?
    Thanks.

    Will the following SQL return the same set of rows for you:
    select * from TABLE1 where ATT1 = 1 order by ATT2 desc limit 1,10
    If so, that query is a lot easier to convert.
    I've never tried to convert a subquery into a NamedQuery. The problem is that you're not just converting to named query, but you're also changing from SQL to EJBQL, and they don't map directly even though the semantics are similar.

  • I need help about distributed systems

    Dear guys...
    I search for answer about these question but not found the answer ,please help me?
    1.What are the main objective and key issues of distributed systems address by Java EE and who can benefit from this system compared to other systems?
    2. what is about Java EE based on distributed system evaluation criteria such as transparencies, reliability, security, performance and etc. I need summary?

    oh .

  • Need help in a sql statement

    Hi, I have some data like the following and I need to get only one row instead of two.
    Current data:
    ID                       Time_Type                       Time
    A_xyz Check_In 2009-02-11 07:00 AM
    A_xyz Check_out 2009-02-12 10:00 AM
    I want it in the following format:
    ID                       Check_in_Time                           Check_out_time
    A_xyz 2009-02-11 07:00 AM 2009-02-12 10:00 AM
    There are about 10 more fields in the table but all other data is same except for the time. Thanks for your help.

    Hi, Yes, I already had queries using max but then I found that I could not use them as I don't know how many time_types there would be. I appologize I should have mentioned this in my first post and had posted some additional info.
    In my example time_types are as check_in and check_out but infact the types are codes and they don't tell if they are check in or check out. All I need is to convert the rows into columns. I can call my columns col1, col2 etc instead of check_in_time and check_out_time.
    Also, I am giving you guys an example but it is exactly same as our real data.
    Thanks again.

  • Need help about switch & case statements

    Dear friends
    I am new student of Java
    Our University gave us project to make a program. Here is the program:
    a- Write a java program ,so the user can input the monthly salary then compute the net salary of an employee after deducting the tax ,use the following table to calculate the tax .Note use switch statement .
    Annual salary Tax
    100- 999 0
    1000- 1999 5%
    2000- 3999 7%
    4000- 7000 10%
    7000 13%Please help me how could I use switch statement.
    All I know about switch statement is that I have use Integers for selection.
    Kindly help me. I have only 2 days to submit my assignment.
    Thanks in Advance
    Edited by: syedejaz on Aug 13, 2008 8:09 AM
    Edited by: syedejaz on Aug 13, 2008 8:10 AM

    Hello every body:
    I tried to make my first program using if then else but the problem is that no calcuation is happinig
    /*  TMA01 ITC250, Part-III, a
      Program which gets input monthly salary and shows net salary after deducting given tax.
    File: netSalary.java
    import javax.swing.*;
    import java.text.*;
    public class netSalary {
    public static void main(String[] args) {
           int Salary=0,Tax=0,monthlySalary=0;
           monthlySalary= Integer.parseInt(JOptionPane.showInputDialog(null, "Enter Monthly Salary:"));
           if ((monthlySalary>=100) && (monthlySalary<=999)) {
                Tax = (monthlySalary*(0/100));
          Salary = (monthlySalary-Tax);
         JOptionPane.showMessageDialog(null, "Net Salary is:" +Salary);
            } else if ((monthlySalary>=1000) && (monthlySalary<=1999)) {
                Tax = (monthlySalary*(5/100));
         Salary = (monthlySalary-Tax);
         JOptionPane.showMessageDialog(null, "Net Salary is:" +Salary);
            } else if (monthlySalary>=2000 && monthlySalary<=3999) {
                Tax = (monthlySalary*(7/100));
         Salary = (monthlySalary-Tax);
         JOptionPane.showMessageDialog(null, "Net Salary is:" +Salary);
            } else if (monthlySalary>=4000 && monthlySalary<=7000) {
                Tax = (monthlySalary*(10/100));
         Salary = (monthlySalary-Tax);
         JOptionPane.showMessageDialog(null, "Net Salary is:" +Salary);
            } else {
                Tax = (monthlySalary*(13/100));
         Salary = (monthlySalary-Tax);
         JOptionPane.showMessageDialog(null, "Net Salary is:" +Salary);
    } The tax is not detuting. please tell me the mistake
    Edited by: syedejaz on Aug 13, 2008 2:49 PM

  • Need help about MS SQL Gate with Mess Code Data

    My Database is Oracle9i, and select * from nls_database_parameters with fellow table params
    PARAMETER VALUE
    1 NLS_CSMIG_SCHEMA_VERSION 3
    2 NLS_NCHAR_CHARACTERSET AL16UTF16
    3 NLS_LANGUAGE AMERICAN
    4 NLS_TERRITORY AMERICA
    5 NLS_CURRENCY $
    6 NLS_ISO_CURRENCY AMERICA
    7 NLS_NUMERIC_CHARACTERS .,
    8 NLS_CHARACTERSET UTF8
    9 NLS_CALENDAR GREGORIAN
    10 NLS_DATE_FORMAT DD-MON-RR
    11 NLS_DATE_LANGUAGE AMERICAN
    12 NLS_SORT BINARY
    13 NLS_TIME_FORMAT HH.MI.SSXFF AM
    14 NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    15 NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZH:TZM
    16 NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZH:TZM
    17 NLS_DUAL_CURRENCY $
    18 NLS_COMP BINARY
    19 NLS_LENGTH_SEMANTICS BYTE
    20 NLS_NCHAR_CONV_EXCP FALSE
    21 NLS_RDBMS_VERSION 9.2.0.5.0
    22 NLS_SAVED_NCHAR_CS WE8ISO8859P1
    and confing access ms sql with oracle gate by ODBC, and the ms sql characterset with Chinese_PRC_CS_AI, Chinese_PRC_CS_AS.
    my pc NLS_LANG=AMERICAN_AMERICA.ZHS16GBK.
    when i query oracle database chinese data is ok, but when access the chinese data in ms sql will be ????(mess code data)?
    How can i confing to access mssql chinese data be normal format, pls ?
    Edited by: Rain.zhang on 2008-10-8 下午3:15

    hi llturro,
    Thanks for answering my question. I have tried out what you suggested, but I still can't fix my problem. The following are the messages that display when I try to run my servlet. It seems that the DataSource, Connection and Statement are ok, however when it comes to the ResultSet the error message appear. What's wrong with my ResultSet coding ?
    ResultSet rs = stat.executeQuery("SELECT ISBN FROM BOOKSINFO WHERE ISBN='"+primarykey+"'");
    setEntityContext Method
    Find by primary key
    DataSource OK
    Connection OK
    Primary Key = 013-00-675721-9
    Statement OK
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.RemoteException: Unknown Exception/Error thrown by EJB method.; nested exception is:
    java.lang.NullPointerException
    java.rmi.RemoteException: Unknown Exception/Error thrown by EJB method.; nested exception is:
    java.lang.NullPointerException
    java.lang.NullPointerException
    <<no stack trace available>>

  • Need help about ref cursor using like table

    Hi Guys...
    I am devloping package function And i need help about cursor
    One of my function return sys_refcursor. And the return cursor need to be
    join another table in database . I don't have to fetch all rows in cursor
    All i need to join ref cursor and another table in sql clause
    like below
    select a.aa , b.cc form ( ref_cursor ) A, table B
    where A.dd = B.dd
    I appeciate it in advance

    My understanding is that you have a function that returns a refcursor and is called by a java app.
    Because this is a commonly used bit of code, you also want to reuse this cursor in other bits of sql and so you want to include it like table in a bit of sql and join that refcursor to other tables.
    It's not as easy as you might hope but you can probably achieve this with pipelined functions.
    Is it a direction that code should be going down? yes, eventually. I like the idea of pulling commonly used bits of code into a SQL statement especially into the WITH section, provided it could be used efficiently by the CBO.
    Is it worth the effort given what you have to do currently to implement it? possibly not.
    what else could you do? construct the sql statement independently of the thing that used it and reuse that sql statement rather than the refcursor it returns?
    Message was edited by:
    dombrooks

  • Need help creating valid XHTML statement

    Hi -
    This is for a homework assignment that requires valid XHTML (I have to validate the dynamically generated HTML). Everything is great with the servlet except the statements where I "echo" the user input.
    The user inputs several values (loan calculator servlet), hits submit and if the values are valid inputs, the servlet returns the amount of the monthly payment. It also displays the inputs in case the user wants to change one of them (loan amount, interest rate or term of the loan).
    The servlet output is fine but my problem is in validating the html. The W3C validator shows an error on the lines where I'm echoing the original inputs.
    Here's my code that generates the html:
    out.println("<td><input type=\"text\" name=\"amount\" value=" + amount + "><br/></td>");Here's the html line that is output:
    <td><input type="text" name="amount" value=783745.43><br/></td>For this to be valid XHTML, the value needs to be in quotes. For example, that parameter should be value="783745.43".
    This is the error that the validator produces:
    Error Line 16 column 43: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.
    <td><input type="text" name="amount" value=783745.43><br/></td>The 'shorttag' and 'omittag' make no sense to me; I haven't found a decent reference yet on how to use them.
    I've tried multiple combinations of escape sequences but have had no success. Can anybody point out what I'm overlooking?
    Thanks in advance.

    I have understand about the SQL statement.
    My problem is like this. I have 3 variable. I have a table with 3 field.
    How can I use those variable to reftrieve value from my select statement?
    How can I use those variable to send value to my update or insert statement?
    sample statement:
    - select F1, F2, F3 from T where F1 = V1
    - insert into F1, F2, F3 values(V1, V2, V3)
    please help, I'm working on my final project in college.
    Thanks before.
    "Sweet devil is still as sweet as ever..."

  • Need help with the session state value items.

    I need help with the session state value items.
    Trigger is created (on After delete, insert action) on table A.
    When insert in table B at least one row, then trigger update value to 'Y'
    in table A.
    When delete all rows from a table B,, then trigger update value to 'N'
    in table A.
    In detail report changes are visible, but the trigger replacement value is not set in session value.
    How can I implement this?

    You'll have to create a process which runs after your database update process that does a query and loads the result into your page item.
    For example
    SELECT YN_COLUMN
    FROM My_TABLE
    INTO My_Page_Item
    WHERE Key_value = My_Page_Item_Holding_Key_ValueThe DML process will only return key values after updating, such as an ID primary key updated by a sequence in a trigger.
    If the value is showing in a report, make sure the report refreshes on reload of the page.
    Edited by: Bob37 on Dec 6, 2011 10:36 AM

  • Need help about Hidden Markov Model model

    I want to make classification for EEG signal using Hidden Markov Model
    algorithm based on neural network.
    plz need help about how to implement this algorithm using LABVIEW.
    if not I want another thing to make classification.
    any one know information about this topic, send me a reply
    thanks

    Have you derrived the HMM that you want to implement?
    If so, post the algorithm and we can provide comments on how to implement it using LabVIEW.
    Message Edited by Ray.R on 04-12-2010 12:54 PM

  • Need help about boot SUNFIRE V120

    Hi all....
    I need help about how to change boot from boot net to boot disk....
    after i installed sun solaris 10 at my sunfire v120, then reboot the machine ... this sunfire still boot from net not from disk...
    can i change it?
    please i really need help ....
    thanks

    If its booted, try "eeprom boot-device=disk"
    If your at the OBP, "setenv boot-device disk".
    If that doesnt work check the value of "diag-switch?".
    It could be booting off the the diag-device instead

  • Need Help about 3D and revolving in illustrator

    I really need help about 3D, Please tell me that How i create 3D in illustrator
    i want to revolve text or shape around any object like this, any plugin? or other software required for this?
    if somebody know this it will be really help full
       http://rcgrafix.fizwig.com/1452732-large.jpg    
       http://rcgrafix.fizwig.com/1384370-large.jpg
       http://rcgrafix.fizwig.com/1062180-large.jpg
    Thanks
    Arsi

    if links are not working try Copy and paste it in to your browser address bar
    thank you

  • Need help about the SHA Message Digest ? & what is use of Message Diagest ?

    need help about the SHA Message Digest ? & what is use of Message Diagest ?
    1>i have one program of making message digest
    2>which requires two files name
    3>one for input like txt
    4> second is out put file of message digest
    can any one tell what is the use of second generated file .

    MessageDigest md = MessageDigest.getInstance("SHA");
    FileInputStream fis = new FileInputStream(args[0]);
    byte[] b = new byte[1024];
    int readed = -1;
    while((readed = fis.read(b)) > 0)
         md.update(b, 0, readed);
    fis.close();
    FileOutputStream fos = new FileOutputStream(args[1]);
    byte[] d = md.digest();
    StringBuffer sb = new StringBuffer();
    for(int i = 0; i < d.length; i++) {
         String str = Integer.toHexString(d[i] & 0xff);
         sb.append(str.length() < 2 ? "0" + str : str);
    fos.write(sb.toString().getBytes());
    fos.close();

Maybe you are looking for

  • Adding crop marks in jpeg export

    Hi All, Is is possible to add crop marks in jpeg export similar to what we have in pdf export. I see SnapshotUtils class but could not see any method to set crop marks. What I need to do to set crop marks? Regards, Alam

  • 11g R1 on Windows 2008 R1 64-bit - Stuck after clicking setup.exe

    I ran setup.exe and it's stuck / hung, consuming a full core. I don't even get the prerequisites window to appear. I'm installing over RDP with a console session with admin rights and I even ran setup.exe as Administrator. The server is running in VM

  • Error Installing Developer suite 10g in windows 7

    hi everyone, I hve installed oracle 11g R.2 in my machine, now when i try to install oracle developer suite 10g directly using setup.exe it becomes not responding. I hve changed the compatibility mode, since getting the same. So i tried with oracle u

  • App Parts require authentication when using other browsers e.g. Safari on iPad

    Hi all I have the SharePoint App Store setup and working correctly and within Internet Explorer I have my App Store domain and my SharePoint domain added as local intranet sites and authentication is not an issue.  Is there a way of removing the requ

  • Creating transaction code for CJE0 reports

    Hi, Can anyone let me know a step by step precess for creating Transaction Code for CJE0 reports? Thanks in Advance.