Sysdate generation

Hi,
My Application Contains Tabular page,It refers the one of the database table
Actulat the follwoeing field are in the table
PHYSICAL_NAME
PURPOSE
STATUS
REMARKS
MAKE
SERVER
LASTUPDATE_DATE
All the fields are refered in Tabular page except LASTUPDATE_DATE,
My requirement is How to generate sysdate for that column when update button click event.
Best Regards
Perumal Swamy.R

Hi,Rosy
Thanks for information sharing.
I have tried the following methods.
1. If u want to make the field visible in the tabular page just go to the column attributes of the field.Choose default type as pl/sql expression ,Default value as SYSDATE .So when u click on add button Sysdate will be automatically populated .
ANS: Working Fine
2.Otherwise if u make it invisible make hidden and do the rest.
3.Otherwise in the page submission time fire a SQL Query that will update the value as SYSDATE.
ANS:>I have created a process while submit button press event with follwoing code.
begin
for ti_i in 1..htmldb_application.g_f01.count
loop
update demo.test_TAPE set lastupdate_date = TO_CHAR(SYSDATE,'DD/MON/YYYY HH24:MI')
where PHYSICAL_NAME = htmldb_application.g_f02(htmldb_application.g_f01(ti_i));
end loop;
end;
But there is no responce.
kindly review my query one more bit.
Peruml Swamy.R

