SELECT SESSIONTIMEZONE FROM DUAL;

Hi,
On 10g , I have :
SELECT SESSIONTIMEZONE FROM DUAL;
SESSIONTIMEZONE                                                            
+01:00                                                                     
1 rows selectedWhich parameter should I change im my session to have :
SESSIONTIMEZONE                                                            
Europe/Paris
1 rows selectedIn documentation it is said :
SESSIONTIMEZONE returns the time zone of the current session. The return type is a time zone offset (a character type in the format '[+|]TZH:TZM') or a time zone region name, depending on how the user specified the session time zone value in the most recent ALTER SESSION statement.
Thank you.

I want to know in which time zone my session is ? Just to know its name but not the offset which is a number. Just to have something like :
select sessiontimezone, current_date from dual;
SESSIONTIMEZONE                                                             CURRENT_DATE             
Europe/Paris                                                                10-JANV.-2012 14:12:14  Without any alter session before, because that will change the settings.
Regards.

Similar Messages

  • JDBC Lookup in PI 7.1 - SELECT ? FROM DUAL and Connection timed out

    Hi,
    We have a scenarios (Idoc to JMS) with JDBC lookup. We have used graphical JDBC lookup functionality.
    We are reading country names for a given country code from SAP in an external database table. The query is so simple. That  should not take much time
    Now the actual issues is,
    When we are executing the scenario, its taking quite a long time. Almost 6 minutes to excute a mapping. Which causing high performance issue in the Porduction.
    We started the inviestigation about found some interesting stuff. Here we have used Willy Introscope for the investigation.
    1. First few messages are taking quite a long time. LIke 6 minutes per messages. As i can see in the log i am getting below error in Willy,
    I dont know why PI is executing below queury apart from real secelt query to fetch the country name. I am getting below error: Error Message: Backends|ABCD2 mydatabase01-1526 (Oracle DB)|SQL|Dynamic|Query|SELECT ? FROM DUAL: java.sql.SQLException: Io exception: Connection timed out
    2. After couple of messages, interface works very normal. I mean rest of the messages works pretty fine.
    Please let me know if you have any idea about this error. What could be the problem for the issue.
    Thank you in advnace.
    Best Regards,
    Prasad.

    Did you check how many SQL requests were executed per one message ? Do you have a log of these SQL requests ?
    I assume that the country table is quite small, so that lookup should not be an issue.
    About this:
    >Message: Backends|ABCD2 mydatabase01-1526 (Oracle DB)|SQL|Dynamic|Query|SELECT ? FROM DUAL: >java.sql.SQLException: Io exception: Connection timed out
    1. I only know SELECT * FROM DUAL, not SELECT ? FROM DUAL. Better use the former
    2. the exception means that the database server can not be reached => check your network configuration
    So I assume that there is a network (performance) problem between PI and this Oracle server. Or the Oracle Server is so overloaded that it has (sometimes) problems in processing new requests.
    CSY
    Edited by: Christian Sy on Mar 9, 2010 10:17 AM

  • Delay due to selecting sysdate from  dual

    Our application accessing dummy table dual frequently for getting current date and time. But some times this could reduce our database performance.
    How could we overcome this problem.
    ASH report_
    Top Events_
    latch: library cache      29.87      "5015593920","214","0"      26.57      address      number      tries
    Top SQL Statements_
    0vnruqfxmtu6q     Select to_number(to_char(Sysdate, 'YYYYMMDD')) from dual

    orianmoon wrote:
    Thanks for your replies,
    Please check this below link which shows my database performance at the time of running a particular sql , which is selecting sysdate using table dual. It created Lbrary cache latch contention.
    http://arun-itadmin.blogspot.com/2010/12/oracle-performance-screen.html
    My question is
    Is this the problem of frequent usage of table dual or usage of 'sysdate' ?
    It there any way to get date and time other than using sysdate function?
    Edited by: orianmoon on Dec 8, 2010 9:42 PMI don't see anything there that points the finger at SELECT SYSDATE FROM DUAL;

  • For j in (select a, (select 1 from dual),c ) loop ..end loop;...... error

    declare
    begin
    for cur in (select (select 1 from dual) col from dual)
    loop
      null;
    end loop;
    end;in TOAD, OK, BUT IN FORM ERROR!
    Edited by: indoracle on Feb 23, 2012 2:38 AM
    Edited by: indoracle on Feb 23, 2012 2:40 AM

    A couple of things.
    First, please take a few minutes to review the following:
    <ul>
    <li>Oracle Forums FAQ
    <li>Before posting on this forum please read
    <li>10 Commandments for the OTN Forums Member
    <li>How to ask questions the smart way
    </ul>
    Following these simple guidelines will ensure you have a positive experience in any forum; not just this one! ;-)
    Using the formating information in the Oracle Forms FAQ, it is always recommended that you put your code samples in the ... tags (use lower case "code") so your code is more readable.
    Second, the use of all capital letters is concidered YELLING. I'm sure you did not intend to YELL at anyone, so please only use capital letters when they are needed, not for everything. :)
    Third, what is your Forms Version? If you look at the *10 Commandments for the OTN Forums Member* you'll see that it is always best to give program version information. Depending on your Forms version, the subquery in your SQL statement may not be supported or it could simply be the Cursor For Loop construct [ FOR j IN ( SQL Statement)...] that is not supported. You may have to declare an explicit cursor and reference the explicit cursor in place of your SQL Statement.
    Forth, your FOR LOOP doesn't do anything!
    LOOPEND LOOP; There is nothing between LOOP and END LOOP. I am going to assume that this is intented and just a point of sanatizing your code because what happens in the loop is not relevant to the error.
    ERROR 103.. This is a Forms internal PL/SQL error; meaning the Forms PL/SQL engine can not parse your code. Again, this is probably because the subquery or cursor FOR loop with (SQL Statement versus explicit cursor) is not supported by your Forms version.
    Please, what is your Forms version and any other information that might be helpful.
    Craig...

  • Select user from dual

    Hi Experts,
    The "select user from dual" causes "library cache: mutex X" contention. Is this normal behaviour? Any bug?
    Thanks for sharing your thoughts.
    Regards,
    Richard

    Hi Gokhan,
    Thanks for your quick reply. We are using Oracle 11g Release 1.
    Thanks in advance.
    Regards,
    Richard
    Additional information:
    SQL
    INST_ID ADDRESS HASH_VALUE SQL_ID COMMAND_TYPE PIECE SQL_TEXT
    1 070000007DD06B78 225524178 d6vwqbw6r2ffk 3 0 SELECT USER FROM DUAL
    wait event:
    P1 P1TEXT P2 P2TEXT P3 P3TEXT SPID PROCESS EVENT WAIT_CLASS
    225524178 idn 0 value 57 where 18772088 819426 library cache: mutex X Concurrency
    225524178 idn 0 value 57 where 17711190 823330 library cache: mutex X Concurrency
    225524178 idn 4.0802E+12 value 57 where 16851142 1237006 library cache: mutex X Concurrency
    mutex_sleep_history ( based on P1-idn)
    BLOCKING
    INST_ID MUTEX_IDENTIFIER SLEEP_TIMESTAMP MUTEX_TYPE GETS SLEEPS REQUESTING_SESSION SID LOCATION MUTEX_VALUE P1 P1RAW P2 P3 P4 P5
    1 225524178 30-APR-11 06.25.28.323644 PM Cursor Pin 895106 38 981 950 kkslce [KKSCHLPIN2] 000003B600000000 0 00 0 0 0
    1 225524178 30-APR-11 06.25.05.143394 PM Cursor Pin 861746 45 969 981 kkslce [KKSCHLPIN2] 000003D500000000 0 00 0 0 0
    1 225524178 30-APR-11 05.26.44.973728 PM Cursor Pin 839251 33 950 980 kkslce [KKSCHLPIN2] 000003D400000001 0 00 0 0 0
    1 225524178 30-APR-11 04.50.46.454100 AM Cursor Pin 135508 4 988 971 kkslce [KKSCHLPIN2] 000003CB00000000 0 00 0 0 0
    1 225524178 30-APR-11 06.20.57.143668 PM Cursor Pin 864272 52 969 970 kkslce [KKSCHLPIN2] 000003CA00000000 0 00 0 0 0
    1 225524178 30-APR-11 06.25.51.204080 PM Cursor Pin 863854 39 950 969 kkslce [KKSCHLPIN2] 000003C900000000 0 00 0 0 0
    1 225524178 30-APR-11 04.54.08.571772 PM Cursor Pin 809666 22 950 928 kkslce [KKSCHLPIN2] 000003A000000000 0 00 0 0 0
    1 225524178 30-APR-11 06.25.49.394176 PM Cursor Pin 864774 29 969 950 kkslce [KKSCHLPIN2] 000003B600000000 0 00 0 0 0
    1 225524178 30-APR-11 06.25.21.093950 PM Cursor Pin 869850 39 950 981 kkslce [KKSCHLPIN2] 000003D500000000 0 00 0 0 0
    1 225524178 30-APR-11 05.27.24.592958 PM Cursor Pin 810896 35 969 980 kkslce [KKSCHLPIN2] 000003D400000000 0 00 0 0 0
    1 225524178 30-APR-11 04.50.01.705574 AM Cursor Pin 116153 12 969 971 kksLockDelete [KKSCHLPIN6] 0000000000000001 0 00 0 0 0
    1 225524178 30-APR-11 06.20.58.644283 PM Cursor Pin 866494 94 981 970 kkslce [KKSCHLPIN2] 00 0 00 0 0 0
    1 225524178 30-APR-11 06.25.23.269811 PM Cursor Pin 892968 28 981 969 kkslce [KKSCHLPIN2] 000003C900000000 0 00 0 0 0
    1 225524178 30-APR-11 04.54.29.441458 PM Cursor Pin 807424 29 950 928 kkslce [KKSCHLPIN2] 000003A000000000 0 00 0 0 0
    1 225524178 30-APR-11 06.25.49.421368 PM Cursor Pin 869598 39 969 950 kkslce [KKSCHLPIN2] 000003B600000000 0 00 0 0 0
    1 225524178 30-APR-11 06.25.33.891107 PM Cursor Pin 891374 36 969 981 kkslce [KKSCHLPIN2] 000003D500000000 0 00 0 0 0
    1 225524178 30-APR-11 05.26.01.979042 PM Cursor Pin 837950 25 970 980 kkslce [KKSCHLPIN2] 000003D400000000 0 00 0 0 0
    2 225524178 29-APR-11 11.30.24.124146 PM Cursor Pin 18857 134 1027 1002 kkslce [KKSCHLPIN2] 000003EA00000000 0 00 0 0 0
    2 225524178 29-APR-11 11.36.33.932762 PM Cursor Pin 2128672 3562 959 1010 kkslce [KKSCHLPIN2] 000003F200000001 0 00 0 0 0
    2 225524178 29-APR-11 11.35.30.576728 PM Cursor Pin 2161583 5145 1010 994 kkslce [KKSCHLPIN2] 000003E200000001 0 00 0 0 0
    2 225524178 29-APR-11 11.30.17.443374 PM Cursor Pin 37186 3 944 946 kkslce [KKSCHLPIN2] 000003B200000000 0 00 0 0 0
    1 225524178 30-APR-11 06.21.09.475763 PM Cursor Pin 864712 29 950 970 kkslce [KKSCHLPIN2] 000003CA00000000 0 00 0 0 0
    1 225524178 30-APR-11 06.25.25.829483 PM Cursor Pin 895066 38 950 969 kkslce [KKSCHLPIN2] 000003C900000000 0 00 0 0 0
    1 225524178 30-APR-11 05.47.15.303972 PM Cursor Pin 858702 34 950 0 kkslce [KKSCHLPIN2] 00 0 00 0 0 0
    1 225524178 30-APR-11 06.25.55.444597 PM Cursor Pin 865178 32 981 950 kkslce [KKSCHLPIN2] 000003B600000000 0 00 0 0 0
    1 225524178 30-APR-11 06.25.51.559740 PM Cursor Pin 864136 39 969 981 kkslce [KKSCHLPIN2] 00 0 00 0 0 0
    1 225524178 30-APR-11 05.27.34.686745 PM Cursor Pin 829040 41 969 980 kkslce [KKSCHLPIN2] 000003D400000000 0 00 0 0 0
    1 225524178 30-APR-11 04.50.18.400633 AM Cursor Pin 145131 9 981 971 kkslce [KKSCHLPIN2] 000003CB00000001 0 00 0 0 0
    1 225524178 30-APR-11 06.19.32.917632 PM Cursor Pin 890128 26 969 970 kkslce [KKSCHLPIN2] 000003CA00000000 0 00 0 0 0
    1 225524178 30-APR-11 06.25.37.957065 PM Cursor Pin 895320 31 950 969 kkslce [KKSCHLPIN2] 000003C900000000 0 00 0 0 0
    1 225524178 30-APR-11 04.54.50.437123 PM Cursor Pin 811647 29 980 928 kksLockDelete [KKSCHLPIN6] 000003A000000002 0 00 0 0 0
    1 225524178 30-APR-11 06.25.55.273357 PM Cursor Pin 895588 31 981 950 kkslce [KKSCHLPIN2] 000003B600000000 0 00 0 0 0
    1 225524178 30-APR-11 06.25.44.996870 PM Cursor Pin 895490 21 950 981 kkslce [KKSCHLPIN2] 000003D500000000 0 00 0 0 0
    1 225524178 30-APR-11 05.26.37.849250 PM Cursor Pin 806046 54 969 980 kkslce [KKSCHLPIN2] 000003D400000000 0 00 0 0 0
    1 225524178 30-APR-11 04.50.44.632959 AM Cursor Pin 131970 8 1026 971 kksLockDelete [KKSCHLPIN6] 000003CB00000002 0 00 0 0 0
    1 225524178 30-APR-11 06.21.09.033790 PM Cursor Pin 863064 82 969 970 kkslce [KKSCHLPIN2] 000003CA00000000 0 00 0 0 0
    1 225524178 30-APR-11 06.25.52.360874 PM Cursor Pin 892624 30 981 969 kkslce [KKSCHLPIN2] 000003C900000000 0 00 0 0 0
    1 225524178 30-APR-11 04.54.42.089257 PM Cursor Pin 810719 33 950 928 kkslce [KKSCHLPIN2] 000003A000000001 0 00 0 0 0
    1 225524178 30-APR-11 06.25.49.124653 PM Cursor Pin 880220 41 969 950 kkslce [KKSCHLPIN2] 000003B600000000 0 00 0 0 0
    1 225524178 30-APR-11 06.25.55.200082 PM Cursor Pin 892892 25 950 981 kkslce [KKSCHLPIN2] 000003D500000000 0 00 0 0 0
    1 225524178 30-APR-11 05.26.12.258306 PM Cursor Pin 807380 46 969 980 kkslce [KKSCHLPIN2] 000003D400000000 0 00 0 0 0
    1 225524178 30-APR-11 04.50.35.378955 AM Cursor Pin 148328 5 1026 971 kkslce [KKSCHLPIN2] 000003CB00000000 0 00 0 0 0
    1 225524178 30-APR-11 06.21.02.330949 PM Cursor Pin 890826 22 969 970 kkslce [KKSCHLPIN2] 000003CA00000000 0 00 0 0 0
    1 225524178 30-APR-11 06.25.54.174086 PM Cursor Pin 894814 40 981 969 kkslce [KKSCHLPIN2] 000003C900000000 0 00 0 0 0
    1 225524178 30-APR-11 05.04.04.939530 PM Cursor Pin 815446 39 970 0 kkslce [KKSCHLPIN2] 00 0 00 0 0 0
    1 225524178 30-APR-11 06.25.44.907603 PM Cursor Pin 880618 30 981 950 kkslce [KKSCHLPIN2] 00 0 00 0 0 0
    1 225524178 30-APR-11 06.25.55.372206 PM Cursor Pin 895540 29 969 981 kksLockDelete [KKSCHLPIN6] 000003D500000002 0 00 0 0 0
    1 225524178 30-APR-11 05.25.55.586330 PM Cursor Pin 835508 34 950 980 kkslce [KKSCHLPIN2] 000003D400000000 0 00 0 0 0
    1 225524178 30-APR-11 06.20.30.675408 PM Cursor Pin 891070 34 950 970 kkslce [KKSCHLPIN2] 000003CA00000000 0 00 0 0 0
    1 225524178 30-APR-11 06.25.38.179841 PM Cursor Pin 871418 22 981 969 kkslce [KKSCHLPIN2] 000003C900000000 0 00 0 0 0
    1 225524178 30-APR-11 04.54.49.932627 PM Cursor Pin 810910 37 950 928 kkslce [KKSCHLPIN2] 000003A000000000 0 00 0 0 0
    1 225524178 30-APR-11 08.37.35.814288 AM Cursor Pin 321836 18 980 935 kkslce [KKSCHLPIN2] 000003A700000000 0 00 0 0 0
    1 225524178 30-APR-11 06.25.55.064435 PM Cursor Pin 862588 39 969 950 kkslce [KKSCHLPIN2] 000003B600000000 0 00 0 0 0
    1 225524178 30-APR-11 06.25.47.679395 PM Cursor Pin 869738 24 969 981 kkslce [KKSCHLPIN2] 000003D500000000 0 00 0 0 0
    1 225524178 30-APR-11 06.19.38.696734 PM Cursor Pin 863078 62 950 970 kkslce [KKSCHLPIN2] 00 0 00 0 0 0
    1 225524178 30-APR-11 06.25.53.295681 PM Cursor Pin 862882 39 981 969 kkslce [KKSCHLPIN2] 000003C900000000 0 00 0 0 0
    1 225524178 30-APR-11 04.54.53.425947 PM Cursor Pin 810954 40 980 928 kkslce [KKSCHLPIN2] 000003A000000000 0 00 0 0 0
    1 225524178 30-APR-11 06.25.35.785176 PM Cursor Pin 879221 35 981 950 kkslce [KKSCHLPIN2] 000003B600000001 0 00 0 0 0
    1 225524178 30-APR-11 06.25.02.448874 PM Cursor Pin 869070 29 969 981 kkslce [KKSCHLPIN2] 000003D500000000 0 00 0 0 0
    1 225524178 30-APR-11 05.25.45.707055 PM Cursor Pin 838490 24 970 980 kksl
    ..

  • Select sysdate from dual (to custom format).

    Dear all,
    i like to SELECT SYSDATE FROM DUAL, and run this result in a query something like:
    SELECT X, Y, Z FROM TABLENAME WHERE ACCESSDATE = (SELECT SYSDATE FROM DUAL);
    The problem is that the value of ACCESSDATE is in an format like DD-MM-YYYY and that sysdate form dual is
    DD-MON-YYYY.
    How do i get sysdate into the format DD-MM-YYYY?
    Thanks already,
    Johan.

    Perhaps usefull for performance:
    first of all: no subselect is not needed. sysdate can be used as an argument directly (all functions are).
    secondly, if accessdate is of type 'date' and the table has a lot of rows, converting it to a char will bypass the index usage. Instead, if you are worrying about the time try this (the display format is of no concern here if the datatype is date):
    SELECT X, Y, Z FROM TABLENAME WHERE ACCESSDATE >trunc(sysdate) and ACCESSDATE < trunc(sysdate+1);
    if accessdate is of type 'varchar2' then this should be enough (and should remain using the indexes on accessdate):
    SELECT X, Y, Z FROM TABLENAME WHERE ACCESSDATE = to_date(sysdate,DD-MM-YYYY);
    Hope this helps,
    L.

  • SELECT 'x' FROM DUAL

    Hi
    I work with Oracle JDev 10g with database as Oracle 10g.The query:
    SELECT ''x'' FROM DUAL
    is executed automatically whenever I forward my application control from one java file to another through structs.
    I have not coded this query anywhere in my application. I did a full search in the application. The query is no where found. But the database shows this query as the most executed query in the application.
    Has anyone faced a similar knid of issue?
    Thanks in Advance
    Shoba

    Hi,
    did you check te business service? Struts alone doesn't query the database, so my assumption is that there must be a View instance doing it
    Frank

  • Select user from dual with oid + oss ?

    Implementing a solution for global user administration, authentication and application schema mapping, will it break the simple but efficient possibility to do a 'select user from dual' ?
    If it is possible which value will we get, a global user identifier from the directory or something else ?
    Thanks in advance for your help

    Actually we authenticate user using internal database users. Each user depending on his enterprise role will have a set of synonyms deployed to map the application schema. It is complex to handle a large set of users schema. With OSS it seem to be possible to authenticate user using an external LDAP directory (OID) and to map this user to an application schema switch user's enterprise role.
    But I want to evaluate the impact of deployeing such solution, because our application use some 'select user from dual' single query to track user activity in some manner (this can be done using triggers or pl/sql api that do this job). If it is possible to have an unique user identifier in the database session context, even using external authentication and schema mapping of OSS we'll have less impact on the application. Else we'll have to change some API signatures to handle this user identifier.
    Context is :
    - use LDAP external functionalities provided with OSS to increase user management at an enterprise level ... single sign-on is our goal ,-)
    - use schema mapping to reduce our complexity of schema management. One schema foreach role rather than one schema per user.
    So, will we be able to individually know which user have the session in the database, rather than the shared schema name. If it is possible, the impact on our application will be really minor ...
    Thanks in advance for your help. If someone who read this lines have such system deployed and can try the 'select user from dual', I'll be glad on the answer that the database will give ,-)

  • BC4J smarter way to:   select sysdate from dual  ????

    Our architecture uses the DB server's date/time as the application's single
    place to get date / time. So our UI's / business logic needs sysdate in several
    places through screen flow and VO/Entities called by the business logic.
    I'll create a SQLView at design time to package calling select sysdate from dual.
    We're currently using Dynamic unnamed Views which are more expensive than just
    getting sysdate deserves and also are a memory leak if you don't
    call vo.remove() after you're done with the result set.
    But is there a simplier or smarter way to get sysdate from the DB than the more
    heavy weight than seems necessary step of instantiating a VO and creating a
    result set to get the String sysdate???
    Thanks,
    curt

    I cache viewObjects in the MT using some ViewObjectManager and had no
    problems till now (more then 6 months of production). Any AM that
    serve dynamic requests should have own ViewObjectManager-object.
    import oracle.jbo.*;
    import java.util.Hashtable;
    import java.util.Enumeration;
    public class ViewObjectManager {
    private ApplicationModule _appMod;
    private Hashtable _viewObjectNames;
    public ViewObjectManager(ApplicationModule am) {
    _appMod = am;
    _viewObjectNames = new Hashtable();
    public ViewObject getViewObject( String selectClause_,
    String fromClause_,
    String whereClause_ ) {
    ViewObject vo_ = null;
    String sqlStmt_ = _getSQLStmtFromClauses
    ( selectClause_, fromClause_, whereClause_ );
    String key_ = sqlStmt_;
    String voName_ = (String)_viewObjectNames.get(key_);
    boolean isNew_ = ( voName_ == null );
    if ( !isNew_ ) {
    vo_ = appMod.findViewObject(voName);
    if ( vo_ == null ) {
    viewObjectNames.remove(key);
    isNew_ = true;
    if ( isNew_ ) {
    vo_ = appMod.createViewObjectFromQueryStmt( null, sqlStmt );
    viewObjectNames.put( key, vo_.getName() );
    return vo_;
    private String getSQLStmtFromClauses( String selectClause,
    String fromClause_,
    String whereClause_ ) {
    return
    "SELECT "+selectClause_
    +" FROM "+fromClause_
    +( whereClause_ == null || whereClause_.equals("")
    ? "" : " WHERE "+whereClause_ ) ;
    Client method in this case looks like that:
    public static synchronized BigDecimal getNewId
    ( RequestOnNewId request__,
    QueryableApplicationModule am__ ) {
    String viewObjectName_ = request__.viewObjectName,
    sequenceName_ = request__.sequenceName,
    fromClause_ = request__.fromClause;
    BigDecimal new_id_ = null;
    ViewObject vo_;
    Row row_;
    Object obj_;
    vo_ = am__.getViewObjectManager()
    .getViewObject( sequenceName_+".NEXTVAL AS \"NEWID\"",
    "DUAL",
    null );
    vo_.executeQuery();
    row_ = vo_.first();
    obj_ = row_.getAttribute("NEWID");
    new_id_ = (obj_ == null) ? null : ((Number)obj_).bigDecimalValue();
    return new_id_;
    Hope this helps.
    Arkadi Ganov
    [email protected]

  • Select sysdate from dual, why?

    I have been looking at the SQL that is generated during fetches, updates
    etc. Why is the SELECT SYSDATE FROM DUAL being executed prior to every sql
    statement being executed?
    If I had to guess I would say it has to do with locking or logging but
    don't really have a clue!
    I suppose the final question is ... how can I switch it off!
    Thanks in advance
    Matt

    Have not seen oracle just dropping connection. In any case if you are using
    oracle JDBC 2 it has error event which lets you handle error conditions plus
    PooledConnection.getConnection() raises exception if its underlying physical
    connection is dead so you can catch it and discard old PooledConnection (and
    do not return it to the pool) and create new one without error ever going to
    the user. No need for "select sysdate from dual" once in a while or god
    forbid on every getConnection() /* hope oracle handles it more efficiently
    */ I stress tested my pool implementation - running many threads on JDO
    reads and killing connections on server left and right and Kodo never saw
    killed connections - it all was handled within pool itself without anything
    like "select sysdate from dual". What I am trying to say is at least as far
    as Oracle JDBC concerned their PooledConnection takes care of this
    "Patrick Linskey" <[email protected]> wrote in message
    news:[email protected]...
    Matt,
    We issue this to validate that connections retrieved from the pool are,
    in fact, open. Oracle has a nasty habit of dropping connections (you'd
    be surprised with some of the ways that Oracle sucks...), so it tends
    to be good to do this check relatively frequently.
    The frequency at which it occurs depends on a number of factors. First,
    it depends on whether or not you are using a connection pool. I believe
    that if you do not use the conn pool, then we probably check every time
    you get a connection. Second, it depends on the setting of the
    com.solarmetric.kodo.impl.jdbc.ConnectionTestTimeout setting, which
    specifies how often to check connections for validity. I believe that
    it's a number in seconds, but I'm not 100% sure; the configuration
    section of our docs will have the right answer. Third, it depends on
    the setting of com.solarmetric.kodo.impl.jdbc.ConnectionRetainMode,
    which controls when we get connections and when we release them.
    Finally, you can turn it off altogether by setting the
    com.solarmetric.kodo.impl.jdbc.DBDictionaryProperties property to
    contain the string 'ValidateConnections=false', which will turn off
    connection validation altogether.
    -Patrick
    Patrick Linskey
    SolarMetric Inc.

  • Select systimestamp from dual;

    Hi ,
    select systimestamp from dual;
    ORA-00904: invalid column name
    is not working in 8i. is it version dependent ?
    any other solution ..
    thanks....

    Take a look to the chapter "Getting the Time Down to the Millisecond" from Tom Kyte here there :
    http://asktom.oracle.com/tkyte/omag/00-nov/o60tom.html
    Nicolas.

  • Select current_timestamp from dual; different

    // from development server
    select current_timestamp from dual;
    19-AUG-11 04.00.09.927000000 PM ASIA/SINGAPORE
    // from client server
    select current_timestamp from dual;
    19/08/2011 16:01:21.317000000 ASIA/SINGAPORE
    I think i am hitting this error ORA-01830: date format picture ends before converting entire input string
    because of the different format at above.
    Can anyone kindly enlighten me ? Can i change the current_timestamp ?
    alter session set nls_timestamp_format = 'DD/MM/YYYY HH:MI:SS.FF'; doesn`t work

    Time is running out. that is why can`t afford.
    But why is my development server different from client server timestamp? There must be a setting
    How can i change to to fix this to buy sometime to add into to_timestamp(vardate)

  • Query Issue with select level from dual

    Hi,
    I have a question regarding this query. The problem seems that when selecting level from dual while including another table the rows returned seem to increase exponentially.
    I can add distinct and get the correct number of rows but am worried that this will cause a possible performance issue. Am I using the level option wrong?
    I have included details below.
    There are 4 rows in tbl_incidents
    When I run the following queries I get rows returned based on the total number of rows
    select start_date + level - 1, tbl_incidents.incident_id, level
    from dual, tbl_incidents
    where incident_id = 6
    connect by level <= 1;
    returns 1 row
    select start_date + level - 1, tbl_incidents.incident_id, level
    from dual, tbl_incidents
    where incident_id = 6
    connect by level <= 2;
    returns 5 rows
    select start_date + level - 1, tbl_incidents.incident_id, level
    from dual, tbl_incidents
    connect by level <= 3 and incident_id = 6;
    returns 21 rows
    select start_date + level - 1, tbl_incidents.incident_id, level
    from dual, tbl_incidents
    connect by level <= 4 and incident_id = 6;
    returns 85 rows
    select start_date + level - 1, tbl_incidents.incident_id, level
    from dual, tbl_incidents
    connect by level <= 5 and incident_id = 6;
    returns 341 rows
    So with
         r being the number of rows in tbl_incidents and
         l being the number used in the connect by for level and
         q being the number of rows returned by the query
         it appears that
    q(l) = r * q(l-1) + 1
    level 2:     4 * 1 + 1 = 5
    level 3:     4 * 5 + 1 = 21
    level 4:     4 * 21 + 1 = 85
    level 5:     4 * 85 + 1 = 341
    Thanks much,
    Nora

    Hi,
    The dual table is used when you want to do something in SQL when you are not otherwise using a table.
    Generating a "counter table" of the integers 1, 2, 3,..., X is an example
    SELECT  LEVEL   AS n
    FROM    dual
    WHERE   LEVEL   <= x;There is never any point in joining dual to another table, as in
    select  start_date + level - 1
    ,       tbl_incidents.incident_id
    ,       level
    from    dual
    ,       tbl_incidents
    where    incident_id = 6
    connect by  level <= x;You will always get the same more easily by just eliminating dual:
    select  start_date + level - 1
    ,       incident_id
    ,       level
    from    tbl_incidents
    where    incident_id = 6
    connect by  level <= x;It is quite useful and common to join a counter-table to a real table, like this cross-join:
    WITH    counter_table  AS
        SELECT  LEVEL   AS n
        FROM    dual
        WHERE   LEVEL   <= x
    select  start_date + n - 1
    ,       incident_id
    ,       n
    from    tbl_incidents
    ,       counter_table
    where    incident_id = 6

  • Mutating Problem when insert  while selecting data from dual

    Hi All,
    we have a table
    test (
    ID NUMBER
    NAME VARCHAR2(100)) and a before insert trigger
    create or replace trigger test1
    before insert on test
    for each row
    begin
    select decode(max(id),null,1,max(id)+1) into :new.id from test;
    end;
    i am able to insert values by using
    "insert into test(name) values('test1')" with out any issues.
    when i am inserting the values
    "insert into test(name) select 'test1' from dual" i am getting error
    ORA-04091: table SCOTT.TEST is mutating, trigger/function may not see it
    Could someone please advice why i am getting error in second scenario.
    Thanks in Advance
    Prasad

    Prasad
    try
    insert into test (name) values ((select 'test1' from dual));
    Frank

  • What is "Select 'x' from dual" for?

    I found a lot of sessions remains open with the statement "SELECT 'x' FROM DUAL".
    I think it cause my db server become slowly and can't be connected.
    I want to know where the statement is from and why it exist.
    pls help me,thanks

    "Select 'x' from dual" is issued to make sure that database is still alive. It is issued by BC4J AM pool code and OC4J.
    Thanks.
    Sung

Maybe you are looking for

  • Based on an xsd schema create a table

    Hi all, i need a way that allow me to create a table having an xsd file, in others word i load the xsd schema and create a table accordingly to the element that the xsd schema has respecting also the datatype of every element. Is the some functionali

  • Connection Error in Presentation Server log file - Socket:524

    Hi All, Earlier I had issues with starting presentation server , so i installed OBIEE again. I started all the services and Started oc4j. And i'm able to open the Administrator tool. But get error in IE while opening presentation server. When i opene

  • Please tell me how to connect with FCoE UCS-mini and Nexus N5k (N5K-C5548UP-B-S32)

    I have UCS 5108 Blade Server Chassis (with two B200 M3 Blade Servers inside and two FI 6324) connected to Nexus N5k switch through 4x10GE links. I want to configure the two aggregated channels FCoE (vFC) from chassi to switch. All instructions I've b

  • Prob in merge FI & MM data using infoset

    hi I need to integrate data from FI and MM. that for a particular PO , i want all the MM data as well as the FI doc created for it in a single record. For this I am creating an Infoset in R/3 against the RBKP , BSIK and BSAK tables. & joining conditi

  • DB Insert failed through JDBC Adapter

    Hi all, My system is on the latest patches of XI3.0 SP9. I am trying to insert some records into a database through JDBC adapter. The XML arriving at JDBC adapter is: <?xml version="1.0" encoding="UTF-8" ?> <ns:MaterialDataUpdate_Msg xmlns:ns="http:/