Find Time, when I give a SELECT query in oracle  ... ...

Dear Friends ,
Using the below query we got the username , sid with the CURRENT_SQL information .
SELECT s.sid sid, s.serial# serial_id, s.status session_status, s.username oracle_username, s.osuser os_username, p.spid os_pid, s.machine session_machine, s.program session_program
, s.client_info , SUBSTR(sa.sql_text, 1, 1024) current_sql FROM v$process p , v$session s , v$sqlarea sa WHERE p.addr = s.paddr AND s.sql_address = sa.address(+)
AND s.sql_hash_value = sa.hash_value(+) AND s.audsid <> userenv('SESSIONID') AND s.username IS NOT NULL AND s.status = 'ACTIVE' AND s.username not in ('SYS','SYSTEM','DBSNMP','SYSMAN') ORDER BY sid;
But I need to know in which time with date ,  I execute this SELECT query .
Here I explain my problem and that is , In my centralized database , we have a lot of clients . so If any client gives a command to show a report , I need to find out in which time he/she executes the report ?
Waiting for kind reply ... ...

The issue as you have described just does not make sense unless the recorders ae not ordered by the test number.
Does the number of records returned match the number in the DB?
Ben
PS: No Mike, you are still the DB guy. Relax. 
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction

Similar Messages

  • TIME-OUT error in BSAK select query(Progress Indicator is also used)

    Hi,
        In my report program one select query is there on BSAK table, which is as follows --
           SELECT BUKRS                                                     
                         BELNR
                        GJAHR
                        SHKZG
                        BSCHL
                        UMSKZ
                        LIFNR
                        EBELN
                        EBELP
                        WRBTR
                        DMBTR
                        XZAHL
                        REBZG
                       AUGBL
                       BLART
                       AUFNR
                       AUGDT
                       BUZEI FROM BSAK
                                  INTO TABLE IT_BSAK
                                  FOR ALL ENTRIES IN IT_BKPF1
                                   WHERE BUKRS = IT_BKPF1-BUKRS
                                                AND AUGDT = IT_BKPF1-BUDAT
                                                AND AUGBL = IT_BKPF1-BELNR
                                                AND BSCHL IN ('31' , '29', '26', '39', '25').
    I used Progress Indicator befor running this query and after this query also. But still It's giving me TIME-OUT error in this select query only.
      I run the same query for 10 records in IT_BKPF1 table, it runs perfectly. But when I run it for 1000 records it giving dump.
    And in actual bussiness my records are always more than 100 only.
    I also check the indexing. It having secondary indexing on this BUKRS, AUGDT, AUGBL fields. Then also it's giving error.
    so, How can I solve this dump..?? What could be the reason..??
    Thanks in advance...!!
    Regards,
    Poonam.

    Hi Poonam Patil,
    Try to provide BELNR and GJAHR in where condition...
    BKPF-DBBLG ==> BSAK-BELNR
    Also check
    BKPF-BLDAT ==> BSAK-AUGDT
    Check out above relation...
    If data is there in these fields of the table and both are matching then you can pass it and as they are in primary key of BSAK it will improve the performance...
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • Time Taking while firing a select Query

    i am unable to access the table "X" in ABC schema
    its taking toooooooooo much time while firing just a select query
    how to resolve it
    "SELECT digital_signing_cert
    FROM X"

    could be due to huge table size,crosscheck this from user_segments view.
    select bytes/1024/1024 "MB" from user_segments where segment_name='X';
    also check database alert log for any error.

  • How to find out when data was deleted from table in oracle and Who deleted that

    HI Experts,
    Help me for below query:
    how to find out when data was deleted from table in oracle and Who deleted that ?
    I did that to fidn out some data from dba_tab_modifications, but I m not sure that what timestamp shows, wether it shows for update,insert or delete time ?
    SQL> select TABLE_OWNER,TABLE_NAME,INSERTS,UPDATES,DELETES,TIMESTAMP,DROP_SEGMENTS,TRUNCATED from dba_tab_modifications where TABLE_NAME='F9001';
    TABLE_OWNER                    TABLE_NAME                        INSERTS    UPDATES    DELETES     TIMESTAMP         DROP_SEGMENTS TRU
    PRODCTL                        F9001                                                     1683         46       2171            11-12-13 18:23:39             0                   NO
    Audit is enable in my enviroment?
    customer is facing the issue and data missing in the table and I told him that yes there is a delete at 11-12-13 18:23:39 in table after seeing the DELETS column and timestamp in dba_tab_modifications, but not sure I am right or not
    SQL> show parameter audit
    NAME                                 TYPE        VALUE
    audit_file_dest                      string      /oracle/admin/pbowe/adump
    audit_sys_operations                 boolean     TRUE
    audit_syslog_level                   string
    audit_trail                          string      DB, EXTENDED
    please help
    Thanks
    Sam

    LOGMiner --> Using LogMiner to Analyze Redo Log Files
    AUDIT --> Configuring and Administering Auditing

  • Runtime error(Time limit exceeds)after executing select query

    Dear experts, whenever i executing the select query in this zprogram i am getting runtime error that time limit exceeds.i am using inner join and into table.after that also i am geetting error. how can i resolve it??
    SELECT LIKP~VBELN LIKP~WADAT_IST LIKP~VEHICLE_NO LIKP~TRNAME
              LIKP~VEHI_TYPE LIKP~LR_NO LIKP~ANZPK LIKP~W_BILL_NO
              LIKP~SEALNO1                                       " Seal NO1
              LIKP~SEALNO2                                       " Seal NO2
              LIPS~LFIMG
              VBRP~VBELN VBRP~VGBEL VBRP~MATNR VBRP~AUBEL VBRP~FKIMG
              VBAK~AUART
              VBRK~FKART VBRK~KNUMV VBRK~FKSTO
              FROM LIKP INNER JOIN LIPS ON LIKP~VBELN EQ LIPS~VBELN
                        INNER JOIN VBRP ON LIKP~VBELN EQ VBRP~VGBEL
                        INNER JOIN VBAK ON VBRP~AUBEL EQ VBAK~VBELN
                        INNER JOIN VBRK ON VBRP~VBELN EQ VBRK~VBELN
              INTO TABLE  I_FINAL_TEMP
              WHERE LIKP~VSTEL = '5100' AND
                 LIKP~WADAT_IST IN S_WADAT  AND
                    VBRP~AUBEL IN S_AUBEL AND
                    VBAK~AUART IN ('ZJOB','ZOR') AND
                    VBRK~FKART IN S_FKART AND
    *               VBRK~FKART IN ('ZF8','ZF2','ZS1') AND
                    VBRK~FKSTO NE 'X'.
    When I am debugging the select query.the cursor will not go to next step.after 15-20 minutes i am getting runtime error(time limit exceeds).
    how can i resolve it for that scenario??

    Looks like whole SD flow you trying to fetch in single query
    First you check the database statistic of these table are upto date in system ( Check with basis team )
    if this query was working fine earlier.
    Most of table involved are huge volume tables which queried with any primary key
    Any secondary index on created for LIKP on VSTEL WADET ?
    My suggestion would be split the selection queries and make use of primary or existing secondary index to fetch the desired result if possible. For testing purpose split the queries and find which is taking more time and which needs index by taking squel trace in ST05.
    Also take ST05 trace of this query in debugger ( New debugger -> special tool -> trace > ST05/SE30)

  • To find time when the user was dropped oracle

    Hi Experts,
    I have query from my auditor that will it be possible to find the time when the oracle user was dropped .
    Vesrion oracle 10g,11g
    Can we find it through audit trail or there is some dynamic performacne view which keeps this information.
    Or other wise we have to create some trigger manually to capture the time if so then please provide the details of the same
    A quick responce will be helpfull ....

    See here : 11.2.0.1 Windows XP
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select username from dba_audit_trail
      2  where
      3  action=53;
    no rows selected
    SQL> show parameter audit;
    NAME                                 TYPE        VALUE
    audit_file_dest                      string      E:\APP\SERVERROOM\ADMIN\ORCL\A
                                                     DUMP
    audit_sys_operations                 boolean     FALSE
    audit_trail                          string      DB_EXTENDED
    SQL> audit drop user;
    Audit succeeded.
    SQL> create user test identified by test;
    User created.
    SQL> drop user test;
    User dropped.
    SQL> column sql_text for a50;
    SQL> set line 200;
    SQL> select username,
      2  timestamp,
      3  sql_text
      4  from dba_audit_trail
      5  where
      6  action=53
      7  /
    USERNAME                       TIMESTAMP SQL_TEXT
    SCOTT                          30-APR-12 drop user test
    SQL>So, answer is action=53 in dba_audit_trail for drop user and for specific user just add like operator with sql_text column. Means, scott user droped the test user on 30-APR-12.
    If you wish to know the meaning of action column of dba_audit_trail then see below link :
    http://docs.oracle.com/cd/B19306_01/server.102/b14237/dynviews_2088.htm#g1432037
    command.v$session = action.dba_audit_trail
    If this answer your question, please close the thread, else continue.
    Regards
    Girish Sharma

  • Find time when DB went down (nothing in alert log).

    hello all,
    is there any way to tell when the DB went down. Yesterday we had some outage in our datacenter and it took down one of our servers. And this morning i started the DB and they went up fine with no problem. But is there any way to find out when the DB went down (there was nothing written in the alert log)...and our sysadmin is on Vac...and the management wants me to find out when the server/database went down...does oracle record this thing any place in the DB besides the alert log ?? we are on 10.2.0.3 on hp-ux. We can look at the OS to find this out, but as mentioned our sysadmin is out and dont have access to root...

    Hello user630084,
    Pls try this. I had to check the same on one of our client boxes without unix access and I used the below to find. it worked for me.
    (10.2.0.4 version)
    SELECT SCN_TO_TIMESTAMP(TIMESTAMP_TO_SCN(startup_time)) "DB Shutdown Time" , startup_time "DB Startup Time" FROM v$instance
    Hope this works for u aswell.
    Krishna

  • Using case when statement in the select query to create physical table

    Hello,
    I have a requirement where in I have to execute a case when statement with a session variable while creating a physical table using a select query. let me explain with an example.
    I have a physical table based on a select table with one column.
    SELECT 'VALUEOF(NQ_SESSION.NAME_PARAMETER)' AS NAME_PARAMETER FROM DUAL. Let me call this table as the NAME_PARAMETER table.
    I also have a customer table.
    In my dashboard that has two pages, Page 1 contains a table with the customer table with column navigation to my second dashboard page.
    In my second dashboard page I created a dashboard report based on NAME_PARAMETER table and a prompt based on customer table that sets the NAME_ PARAMETER request variable.
    EXECUTION
    When i click on a particular customer, the prompt sets the variable NAME_PARAMETER and the NAME_PARAMETER table shows the appropriate customer.
    everything works as expected. YE!!
    Now i created another table called NAME_PARAMETER1 with a little modification to the earlier table. the query is as follows.
    SELECT CASE WHEN 'VALUEOF(NQ_SESSION.NAME_PARAMETER)'='Customer 1' THEN 'TEST_MART1' ELSE TEST_MART2' END AS NAME_PARAMETER
    FROM DUAL
    Now I pull in this table into the second dashboard page along with the NAME_PARAMETER table report.
    surprisingly, NAME_PARAMETER table report executes as is, but the other report based on the NAME_PARAMETER1 table fails with the following error.
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 16001] ODBC error state: S1000 code: 1756 message: [Oracle][ODBC][Ora]ORA-01756: quoted string not properly terminated. [nQSError: 16014] SQL statement preparation failed. (HY000)
    SQL Issued: SET VARIABLE NAME_PARAMETER='Novartis';SELECT NAME_PARAMETER.NAME_PARAMETER saw_0 FROM POC_ONE_DOT_TWO ORDER BY saw_0
    If anyone has any explanation to this error and how we can achieve the same, please help.
    Thanks.

    Hello,
    Updates :) sorry.. the error was a stupid one.. I resolved and I got stuck at my next step.
    I am creating a physical table using a select query. But I am trying to obtain the name of the table dynamically.
    Here is what I am trying to do. the select query of the physical table is as follows.
    SELECT CUSTOMER_ID AS CUSTOMER_ID, CUSTOMER_NAME AS CUSTOMER_NAME FROM 'VALUEOF(NQ_SESSION.SCHEMA_NAME)'.CUSTOMER.
    The idea behind this is to obtain the data from the same table from different schemas dynamically based on what a session variable. Please let me know if there is a way to achieve this, if not please let me know if this can be achieved in any other method in OBIEE.
    Thanks.

  • When I do a select query, using DB Toolkit, I get less data than I expect

    I run a select query and I want to get test number 271 and above.  The data that is returned begins with test 273 instead.  If I do a query in Access I can see that tests 271 and 272 are in the database.  What can I do to get the right data?
    Charlie

    The issue as you have described just does not make sense unless the recorders ae not ordered by the test number.
    Does the number of records returned match the number in the DB?
    Ben
    PS: No Mike, you are still the DB guy. Relax. 
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to get result of select query from  oracle  in VC

    Dear All ,
    I have a application in oracle which insert the data in the oracle database table.
    Now i want to show all the data that has been inserted into the database table in my VC application but i don't know how to handle select query in VC.
    Regards
    Krishan

    Hi Goivndu
    Thanks for your reply .
    I know all those things.
    I have created the system & alias  for my backend oracle system.
    I can also see all the stored procedure that are there in my oracle system.
    I just want to know how to write a select query in a stored procedure .
    you can insert data , Update data through oracle procedure but i don't think there is any way to get the result of select query in stored procedure .
    If you know any way to do that please do let me know .
    Regards
    Krishan

  • NullPointerException on System.arraycopy command while executing select query in Oracle 10

    I'm getting this error below while trying to execute some select query.
        java.lang.NullPointerException at java.lang.System.arrayCopy(Native Method) at
        oracle jdbc.driver.T4CNumberAccessor.saveDataFromOldDefineBuffers(T4CNumberAccessor.java:276) at
        oracle.jdbc.driver.T4CPreparedStatement.saveDefineBuffersIfRequired(T4cPreparedStatement.java:486) at
        oracle.jdbc.driver.OracleStatement.prepareAccessors(OracleStatement.java:919) at
        oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(T4CPreparedStatement:836) at
        oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1124) at
        oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3286) at
        oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3329) at
    I've already downloaded the latest ojdbc5.jar file to access Oracle 10 database.
    This is my java version:
        bash$java -version
        HEAP_DUMP_OPTIONS= -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=../Logs -XX:+PrintClassHistogram
        java version "1.5.0_22"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
        Java HotSpot(TM) Server VM (build 1.5.0_22-b03, mixed mode)
    Any idea of what may cause this problem?

    No one can debug code that they can't see.
    You need to SHOW US (not just tell us):
    1. WHAT you are doing
    2. HOW you are doing it
    3. WHAT result you are getting
    4. WHAT result you expected to get.
    The latest JDBC jar that can access Oracle 10 DBs is the 12.1.0.2 driver and is available here:
    JDBC/UCP Download Page

  • Siri ask for Time when I give a location

    I have my home and work address in my contact info.  When I ask Siri to create a reminder based on arriving at work or home, she asks for the time.  I get to work ar 7 and she wants to make the reminder for 9AM after I get to work.  How do I fix this?  When I first did location based reminder, she worked fine.

    I encoutner the same problem with my iPhone 5.  When I talked to Siri with "Remind me to call XXX when I arrive office", Siri just keeps on asking my time, "Ok, I'll remind you to call XXX.  When would you like to be reminded.".  When I replyed "Tomorrow", it just creates a remind with a default time, without any location information.
    If I deleted my office address from my contact, Siri knows to ask me to provide the office address with the same command "Remind me to call XXX when I arrive office".  So, I know Siri understands the syntax of the command, but it just won't create a location-based reminder.
    I checked that Siri is allowed to use the location service and I have already set the time zone correctly....

  • How to LOOP SELECT Query in Oracle?

    Hello
    I have a query which use a variable (:enddate) and returns a set of data. Lets assume it gives sales totals by account for a given month (specified using the variable :enddate). So the query would look something like :
    SELECT ACCOUNT_NO, SUM(SALE_AMT) TOTAL_SALES FROM SCHEMA1.SALES_LINES, :ENDDATE as END_DATE WHERE SALE_DATE BETWEEN addmonths(:ENDDATE,-1) and :ENDDATE
    GROUP BY ACCOUNT_NO
    Now, currently, I have to run this query each time I need results for a particular date, and thats OK but the problem arises when I need to run this query for an entire year. Then I have to run the query 12 times, passing the date variable each time and re-running the query.
    What I would like to do, is to create a loop which covers a time period entered by the user (e.g. user enters 12 months as the total time and 1 month as the period, and the query automatically runs for the previous 12 months, passing :enddate 1 month at a time and then presents the combined results) OR takes a bunch of dates entered in an array, (e.g. :enddate in (JAN-31-2009, Feb-28-2009, MAR-31-2009, APR-30,2009 etc) and runs the query for each of them and presents the results together in one set.
    How can I do this using a simple PLSQL loop? I would like to avoid creating a procedure if possible. Sample code will be much appreciated.
    BTW, I am using Oracle XE 10g.
    Thanks

    Hi,
    It will be more efficient to get all the results at once, rather than running 12 separate queries.
    You can do that without loops or PL/SQL, something like this:
    SELECT    account_no
    ,       TRUNC (sale_date, 'MONTH')     AS mnth
    ,        SUM (sale_amt)          AS total_sales
    FROM        schema1.sales_lines
    WHERE       sale_date     >  ADD_MONTHS (:enddate, -12)
    AND       sale_date     <= :enddate
    GROUP BY  account_no
    ,            TRUNC (sale_date, 'MONTH')
    ;Of course, you can do a query like this within PL/SQL if you need to.
    If you'd care to post some sample data (CREATE TABLE and INSERT statements) and the results you want from that data, then I could test it.
    Simplify as much as possible. For example, instead of 12 sepaarte months, you can post just 2 or 3. Adapting the solution for 12 months should be easy.
    In pure SQL, bind varibales can't be DATEs, but you could define the bind variable as a string and use TO_DATE to convert it to a DATE, OR use a substitution variable instead of a bind variable.
    The solution above works in all versions Oracle. The way you're using :enddate in the FROM clause, and a function called addmonths (rather than ADD_MONTHS) makes me wonder if you're using Oracle at all.

  • Aggregation select query in oracle database10.2/linux

    Hi friends,
    I required to build matrix kind of report which should includes segregated and aggregated values in single query and format can be as follows.. i am trying on scott.emp table
    example:
    Job/deptno 10 20 30 40 50 total
    CLERK sum(Sal) sum(sal) sum(Sal) sum(sal) sum(Sal) sum(all clearks in all dept)
    MANAGER sum(Sal) sum(sal) sum(Sal) sum(sal) sum(Sal) sum(all mng all dept)
    SALESMAN sum(Sal) sum(sal) sum(Sal) sum(sal) sum(Sal) sum(all salres in all dept)
    ANALYST sum(Sal) sum(sal) sum(Sal) sum(sal) sum(Sal) sum(all ana in all dept)
    if possible
    cout(*) countof all 10, count(20), count(30)... etc..
    could you please help me out with single query? please. thanks in advance

    Try this:
    SELECT     JOB
    ,     MAX(DECODE(DEPTNO,10,SAL,0))      AS SUM_DEPT_10
    ,     MAX(DECODE(DEPTNO,20,SAL,0))      AS SUM_DEPT_20
    ,     MAX(DECODE(DEPTNO,30,SAL,0))      AS SUM_DEPT_30
    ,     MAX(DECODE(GRP,1,SAL,0))      AS SUM_TOTAL
    ,     MAX(DECODE(DEPTNO,10,CNT,0))      AS CNT_DEPT_10
    ,     MAX(DECODE(DEPTNO,20,CNT,0))      AS CNT_DEPT_20
    ,     MAX(DECODE(DEPTNO,30,CNT,0))      AS CNT_DEPT_30
    ,     MAX(DECODE(GRP,1,CNT,0))      AS CNT_TOTAL
    FROM
    (     SELECT     DEPTNO
         ,     JOB
         ,     SUM(SAL)      AS SAL
         ,     COUNT(*)      AS CNT
         ,     GROUPING(DEPTNO) AS GRP
         FROM     SCOTT.EMP
         GROUP BY JOB,ROLLUP(DEPTNO)
    GROUP BY JOB

  • Select Query taking long time to run second time

    Hi All,
    I have Oracle 11gR1 in windows server 2008 R2 .
    I have some tables with 10 million records . When i run the select query for those tables first time it gives me result in 15 seconds but if i am running the same script second time from the same session I am getting the result in 15 minutes to complete ..
    Why it is happening? What may be the solution for this ?
    Thanks & Regards,
    Vikash jain(Junior DBA)

    Hi Mohamed,
    I just saw that both the times for the same query execution plan is different ..
    here are the details :
    First time Second Time
    g84m3qqjv2p3q g84m3qqjv2p3q
    2733045235 1310485984
    So plz tell me how should i force database to use the first execution plan ?
    I got this script for forcing the Db to use the same execution plan
    accept sql_id -
    prompt 'Enter value for sql_id: ' -
    default 'X0X0X0X0'
    accept plan_hash_value -
    prompt 'Enter value for plan_hash_value: ' -
    default 'X0X0X0X0'
    accept fixed -
    prompt 'Enter value for fixed (NO): ' -
    default 'NO'
    accept enabled -
    prompt 'Enter value for enabled (YES): ' -
    default 'YES'
    accept plan_name -
    prompt 'Enter value for plan_name (ID_sqlid_planhashvalue): ' -
    default 'X0X0X0X0'
    set feedback off
    set sqlblanklines on
    set serveroutput on
    declare
    l_plan_name varchar2(40);
    l_old_plan_name varchar2(40);
    l_sql_handle varchar2(40);
    ret binary_integer;
    l_sql_id varchar2(13);
    l_plan_hash_value number;
    l_fixed varchar2(3);
    l_enabled varchar2(3);
    major_release varchar2(3);
    minor_release varchar2(3);
    begin
    select regexp_replace(version,'\..*'), regexp_substr(version,'[0-9]+',1,2) into major_release, minor_release from v$instance;
    minor_release := 2;
    l_sql_id := '&&sql_id';
    l_plan_hash_value := to_number('&&plan_hash_value');
    l_fixed := '&&fixed';
    l_enabled := '&&enabled';
    ret := dbms_spm.load_plans_from_cursor_cache(
    sql_id=>l_sql_id,
    plan_hash_value=>l_plan_hash_value,
    fixed=>l_fixed,
    enabled=>l_enabled);
    if minor_release = '1' then
    -- 11gR1 has a bug that prevents renaming Baselines
    dbms_output.put_line(' ');
    dbms_output.put_line('Baseline created.');
    dbms_output.put_line(' ');
    else
    -- This statements looks for Baselines create in the last 4 seconds
    select sql_handle, plan_name,
    decode('&&plan_name','X0X0X0X0','SQLID_'||'&&sql_id'||'_'||'&&plan_hash_value','&&plan_name')
    into l_sql_handle, l_old_plan_name, l_plan_name
    from dba_sql_plan_baselines spb
    where created > sysdate-(1/24/60/15);
    ret := dbms_spm.alter_sql_plan_baseline(
    sql_handle=>l_sql_handle,
    plan_name=>l_old_plan_name,
    attribute_name=>'PLAN_NAME',
    attribute_value=>l_plan_name);
    dbms_output.put_line(' ');
    dbms_output.put_line('Baseline '||upper(l_plan_name)||' created.');
    dbms_output.put_line(' ');
    end if;
    end;
    undef sql_id
    undef plan_hash_value
    undef plan_name
    undef fixed
    set feedback on
    Output:
    Enter value for sql_id: g84m3qqjv2p3q
    Enter value for plan_hash_value: 2733045235
    Enter value for fixed (NO):
    Enter value for enabled (YES):
    Enter value for plan_name (ID_sqlid_planhashvalue): g84m3qqjv2p3q
    old 16: l_sql_id := '&&sql_id';
    new 16: l_sql_id := 'g84m3qqjv2p3q';
    old 17: l_plan_hash_value := to_number('&&plan_hash_value');
    new 17: l_plan_hash_value := to_number('2733045235');
    old 18: l_fixed := '&&fixed';
    new 18: l_fixed := 'NO';
    old 19: l_enabled := '&&enabled';
    new 19: l_enabled := 'YES';
    old 40: decode('&&plan_name','X0X0X0X0','SQLID_'||'&&sql_id'||'_'||'&&plan_hash_value','&&plan_name')
    new 40: decode('g84m3qqjv2p3q','X0X0X0X0','SQLID_'||'g84m3qqjv2p3q'||'_'||'2733045235','g84m3qqjv2p3q')
    declare
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at line 39
    Kindly help me to resolve the issue ..
    Thanks & Regards,
    Vikash Jain(Junior DBA)

Maybe you are looking for