Similar Messages

  • PDF reports generation problem from single oracle reports in 10G

    Hi All,
    i am generating 4 PDF reports from one Oracle reports in 10 G.
    i used RUN_REPORT_OBJECT built in 4 times with some different parameter list at a single time.
    some time it generates but some time it generate 2 or 3 out of 4.
    Can you anyone help me on this issue.
    Regards,
    Abhishek
    Code that i used for generation of report:
    on key-F0:
    DECLARE
    PL_ID PARAMLIST;
    PL_NAME VARCHAR2(10) := 'REP';
    USRNM VARCHAR2(50);
    pl_id2 paramlist;
    pl_name2 varchar2(10):= 'REP';
    usrnm2 varchar2(50);
    pl_id3 paramlist;
    pl_name3 varchar2(10):= 'REP';
    usrnm3 varchar2(50);
    pl_id4 paramlist;
    pl_name4 varchar2(10):= 'REP';
    usrnm4 varchar2(50);
    BEGIN
    USRNM := GET_APPLICATION_PROPERTY(USERNAME);
    PL_ID := GET_PARAMETER_LIST(PL_NAME);
    IF NOT ID_NULL(PL_ID) THEN
    DESTROY_PARAMETER_LIST(PL_ID);
    END IF;
    PL_ID := CREATE_PARAMETER_LIST(PL_NAME);
    IF ID_NULL(PL_ID) THEN
    MESSAGE('Error Creating Parameter List ');
    END IF;
    ADD_PARAMETER(PL_ID, 'P_PRNT_C_FAM_ID', TEXT_PARAMETER, :PRNT_C_FAM_ID);
    ADD_PARAMETER(PL_ID, 'P_NOTICE_DATE', TEXT_PARAMETER, TO_CHAR(:FRONT_END.NOTICE_DATE,'MM/DD/RRRR'));
    ADD_PARAMETER(PL_ID, 'P_REDET_DATE', TEXT_PARAMETER, TO_CHAR(:FRONT_END.REDET_DATE,'MM/DD/RRRR'));
    ADD_PARAMETER(PL_ID, 'USR_NM', TEXT_PARAMETER, USRNM);
    ADD_PARAMETER(PL_ID, 'SCHEDULE', TEXT_PARAMETER, :RUN_TIME);
    ADD_PARAMETER(PL_ID,'P_PRNT_PROV',TEXT_PARAMETER,'PRNT');
    ADD_PARAMETER(PL_ID, 'P_ENG_SP', TEXT_PARAMETER,'N');
    REDET_REPORT('506',PL_ID,'CT506_Parent_FamId_Eng'||To_Char(sysdate,'MMDDRRRR-HHMISS'));
    USRNM2 := GET_APPLICATION_PROPERTY(USERNAME);
    PL_ID2 := GET_PARAMETER_LIST(PL_NAME2);
    IF NOT ID_NULL(PL_ID2) THEN
    DESTROY_PARAMETER_LIST(PL_ID2);
    END IF;
    PL_ID2 := CREATE_PARAMETER_LIST(PL_NAME2);
    IF ID_NULL(PL_ID2) THEN
    MESSAGE('Error Creating Parameter List');
    END IF;
    ADD_PARAMETER(PL_ID2,'P_PRNT_C_FAM_ID',TEXT_PARAMETER,:PRNT_C_FAM_ID);
    ADD_PARAMETER(PL_ID2,'P_NOTICE_DATE',TEXT_PARAMETER,TO_CHAR(:FRONT_END.NOTICE_DATE,'MM/DD/RRRR'));
    ADD_PARAMETER(PL_ID2,'P_REDET_DATE',TEXT_PARAMETER,TO_CHAR(:FRONT_END.REDET_DATE,'MM/DD/RRRR'));
    ADD_PARAMETER(PL_ID2,'USR_NM',TEXT_PARAMETER,USRNM2);
    ADD_PARAMETER(PL_ID2,'SCHEDULE',TEXT_PARAMETER,:RUN_TIME);
    ADD_PARAMETER(PL_ID2,'P_PRNT_PROV',TEXT_PARAMETER,'PRNT');
    ADD_PARAMETER(PL_ID2,'P_ENG_SP',TEXT_PARAMETER,'Y');
    REDET_REPORT('506',PL_ID2,'CT506_Parent_FamId_Sp'||To_Char(sysdate,'MMDDRRRR-HHMISS'));
    USRNM3 := GET_APPLICATION_PROPERTY(USERNAME);
    PL_ID3 := GET_PARAMETER_LIST(PL_NAME3);
    IF NOT ID_NULL(PL_ID3) THEN
    DESTROY_PARAMETER_LIST(PL_ID3);
    END IF;
    PL_ID3 := CREATE_PARAMETER_LIST(PL_NAME3);
    IF ID_NULL(PL_ID3) THEN
    MESSAGE('Error Creating Parameter List');
    END IF;
    ADD_PARAMETER(PL_ID3,'P_PRNT_C_FAM_ID',TEXT_PARAMETER,:PRNT_C_FAM_ID);
    ADD_PARAMETER(PL_ID3,'P_NOTICE_DATE',TEXT_PARAMETER,TO_CHAR(:FRONT_END.NOTICE_DATE,'MM/DD/RRRR'));
    ADD_PARAMETER(PL_ID3,'P_REDET_DATE',TEXT_PARAMETER,TO_CHAR(:FRONT_END.REDET_DATE,'MM/DD/RRRR'));
    ADD_PARAMETER(PL_ID3,'USR_NM',TEXT_PARAMETER,USRNM3);
    ADD_PARAMETER(PL_ID3,'SCHEDULE',TEXT_PARAMETER,:RUN_TIME);
    ADD_PARAMETER(PL_ID3,'P_PRNT_PROV',TEXT_PARAMETER,'PROV');
    ADD_PARAMETER(PL_ID3,'P_ENG_SP',TEXT_PARAMETER,'N');
    REDET_REPORT('506',PL_ID3,'CT506_Prov_ProvId_Eng'||To_Char(sysdate,'MMDDRRRR-HHMISS'));
    USRNM4 := GET_APPLICATION_PROPERTY(USERNAME);
    PL_ID4 := GET_PARAMETER_LIST(PL_NAME4);
    IF NOT ID_NULL(PL_ID4) THEN
    DESTROY_PARAMETER_LIST(PL_ID4);
    END IF;
    PL_ID4 := CREATE_PARAMETER_LIST(PL_NAME4);
    IF ID_NULL(PL_ID4) THEN
    MESSAGE('Error Creating Parameter List');
    END IF;
    ADD_PARAMETER(PL_ID4,'P_PRNT_C_FAM_ID',TEXT_PARAMETER,:PRNT_C_FAM_ID);
    ADD_PARAMETER(PL_ID4,'P_NOTICE_DATE',TEXT_PARAMETER,TO_CHAR(:FRONT_END.NOTICE_DATE,'MM/DD/RRRR'));
    ADD_PARAMETER(PL_ID4,'P_REDET_DATE',TEXT_PARAMETER,TO_CHAR(:FRONT_END.REDET_DATE,'MM/DD/RRRR'));
    ADD_PARAMETER(PL_ID4,'USR_NM',TEXT_PARAMETER,USRNM4);
    ADD_PARAMETER(PL_ID4,'SCHEDULE',TEXT_PARAMETER,:RUN_TIME);
    ADD_PARAMETER(PL_ID4,'P_PRNT_PROV',TEXT_PARAMETER,'PROV');
    ADD_PARAMETER(PL_ID4,'P_ENG_SP',TEXT_PARAMETER,'Y');
    REDET_REPORT('506',PL_ID4,'CT506_Prov_ProvId_Sp'||To_Char(sysdate,'MMDDRRRR-HHMISS'));
    Message('Notice Submitted For Printing');
    EXIT_FORM;
    END;
    Program unit:
    PROCEDURE REDET_REPORT(rep_name in Varchar2,plist in ParamList,rep_pdf_name in Varchar2)IS
    filecode varchar(2);
    Repnm varchar(30);
    report_id REPORT_OBJECT;
    report_id_hear REPORT_OBJECT;
    report_prop VARCHAR2(20);
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(200);
    bat_loc varchar2(200);
    time_slot varchar2(100);
    rep_folder_name varchar2(100):='Redet Notice for Packets Sent\';
    BEGIN
    Filecode := init.GetFileNmCode;
    if filecode 'FL' then
    if upper(substr(rep_name,1,2)) ='CC' then
    RepNm := filecode||substr(rep_name,3);
    else
    if rep_name != 'viewerr' then
    RepNm := filecode||rep_name;
    else
    RepNm := rep_name;
    end if;
    end if;
    end if;
    Begin
    begin
    report_id := find_report_object(RepNm);
    if error_code = '41219' then
    Message('Unable to execute : '|| RepNm);
    Raise FORM_TRIGGER_FAILURE;
    end if;
    end;
    set_report_object_property(report_id, REPORT_FILENAME, RepNm);
    set_report_object_property(report_id, REPORT_SERVER, init.Appl_Repserver);
    SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_EXECUTION_MODE, BATCH);
    SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_COMM_MODE,SYNCHRONOUS);
    set_report_object_property(report_id, REPORT_DESFORMAT,'PDF');
    select rprm_param_val||rep_folder_name||rep_pdf_name||'.pdf' into bat_loc from rprm where rprm_param_name = 'BAT_LOC';
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,FILE);
    SET_REPORT_OBJECT_PROPERTY(REPORT_ID,REPORT_DESNAME,'"'||bat_loc||'"');
    begin
    v_rep := RUN_REPORT_OBJECT(report_id,plist);
    exception when others then
    Message('Error While executing running reports ::'||error_code);
    end;
    end;
    END;

    Thanx Frank
    Well one solution is that i can decrease the length of my report name and the problem does not occur than.
    any ways thanx ..but where to get the patch from.
    Kindly provide me with the link if possible.
    Thanx,
    Qaiser Qayyum Malik.
    [email protected]

  • Enq: TX - row lock contention in forms 10g sequency number generation

    Iam Getting the Deadlock issue in oracle formdeveloper 10g database is 11g Acutually in our small Hospital organization using different forms generating entrying labrequest form finally save time
    one sequency number will generated i have give procedure below every save criteria form using below procedure some time iam getting lock iam using blocksession query i have find out some
    OSUSER
    MACHINE
    TERMINAL
    PROGRAM
    SQL_ID
    LOGON_TIME
    BLOCKING_SESSION_STATUS
    BLOCKING_SESSION
    EVENT
    user423
    UMCCDOM\LEVEL4-MICU
    LEVEL4-MICU
    PrjMcr.EXE
    0ccngw7dfkmgb
    23/09/2013 11:34:41 AM
    VALID
    277
    enq: TX - row lock contention
    SYSTEM
    WORKGROUP\PRIAPPSVR
    PRIAPPSVR
    frmweb.exe
    0ccngw7dfkmgb
    23/09/2013 11:32:50 AM
    VALID
    186
    enq: TX - row lock contention
    SYSTEM
    WORKGROUP\PRIAPPSVR
    PRIAPPSVR
    frmweb.exe
    0ccngw7dfkmgb
    22/09/2013 2:49:47 PM
    VALID
    277
    enq: TX - row lock contention
    SYSTEM
    WORKGROUP\PRIAPPSVR
    PRIAPPSVR
    frmweb.exe
    0ccngw7dfkmgb
    23/09/2013 7:00:22 AM
    VALID
    186
    enq: TX - row lock contention
    user290
    UMCCDOM\LEVEL2-N
    LEVEL2-N
    PrjMcr.EXE
    0ccngw7dfkmgb
    23/09/2013 10:28:06 AM
    VALID
    277
    enq: TX - row lock contention
    lock are happen after open the code i have find out used FOR UPDATE in procedure please tell me any alternative for this every labrequest form saving time using this procedure for generating prefix sequence number multiple user using with different systems
    PROCEDURE   Gsp_GenSeqNum (I_SvPrefixCd IN VARCHAR2,I_SvUserName IN VARCHAR2,
                              O_SvSeqNum OUT VARCHAR2) IS
    --This Procedure generates the sequence number
    --by retrieving the prefix based on the code
    --supllied to the procedure.
      CURSOR  crSeqGenerator IS
             SELECT Gsn_prefix_last_num, Gsn_prefix_year
                FROM G_SEQUENCE_NUMBER
             WHERE Gsn_prefix_Cd = I_SvPrefixCd
                   AND Gsn_prefix_year = TO_CHAR(SYSDATE,'YYYY')
      FOR UPDATE OF Gsn_prefix_last_num;
      udSeqNum        G_SEQUENCE_NUMBER.Gsn_Prefix_last_num%TYPE;
      udNextSeqNum    G_SEQUENCE_NUMBER.Gsn_Prefix_last_num%TYPE;
      udYear          G_SEQUENCE_NUMBER.Gsn_Prefix_year%TYPE;
      udPrefix        G_SEQUENCE_PREFIX.Gsp_Prefix_Value%TYPE;
    BEGIN
      SELECT Gsp_Prefix_Value
      INTO udPrefix
      FROM G_SEQUENCE_PREFIX
      WHERE Gsp_Prefix_Cd = I_SvPrefixCd;
      OPEN crSeqGenerator;
      FETCH crSeqGenerator
       INTO udSeqNum,
            udYear;
      IF crSeqGenerator%FOUND THEN
         udNextSeqNum  :=udSeqNum + 1;
         O_SvSeqNum     := udPrefix||'/'||TO_CHAR(SYSDATE,'YY')
                                   ||'/'||LPAD(TO_CHAR(udNextSeqNum),6,'0');
      ELSE
    INSERT INTO G_SEQUENCE_NUMBER VALUES(I_SvPrefixCd,TO_CHAR(SYSDATE,'YYYY'),0,I_SvUserName,SYSDATE);
         udSeqNum      :=0;
         udNextSeqNum  :=udSeqNum + 1;
         O_SvSeqNum:=UdPrefix||'/'||TO_CHAR(SYSDATE,'YY')
                             ||'/'||LPAD(TO_CHAR(udNextSeqNum),6,'0');
      END IF;
      UPDATE G_SEQUENCE_NUMBER
         SET Gsn_Prefix_last_num=udNextSeqNum
       WHERE Gsn_Prefix_Cd = I_SvPrefixCd
         AND Gsn_Prefix_year=TO_CHAR(SYSDATE,'YYYY');
      CLOSE crSeqGenerator;
    END Gsp_GenSeqNum;
    Thanks
    subbu

    This application is inbuit with some modules VB (cath ,cardio)and oracle forms for required sequence number generation different time used this procedure whereever required the sequence Prefix generation.If i replace the procedure sequene to oracle standard sequency if the user cannot save the form unnessary sequency generated order is missing from sequence.

  • High REDO Generation for enqueue and dequeue

    Hi,
    We have found high redo generation while enqueue and dequeue. Which is in-turn affecting our database performance.
    Please find a sample test result below :
    Create the Type:-
    CREATE OR REPLACE
    type src_message_type_new_1 as object(
    no varchar(10),
    title varchar2(30),
    text varchar2(2000))
    Create the Queue and Queue Table:-
    CREATE OR REPLACE procedure create_src_queue
    as
    begin
    DBMS_AQADM.CREATE_QUEUE_TABLE
    (queue_table => 'src_queue_tbl_1',
    queue_payload_type => 'src_message_type_new_1',
         --multiple_consumers => TRUE,
         compatible=>10.1,
         storage_clause=>'TABLESPACE EDW_OBJ_AUTO_9',
    comment => 'General message queue table created on ' ||
    TO_CHAR(SYSDATE,'MON-DD-YYYY HH24:MI:SS'
         commit;
    DBMS_AQADM.CREATE_QUEUE
    (queue_name => 'src_queue_1',
    queue_table => 'src_queue_tbl_1',
    comment => 'Test Queue Number 1'
         commit;
    dbms_aqadm.start_queue
    ('src_queue_1');
         commit;
    end;
    Redo Log Size:-
    select
    n.name, t.value
    from
    v$mystat t join
    v$statname n
    on
    t.statistic# = n.statistic#
    where
    n.name = 'redo size'
    Output:-
    595184
    Enqueue Message into the Queue Table:-
    CREATE OR REPLACE PROCEDURE enque_msg_ab
    as
    queue_options DBMS_AQ.ENQUEUE_OPTIONS_T;
    message_properties DBMS_AQ.MESSAGE_PROPERTIES_T;
    message_id raw(16);
    my_message dev_hub.src_message_type_new_1;
    begin
    my_message:=src_message_type_new_1(
    '1',
    'This is a sample message',
    'This message has been posted on');
    DBMS_AQ.ENQUEUE(
    queue_name=>'dev_hub.src_queue_1',
    enqueue_options=>queue_options,
    message_properties=>message_properties,
    payload=>my_message,
    msgid =>message_id);
    commit;
    end;
    Redo Log Size:-
    select
    n.name, t.value
    from
    v$mystat t join
    v$statname n
    on
    t.statistic# = n.statistic#
    where
    n.name = 'redo size'
    Output:-
    596740
    Can any one tell us the reason for this high redo generation and how can this can be controlled?
    Regards,
    Koushik

    Please find my answers below :
    What full version of Oracle?
    - 10.1.0.5
    How large is the average message?
    - in some byets only, at max 1-2 KB and not more than this.
    What kind of performance problem is 300G of redo causing? How? Have you ran a statspack report? What did it show?
    - Actually we are facing some performance issue as a overall prespective for our daily batch processing, which now causing a delay in the batch SLA. So we have produced an AWR report for our database and from there we have found that total redo generation is around 400 GB, amoung which 300 GB has been generated by enqueue-dequeue process.
    What other activity is taking place on this instance? That is, is all this redo really being generated as the result of the AQ activity or is some of it the result of the messages being processed? How are the messages created?
    - Normal batch process everyday. Batch process also generates REDO but the amount is low compare to enqueue-dequeue process.
    Have you looked at providing a separate physical disk stripe for the online redo logs and for the archive log location from the database data file physical disk and IO channels?
    - No, as we are not the production DBA so we don't have the direct access to production database.
    What kind of file system and disk are you using?
    - I am not sure about it. I will try to confirm it by production DBA. Is there any other way to find it out, whether it is on filesystem or raw device?
    Can you please provide any help in this topic.
    Regards,
    Koushik

  • How to stop the generation of the trace files relate to the particular user

    Dear All,
    Please advice:
    Is it possible to stop the trace file created by a user for a particular job (sql/exp)
    For example :
    Trace files create whenever the user run the sql/exp command from his application server.
    This will created a huge files and caused the file system getting full (not in bdump but it is generation in application user home directory).
    Is there any method to stop the generation of the trace files relate to the particular user base on that job.
    thanks,
    Shanoj

    Dear SHANOJ
    This trigger will created for that specific user by dba or person who have sysdba privs. it will triggered at the login time of that user and alter the sqltrace.
    for example we have write one trigger in our database for every ddl operation in database.
    CREATE OR REPLACE TRIGGER "SYS"."SYS$DDLTRIG" after DDL on database
    declare
    v_machinename VARCHAR2(100);
    v_osuser VARCHAR2(100);
    v_dbuser VARCHAR2(100);
    v_host VARCHAR2(100);
    v_program VARCHAR2(100);
    v_instance VARCHAR2(100);
    v_date VARCHAR2(100);
    begin
    select to_char(sysdate, 'mm-dd-yyyy HH24:MI:SS'),user,sys_context('userenv','OS_
    USER'),sys_context('userenv','HOST'), (select instance_name from v$instance),(se
    lect program from v$session where sid = (select distinct sid from v$mystat)),(se
    lect machine from v$session where sid = (select distinct sid from v$mystat)) int
    o v_date,v_dbuser,v_osuser,v_host,v_instance,v_program,v_machinename from dual;
    IF ora_sysevent = 'DROP' or ora_sysevent = 'REVOKE' or ora_sysevent = 'GRANT' or
    ora_sysevent = 'CREATE' or ora_sysevent = 'TRUNCATE' or ora_sysevent = 'ALTER'
    Then
    insert into ddl_log_new(v_date,v_dbuser,v_osuser,v_host,v_instance,v_program,v_m
    achinename,V_EVENT,V_OBJECT_NAME,V_OBJECT_TYPE,V_OBJECT_OWNER) values (v_date,v_
    dbuser,v_osuser,v_host,v_instance,v_program,v_machinename,ora_sysevent,ora_dict_
    obj_name,ora_dict_obj_type,ora_dict_obj_owner);
    END IF;
    END;
    i hope above example will helpful for u,
    Regards
    Ambrish
    Edited by: ambrishr24 on Dec 5, 2012 5:02 PM
    Edited by: ambrishr24 on Dec 5, 2012 5:05 PM
    Edited by: ambrishr24 on Dec 5, 2012 5:20 PM

  • Redo generation high

    Hi,
    We have a problem with redo generation. Last few days,redo generation is high than normal.No changes in application level.I don't know where to start.I tried to compare AWR report.But i did not get.
    1,Is it possilbe to find How much redo generated for a DML statement by Segment wise(table segment,index segment) when it's executed?
    For Ex : The table M_MARCH has 19 colums and 6 indexes.Another tables M_Report has 59 columns and 5 indexes.the query combines both tables.
    We need to find whether indexex are really is usable or not?
    2,Is there any other way to reduce redo geneation?
    Br,
    Rajesh

    High redo generation can be of two types:
    1. During a specific duration of the day.
    2. Sudden increase in the archive logs observed.
    In both the cases, first thing to be checked is about any modifications done either at the database level(modifying any parameters, any maintenance operations performed,..) and application level (deployment of new application, modification in the code, increase in the users,..).
    To know the exact reason for the high redo, we need information about the redo activity and the details of the load. Following information need to be collected for the duration of high redo generation.
    1] To know the trend of log switches below queries can be used.
    SQL> alter session set NLS_DATE_FORMAT='DD-MON-YYYY HH24:MI:SS';  Session altered.  SQL> select trunc(first_time, 'HH') , count(*)   2  from   v$loghist   3  group by trunc(first_time, 'HH')   4  order by trunc(first_time, 'HH');   TRUNC(FIRST_TIME,'HH   COUNT(*) -------------------- ---------- 25-MAY-2008 20:00:00          1 26-MAY-2008 12:00:00          1 26-MAY-2008 13:00:00          1 27-MAY-2008 15:00:00          2 28-MAY-2008 12:00:00          1 <- Indicate 1 log switch from 12PM to 1PM. 28-MAY-2008 18:00:00          1 29-MAY-2008 11:00:00         39 29-MAY-2008 12:00:00        135 29-MAY-2008 13:00:00        126 29-MAY-2008 14:00:00        135 <- Indicate 135 log switches from 2-3 PM. 29-MAY-2008 15:00:00        112
    We can also get the information about the log switches from alert log (by looking at the messages 'Thread 1 advanced to log sequence' and counting them for the duration), AWR report.
    1] If you are in 10g or higher version and have license for AWR, then you can collect AWR report for the problematic time else go for statspack report.
    a) AWR Report
    -- Create an AWR snapshot when you are able to reproduce the issue: SQL> exec DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT ();   -- After 30 minutes, create a new snapshot: SQL> exec DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT ();  -- Now run $ORACLE_HOME/rdbms/admin/awrrpt.sql
    b) Statspack Report
    SQL> connect perfstat/<Password> SQL> execute statspack.snap;  -- After 30 minutes SQL> execute statspack.snap; SQL> @?/rdbms/admin/spreport
    In the AWR/Statspack report look out for queries with highest gets/execution. You can check in the "load profile" section for "Redo size" and compare it with non-problematic duration.
    2] We need to mine the archivelogs generated during the time frame of high redo generation.
    -- Use the DBMS_LOGMNR.ADD_LOGFILE procedure to create the list of logs to be analyzed:     SQL> execute DBMS_LOGMNR.ADD_LOGFILE('<filename>',options => dbms_logmnr.new); SQL> execute DBMS_LOGMNR.ADD_LOGFILE('<file_name>',options => dbms_logmnr.addfile);  -- Start the logminer  SQL> execute DBMS_LOGMNR.START_LOGMNR(OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG);       SQL> select operation,seg_owner,seg_name,count(*)  from v$logmnr_contents group by seg_owner,seg_name,operation;
    Please refer to below article if there is any problem in using logminer.
    Note 62508.1 - The LogMiner Utility
    We can not get the Redo Size using Logminer but We can only get user,operation and schema responsible for high redo.
    3] Run below query to know the session generating high redo at any specific time.
    col program for a10 col username for a10 select to_char(sysdate,'hh24:mi'), username, program , a.sid, a.serial#, b.name, c.value from v$session a, v$statname b, v$sesstat c where b.STATISTIC# =c.STATISTIC# and c.sid=a.sid and b.name like 'redo%' order by value;
    This will give us the all the statistics related to redo. We should be more interested in knowing "redo size" (Total amount of redo generated in bytes)
    This will give us SID for problematic session.
    In above query output look out for statistics against which high value is appeared and this statistics will give fair idea about problem.

  • JXB2.0 Anntotion generation for XMLElement

    Hi
    I tried to genrate a java class wich has the following snippet inside
    I need after the APPLE list a LEMON ELEMENT and the unfortunatly again a APPLE Element.
    <xs:element name="FRUITSTRUCT">
              <xs:complexType>
                   <xs:sequence> <! attention it is a sequence -->
                        <xs:element ref="Orange"/>
                        <xs:element ref="Apple" maxOccurs="unbounded"/>
                        <xs:element ref="Lemon"/>
                        <xs:element name="*AppleX*" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    This worked fine and the class generated by jaxb's xjc converter is ok .
    But the annotation for the Element AppleX should be Apple not AppleX
    Is there a way to customize the generation of the @XMLElement annotion in the java file.
    I am familiar with customization of the accessor property.
    Thanks for any help
    Andy
    Switzerland

    If you don't mind SY, need to follow up.
    Perhaps you could explain how this is different:
    SQL> alter session set nls_date_format = 'dd.mm.yy
      2  /
    Session altered.
    SQL> select xmlelement("Now",sysdate) from dual
      2  /
    XMLELEMENT("NOW",SYSDATE)
    <Now>2012-11-20</Now>
    SQL> alter session set nls_date_format = 'hh24:mi'
      2  /
    Session altered.
    SQL> select xmlelement("Now",sysdate) from dual
      2  /
    XMLELEMENT("NOW",SYSDATE)
    <Now>2012-11-20</Now>
    SQL>Reading docs on XMLELEMENT, I don't think it is absolutely clear that value_expr is a string ?
    BR
    Peter
    Edit: Think you already answered above :)
    But when I read the first docs I pointed to, my feeling is it should have been the same too, for numbers.
    Edited by: Peter on Nov 20, 2012 1:08 PM
    Edit, Edit: more dohs, reading that doc for fourth or fith time, I now see that it DOES NOT MENTION NUMBERS :(
    Edited by: Peter on Nov 20, 2012 1:18 PM

  • Query help for archive log generation details

    Hi All,
    Do you have a query to know the archive log generation details for today.
    Best regards,
    Rafi.

    Dear user13311731,
    You may use below query and i hope you will find it helpful;
    SELECT * FROM (
    SELECT * FROM (
    SELECT   TO_CHAR(FIRST_TIME, 'DD/MM') AS "DAY"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '00', 1, 0)), '999') "00:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '01', 1, 0)), '999') "01:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '02', 1, 0)), '999') "02:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '03', 1, 0)), '999') "03:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '04', 1, 0)), '999') "04:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '05', 1, 0)), '999') "05:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '06', 1, 0)), '999') "06:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '07', 1, 0)), '999') "07:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '08', 1, 0)), '999') "08:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '09', 1, 0)), '999') "09:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '10', 1, 0)), '999') "10:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '11', 1, 0)), '999') "11:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '12', 1, 0)), '999') "12:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '13', 1, 0)), '999') "13:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '14', 1, 0)), '999') "14:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '15', 1, 0)), '999') "15:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '16', 1, 0)), '999') "16:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '17', 1, 0)), '999') "17:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '18', 1, 0)), '999') "18:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '19', 1, 0)), '999') "19:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '20', 1, 0)), '999') "20:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '21', 1, 0)), '999') "21:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '22', 1, 0)), '999') "22:00"
           , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '23', 1, 0)), '999') "23:00"
        FROM V$LOG_HISTORY
        WHERE extract(year FROM FIRST_TIME) = extract(year FROM sysdate)
    GROUP BY TO_CHAR(FIRST_TIME, 'DD/MM')
    ) ORDER BY TO_DATE(extract(year FROM sysdate) || DAY, 'YYYY DD/MM') DESC
    ) WHERE ROWNUM < 8;Hope That Helps.
    Ogan

  • Heavy archive log generation

    Hi,
    Database Version: Oracle 11.1.0.6
    Platform: Enterprise Linux 5
    Can someone please tell me the troubleshooting steps_ in a situation where there is heavy inflow of archive log generation i mean, say around 3 files of around 50MB every minute and eating away the space on disk.
    1) How to find out what activity is causing such heavy archive log generation? I can run the below query to find out the currently running sql queries with status;
    select a.username, b.sql_text,a.status from v$session a inner join v$sqlarea b on a.sql_id=b.sql_id;
    But is there any other query or a better way to find out current db activity in this situation.
    Tried using DBMS_LGMNR Log Miner but failed because (i) utl_file_dir is not set in init param file (So, mining the archive log file on production is presently ruled out as I cannot take an outage)
    (ii) alter database add supplemental log data (all) columns query takes for ever because of the locks. (So, cannot mine the generated archive log file on another machine due to DBID mismatch.)
    2) How to deal with this situation? I read here in OTN discussion board that increasing the number of redo log groups or redo log members will help to manage this situation when there is lot of DML activity going on application side....But I didn't understand how it is going to help in controlling the rigorous archive logs generation
    Edited by: user10313587 on Feb 11, 2011 8:43 AM
    Edited by: user10313587 on Feb 11, 2011 8:44 AM

    Hi,
    Other than logminer, which will tell you exactly what the redo is by definition, you can run something like the following:
    select value/((sysdate-logon_time) * 1440) redo_per_minute,s.sid,serial#,logon_time,value
      from v$statname sn,
           v$sesstat ss,
           v$session s
      where s.sid = ss.sid
        and sn.statistic# = ss.statistic#
        and name = 'redo size'
    and value>0Then trace the "high" sessions above and it should jump out at you. If not, then run logmnr with something like...
    set serveroutput on size unlimited
    begin
      dbms_logmnr.add_logfile(logfilename => '&log_file_name');
      dbms_logmnr.start_logmnr(options => dbms_logmnr.dict_from_online_catalog + dbms_logmnr.no_rowid_in_stmt);
      FOR cur IN (SELECT *
                    FROM v$logmnr_contents) loop
        dbms_output.put_line(cur.sql_redo);
      end loop;
    end;
    /Note you don't need utl_file_dir for log miner if you use the online catalog.
    HTH,
    Steve

  • Archve log generation in a day

    Hi all
    I want to check the sum bytes of archive log generation in a day. kindly suggest me any query which can help me. I am using 10.2.0.4 DB
    Thanks
    Krishna

    set pagesize 18
    set linesize 2000
    SELECT * FROM (
    SELECT * FROM (
    SELECT TO_CHAR(FIRST_TIME, 'DD/MM') AS "DAY"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '00', 1, 0)), '999') "00:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '01', 1, 0)), '999') "01:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '02', 1, 0)), '999') "02:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '03', 1, 0)), '999') "03:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '04', 1, 0)), '999') "04:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '05', 1, 0)), '999') "05:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '06', 1, 0)), '999') "06:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '07', 1, 0)), '999') "07:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '08', 1, 0)), '999') "08:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '09', 1, 0)), '999') "09:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '10', 1, 0)), '999') "10:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '11', 1, 0)), '999') "11:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '12', 1, 0)), '999') "12:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '13', 1, 0)), '999') "13:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '14', 1, 0)), '999') "14:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '15', 1, 0)), '999') "15:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '16', 1, 0)), '999') "16:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '17', 1, 0)), '999') "17:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '18', 1, 0)), '999') "18:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '19', 1, 0)), '999') "19:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '20', 1, 0)), '999') "20:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '21', 1, 0)), '999') "21:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '22', 1, 0)), '999') "22:00"
    , TO_NUMBER(SUM(DECODE(TO_CHAR(FIRST_TIME, 'HH24'), '23', 1, 0)), '999') "23:00"
    FROM V$LOG_HISTORY
    WHERE extract(year FROM FIRST_TIME) = extract(year FROM sysdate)
    GROUP BY TO_CHAR(FIRST_TIME, 'DD/MM')
    ) ORDER BY TO_DATE(extract(year FROM sysdate) || DAY, 'YYYY DD/MM') DESC
    ) WHERE ROWNUM < 16
    <Or>
    Source: archivelogs
    select to_char(COMPLETION_TIME,'DD-MON-YYYY'),count(*) from v$archived_log group by to_char(COMPLETION_TIME,'DD-MON-YYYY') order by to_char(COMPLETION_TIME,'DD-MON-YYYY');
    <or>
    If you wish to know for a partitular date :
    select to_char(first_time,'DD-MON-RR') "Date",
    to_char(sum(decode(to_char(first_time,'HH24'),'00',1,0)),'99') " 00",
    to_char(sum(decode(to_char(first_time,'HH24'),'01',1,0)),'99') " 01",
    to_char(sum(decode(to_char(first_time,'HH24'),'02',1,0)),'99') " 02",
    to_char(sum(decode(to_char(first_time,'HH24'),'03',1,0)),'99') " 03",
    to_char(sum(decode(to_char(first_time,'HH24'),'04',1,0)),'99') " 04",
    to_char(sum(decode(to_char(first_time,'HH24'),'05',1,0)),'99') " 05",
    to_char(sum(decode(to_char(first_time,'HH24'),'06',1,0)),'99') " 06",
    to_char(sum(decode(to_char(first_time,'HH24'),'07',1,0)),'99') " 07",
    to_char(sum(decode(to_char(first_time,'HH24'),'08',1,0)),'99') " 08",
    to_char(sum(decode(to_char(first_time,'HH24'),'09',1,0)),'99') " 09",
    to_char(sum(decode(to_char(first_time,'HH24'),'10',1,0)),'99') " 10",
    to_char(sum(decode(to_char(first_time,'HH24'),'11',1,0)),'99') " 11",
    to_char(sum(decode(to_char(first_time,'HH24'),'12',1,0)),'99') " 12",
    to_char(sum(decode(to_char(first_time,'HH24'),'13',1,0)),'99') " 13",
    to_char(sum(decode(to_char(first_time,'HH24'),'14',1,0)),'99') " 14",
    to_char(sum(decode(to_char(first_time,'HH24'),'15',1,0)),'99') " 15",
    to_char(sum(decode(to_char(first_time,'HH24'),'16',1,0)),'99') " 16",
    to_char(sum(decode(to_char(first_time,'HH24'),'17',1,0)),'99') " 17",
    to_char(sum(decode(to_char(first_time,'HH24'),'18',1,0)),'99') " 18",
    to_char(sum(decode(to_char(first_time,'HH24'),'19',1,0)),'99') " 19",
    to_char(sum(decode(to_char(first_time,'HH24'),'20',1,0)),'99') " 20",
    to_char(sum(decode(to_char(first_time,'HH24'),'21',1,0)),'99') " 21",
    to_char(sum(decode(to_char(first_time,'HH24'),'22',1,0)),'99') " 22",
    to_char(sum(decode(to_char(first_time,'HH24'),'23',1,0)),'99') " 23"
    from v$log_history
    where to_char(first_time,'DD-MON-RR')='16-AUG-10'
    group by to_char(first_time,'DD-MON-RR')
    order by 1
    Source: Query help
    I have many more in my notes.... !
    Regards
    Girish Sharma

  • PKEY generation in USER_SECURITY table

    How does BEA generate primary keys in the various Portal tables (specificially
    I need to know this for the USER_SECURITY table)? We are in the process of migrating
    our 7.0 users to 8.1 and I don't want to break this process due to the primary
    key generation scheme.
    Thanks
    Kunal

    Kunal
    There is a table called SEQUENCER in the Portal schema which holds the last value
    of primary keys for all the Portal tables, incl USER_SECURITY. See the row named
    IUSER_ID_SEQUENCE in SEQUENCER.
    Hope that helps
    Regards
    Jose
    "newsgroups.bea.com" <[email protected]> wrote:
    Kunal,
    Syntactically primary keys for all the Portal tables are excuted as separate
    alter statements from the table creates. For example:
    CREATE TABLE USER_SECURITY (
    USER_ID NUMBER(15) NOT NULL,
    PASSWORD VARCHAR2(50) NULL,
    USER_NAME VARCHAR2(200) NOT NULL,
    CREATION_DATE DATE DEFAULT SYSDATE NOT NULL,
    MODIFIED_DATE DATE DEFAULT SYSDATE NOT NULL)
    ALTER TABLE USER_SECURITY
    ADD CONSTRAINT PK_USER_SEC
    PRIMARY KEY (
    USER_ID
    If your question is more process oriented(i.e table create process) please
    be a little more specific and I'd be happy to help you out.
    Thanks.
    Jason
    "Kunal Mittal" <[email protected]> wrote in message
    news:[email protected]..
    How does BEA generate primary keys in the various Portal tables(specificially
    I need to know this for the USER_SECURITY table)? We are in the processof
    migrating
    our 7.0 users to 8.1 and I don't want to break this process due tothe
    primary
    key generation scheme.
    Thanks
    Kunal

  • Please Help in generation of Random Numbers & Characters

    hai friends,
    Please help me to generate random Numbers and Characters to the Fields of the Table.
    Please Send code to it.
    madhava

    It's easier enough. Just use the DBMS_RANDOM package supplied by Oracle.
    SQL> desc rndm
    Name                                      Null?    Type
    COL1                                               NUMBER
    COL2                                               VARCHAR2(10)
    COL3                                               DATE
    SQL> BEGIN
      2     DBMS_RANDOM.initialize(12348765);
      3     FOR i IN 1..4 LOOP
      4        INSERT INTO rndm VALUES (dbms_random.value
      5                                 , dbms_random.string('A', 10)
      6                                 , sysdate + dbms_random.value(1,1000));
      7     END LOOP;
      8  END;
      9  /
    PL/SQL procedure successfully completed.
    SQL> SELECT * FROM rndm;
          COL1 COL2       COL3
    .028766128 pUFMxywBzC 14-JAN-07
      .7524715 SupFLVZmEC 22-JUN-07
    .454116997 EHCEZKPORm 14-FEB-05
    .330733477 gycpybxdRS 12-MAR-07
    SQL> Note that the published API seems to have changed in 9.2 (if not earlier), with the apparent sole purpose of DBMS_RANDOM being the generation of random numbers. However, as you can see, the old methods still work. Not sure what Oracle are up to.
    Cheers, APC

  • Open vi error for report generation toolkt

    Originally it works fine.
    Now I upgrade to win7, LV9 and office2010.
    To open the old program by 8.6.1, I reinstalled LV 8.6.1 and report generation toolkit.
    But still got the error as attached.
    Any suggestion, thanks.
    Attachments:
    ss.png ‏184 KB

    1. MS Office 2010 is not yet supported, since it's still just a beta. I believe there are couple of changes that Microsoft make, and it could cause a problem.
    2. LabVIEW 8.6.1, and all its toolkit is not supported on Windows 7. This could cause a problkem also.
    In conclusion, you should use LabVIEW 2009, Report Generation Toolkit 2009, Windows 7, and downgrade office to XP, 2003 or 2007.
    More information: http://digital.ni.com/public.nsf/allkb/C9408B9F08D​711E786256F3300701D01

  • 1st Generation iPod Touch No Longer Recognized by Windows 7 PC

    I have a 1st generation iPod Touch (no camera) that can no longer connect to my Windows 7 pc. Plugging in the iPod via USB does not trigger any sort of dialog box in Windows and it doesn't trigger a message saying a device has been connected; the iPod does not show up in either iTunes, Computer, Device Manager or Devices and Printers, either as an Apple mobile device or an unrecognized device, and does not charge when connected to USB (though the wall-charger still works). As far as my computer is concerned this iPod does not exist. I had successfully synced this iPod as recently as one week ago and am ready to pitch the thing in the garbage if I can't find a solution.
    I have the latest version of iTunes as well as the most up-to-date Windows updates. I have already followed all the steps listed here (iOS: Device not recognized in iTunes for Windows) multiple times with no success.
    I also have tried following the instructions listed here (Re: For those Windows users who suddenly cannot see their device in iTunes. Here's a solution that has worked.) but this also hasn't worked since the iPod isn't recognized in the Device Manager and I am not given the option of updating the drivers, manually or otherwise.
    I have uninstalled/re-installed iTunes and all related Apple services multiple times. The Apple Mobile Device Service is functioning normally. iTunes diagnostics indicate that there is no device connected no matter what I do. I have reinstalled my Windows USB drivers and changed the settings on the USB Root Hub in the Windows Device Manager to disable power saving options.
    I have tried connecting the device to another PC which detects and syncs another apple device (iPhone 5) with no issues, and had the exact same result: the computer doesn't even recognize an iPod is connected.
    I can't update the Apple Mobile Device Drivers because the device is not recognized by my machine in any way.
    I even completely reset my iPod and that just left me with a unactivated iPod that still isn't detected.
    I am really unbelievably fed-up with the useless "try checking your USB cable"-style advice that people seem to offer on this forum. If anybody has dealt with this issue and has any serious advice other than "re-install iTunes," it would be much appreciated.

    You said "I am really unbelievably fed-up with the useless "try checking your USB cable"-style"
    - Did you try another cable?
    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    Try on another computer

  • Query help : Query to get values SYSDATE-1 18:00 hrs to SYSDATE 08:00 hrs

    Hi Team
    I want the SQl query to get the data for the following comparison : -
    Order Created is a Date Column , and i want to find out all the values from (SYSDATE-1) 18:00 hours to SYSDATE 08:00 hours
    i.e.
    (SYSDATE-1) 18:00:00 < Order.Created < SYSDATE 08:00:00.
    Regards

    Hi, Rohit,
    942281 wrote:
    If i want the data in the below way i.e.
    from (SYSDATE-1) 18:00 hours to SYSDATE 17:59 hours ---> (SYSDATE-1) 18:00:00 < Order.Created < SYSDATE 07:59:00.If you want to include rows from exactly 18:00:00 yesterday (but no earlier), and exclude rows from exatly 08:00:00 today (or later), then use:
    WHERE   ord_dtl.submit_dt  >= TRUNC (SYSDATE) - (6 / 24)
    AND     ord_dtl.submit_dt  <  TRUNC (SYSDATE) + (8 / 24)
    So can i use the below format : -
    ord_dtl.submit_dt BETWEEN trunc(sysdate)-(6/24) and trunc(sysdate)+(7.59/24) . Please suggest . .59 hours is .59 * 60 * 60 = 2124 seconds (or .59 * 60 = 35.4 minutes), so the last time included in the range above is 07:35:24, not 07:59:59.
    If you really, really want to use BETWEEN (which includes both end points), then you could do it with date arithmentic:
    WHERE   ord_dtl.submit_dt  BETWEEN  TRUNC (SYSDATE) - (6 / 24)
                      AND         TRUNC (SYSDATE) + (8 / 24)
                                               - (1 / (24 * 60 * 60))but it would be simpler and less error prone to use INTERVALs, as Karthick suggested earlier:
    WHERE   ord_dtl.submit_dt  BETWEEN  TRUNC (SYSDATE) - INTERVAL '6' HOUR
                      AND         TRUNC (SYSDATE) + INTERVAL '8' HOUR
                                               - INTERVAL '1' SECONDEdited by: Frank Kulash on Apr 17, 2013 9:36 AM
    Edited by: Frank Kulash on Apr 17, 2013 11:56 AM
    Changed "- (8 /24)" to "+ (8 /24)" in first code fragment (after Blushadown, below)

Maybe you are looking for

  • When i connect my mac to internet it appear "ntpd"

    when i connect my mac to wifi it appear some messages at the centra of the screen with some of application normall used in my pc like adobe reader website with a band with and give the option to deny it or allow.Please can you help to stop this probl

  • A Tiger Software Update Question from the iBook Forum

    I just finished reading this question, http://discussions.apple.com/thread.jspa?messageID=12901184#12901184 in the iBook G4 forum and am very curious myself if this could be a problem with the update. If someone knows why this is happening, would you

  • Solaris 10 with Adaptec 7902 with 36G or 73G, not correctly find disk space

    I'm trying to install Solaris 10 x86 on an server on TYAN platform k8sr. Its got an Adaptec 7902 SCSI controller, without RAID. It used 36G drive - Solaris interface thinks there is only a 9G drive in the system! I change drive on 72G drive - Solaris

  • No connectivity in wifi in Lenovo laptop model 2409

    I can't connect my Lenovo laptop model 2409 in the wifi network in a campus. Previously it has never been in a wifi atmosphere but worked normally thru service provider data card/dongle. I successfully downloaded and installed the windows XP wifi dri

  • Ignore Save as Draft just consider Add Sales Order

    Dear all, I got a problem that the following code: If BusinessObjectInfo.FormTypeEx = "139" And BusinessObjectInfo.EventType =                              SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD Then If BusinessObjectInfo.BeforeAction = False And B