Why collect Stats of schema?

Hi all

I truncated all the tables in the schema of my HR dev.

So I ran > exe dbms_stats.gather_schema_stats ('HR');

But the column num_nows in USER_TABLES are all have the old values :(
I expect all "zeros".

How to operate the stats updated for cost based optimizer?


Thank you very much

KinsaKaUy? wrote:

SQL> exec dbms_stats.gather_table_stats('HR','HR_AUDIT');
BEGIN dbms_stats.gather_table_stats('HR','HR_AUDIT'); END;

*
ERROR at line 1:
ORA-20005: object statistics are locked (stattype = ALL)
ORA-06512: at "SYS.DBMS_STATS", line 20337
ORA-06512: at "SYS.DBMS_STATS", line 20360
ORA-06512: at line 1

Huhuhu which is causing this lock? I already have to stop/start the database :(

You have the answer with you.
Even if you bounce database, that it will not UNLOCK, unlock if statistical table manually. :)

check this http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_stats.htm#i1045149

Tags: Database

Similar Questions

  • Is there some collect Stats of schema in the menu "adadmin?

    Hi all

    EBS R12.2

    RHEL 6.6

    In the EBS R12.2, where can I run a simultaneous Manager who "analyze statistical computing" for the optimizer base cost of work?

    I only do it on the back-end database side help > exec dbms_stats.gather_schema_stats ('APPS');

    But there are many schema in EBS, how can I run only at the database level?

    Is there a script pre-built for collecting statistics of entire database? / rdbms/admin folder?

    Is there a module to collect all the statistics schema in ADADMIN?

    Thank you very much

    MK

    The supported method of collecting statistics are:

    -Run the simultaneous program "Gathering statistics for schema" (pass 'ALL' for all schemas).

    -Use fnd_stats.gather_schema_statistics

    EBPERF FAQ - collection of statistics in Oracle EBS 11i and R12 (Doc ID 368252.1)--8) what are the supported methods to collect statistics for the EBS schemas?

    Dbms_stats.gather_schema_stats using is not supported.

    Thank you

    Hussein

  • Is why my Stats of schema gather to hold?

    Hi all

    EBS R12.1.3

    RHEL6

    I've been planning simultaneous program "Gathering statistics for schema" since last year.

    When I check the work, he was waiting.

    How can I find out what this task was last run?

    Capture.PNG

    Hello

    When you click details, then the application will be held until you leave the details window.

    What is your policy of purging?

    You can search the query by name and bring to 30 the number of days (for example) and see when he ran the last time.

    Kind regards

    Bashar

  • Module FNDGSCST: collect statistics of schema

    I had a problem similar to this, and I remember drew to a close with name change or drop the object in question.

    Surely, there MUST be a way for that:

    1. concurrent demand Gather schema Stats can still function (with the object with this name, always on the database)

    2 preferably also the contractors that object as well (so, not as a 'fix' have this object being excluded a request competitor buggy)

    It's on a 12.1.3 environment.

    I thought that the cause of this problem is someone with exotic filenames on objects additional eBS, without thinking about the consequences. I have no idea about the source of this particular object (I guess there is more than 1).

    Is there a definitive solution to this problem? Concurrent demand to collect Stats of scheme has had a very bad reputation, not only thanks to this bug. Problem is that it stops on ALL issues, which is another bug.

    * Starts * April 2, 2014 15:05:58

    Error ORACLE 20001 in FDPSTP

    Cause: FDPSTP failed due to the ORA-20001: SYS_NT4IBAQZIU2MRGQKWKXDGZYG == is an invalid identifier

    ORA-06512: at the 'APPS '. FND_STATS', line 774

    ORA-06512: at line 1

    .

    The SQL statement being executed at the time of the error was: SE

    +---------------------------------------------------------------------------+

    Beginning of the FND_FILE log messages

    +---------------------------------------------------------------------------+

    In GATHER_SCHEMA_STATS, schema_name = per cent = 40 degree = 1 internal_flag = NOBACKUP

    ORA-20001: SYS_NT4IBAQZIU2MRGQKWKXDGZYG == is an invalid identifier

    +---------------------------------------------------------------------------+

    End of the FND_FILE log messages

    +---------------------------------------------------------------------------+

    See if he can help MOS Doc 1363044.1

  • Creating a collection of level schema using % ROWTYPE

    Hi all
    is it possible to create a record of the collection at the schema level using % ROWTYPE? I try to do this:
    SQL> create or replace type some_type is table of hr.employees%rowtype;
      2  /
    
    Warning: Type created with compilation errors.
    
    SQL> sho err
    Errors for TYPE SOME_TYPE:
    
    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    0/0      PL/SQL: Compilation unit analysis terminated
    1/31      PLS-00329: schema-level type has illegal reference to
          HR.EMPLOYEES
    I was complaining ' illegal reference to the hr.employees table (I used the hr sample schema).» Any ideas?

    Best regards
    Val

    Valerie Debonair wrote:

    is it possible to create a record of the collection at the schema level using % ROWTYPE? I have

    No. + % RowType + is a macro compiler of PL/SQL used by the PL/SQL engine to generate a record structure.

    The SQL engine does not support PL/SQL data types - just as the engine SQL does not support C/C++ or Java or c# data types.

    PL/SQL, however, integrates SQL - and if it supports all SQL data types. SQL is SQL SQL... it does not support the 3rd languages like PL/SQL or Java or C/C++.

    So if you want to have a definition that you specify, it must be a "pure" SQL data type (not PL/SQL). And this data type that results can be used in PL/SQL and C/C++ and Java, and so on.

  • Unique constraint during the race error collecting statistics of schema

    Hello
    I get this error periodically during execution to collect statistics of schema
    In GATHER_SCHEMA_STATS , schema_name= ALL percent= 40 degree = 8 internal_flag= NOBACKUP
    Unable to correctly update the history table - fnd_stats_hist.
    -1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated
    Unable to correctly update the history table - fnd_stats_hist.
    -1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated
    Unable to correctly update the history table - fnd_stats_hist.
    -1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated
    Unable to correctly update the history table - fnd_stats_hist.
    -1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated
    Unable to correctly update the history table - fnd_stats_hist.
    -1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated
    Unable to correctly update the history table - fnd_stats_hist.
    -1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated
    Unable to correctly update the history table - fnd_stats_hist.
    -1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated
    Unable to correctly update the history table - fnd_stats_hist.
    -1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated
    Unable to correctly update the history table - fnd_stats_hist.
    -1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated
    Unable to correctly update the history table - fnd_stats_hist.
    -1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated
    Unable to correctly update the history table - fnd_stats_hist.
    -1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated
    I went thru notes 470556.1 , but I have not applied patch 5876047 according to the note.

    I can truncate table FND_STATS_HIST? Is it safe to truncate this table?

    Thank you
    ARS

    Published by: user7640966 on January 2, 2011 23:58

    Hi Ars;

    If I suggest his prod, make sure you have a valid backup of your system and also raise sr and confirm with oracle support. If you are on the clone or test, such as mention of doc first to backup table FND_STATS_HIST (make sure that you have a valid backup), truncate and repeat the test question

    Respect of
    HELIOS

  • Collect Stats once a day for OMA

    Hi friends,

    OEM Grid Control 10g WHO/OMA
    RHEL 4.6

    It is just an example scenario.
    Given:
    I have a CMS to the main office on a server.
    I have a client OMA target relmote.


    I am tracking our remote client, who has DB Oracle 9i using OMA.
    I want to collect statistics on this client every 17:00, because they shut down the server, after office hours.
    Office hours for this client is 08:00 - 17:00. And the server closes at 18:00. So I need to download the stats at 17:00.

    Given that I am only collecting stat at 17:00, peux I just turn on my main server of WHO at 17:00 too, just to receive updates of this customer? Then I close after updates, so again and repeat the process daily? It comes
    to save power consumption. Is this a good practice?


    Thank you very much

    Ms. K

    Hello

    To get alerts, WHO/repository database must be running.
    for example if your CMS is down, agent targets will still meet the target of the data and the agent can store up to 50 MB (default) and after that it will stop the data collection. It will also continue to try to reach to the WHO and once WHO is in place, it will download all the data and you will get all alerts (latest alerts as well).

    So it is always best to keep the agent targets downwards or mode blackout for the unavailability of the WHO.

    To monitor the database of the WHO/repository, you an agent installed on the primary server also. So even if you keep the officer down, you will always get alerts on targets except WHO/rest DB. It is therefore necessary to follow this agent because as prod, your tracking will be done through OEM and if something goes wrong with CMS, you won't know.

    It is also very easy to blackout and only once, you can select all the targets and the blackout.

    As far as I know, but I have not tested, you can also keep the SGD in blackout mode, but you will still get alerts on other targets...
    Also, if you don't want to receive alerts by e-mail during a time window, you can set up your electronic mail as a result notification schedule and you will get alert e mail during this time window only.

    You also have the option to suspend the notification also.

    Concerning
    Rajesh

  • How to improve the process of collecting stats

    Hello

    We have every day to collect the stats of five patterns but it last 6-7 hours

    We use the following command to do this

    exec DBMS_STATS. GATHER_SCHEMA_STATS (ownname = > 'FFPREPRODBATCH', estimate_percent = > DBMS_STATS.) AUTO_SAMPLE_SIZE);
    exec DBMS_STATS. GATHER_SCHEMA_STATS (ownname = > 'FFPREPRODMASTER', estimate_percent = > DBMS_STATS.) AUTO_SAMPLE_SIZE);
    exec DBMS_STATS. GATHER_SCHEMA_STATS (ownname = > 'FFPREPRODMCT', estimate_percent = > DBMS_STATS.) AUTO_SAMPLE_SIZE);
    exec DBMS_STATS. GATHER_SCHEMA_STATS (ownname = > 'FFPREPRODCMS', estimate_percent = > DBMS_STATS.) AUTO_SAMPLE_SIZE);
    exec DBMS_STATS. GATHER_SCHEMA_STATS (ownname = > 'FFPREPRODUSER', estimate_percent = > DBMS_STATS.) AUTO_SAMPLE_SIZE);

    last schema was taking more time about 5 hours.

    Please tell me how I can improve the speed.

    Thank you.

    user12009184 wrote:
    Hello

    We have every day to collect the stats of five patterns but it last 6-7 hours

    We use the following command to do this

    exec DBMS_STATS. GATHER_SCHEMA_STATS (ownname => 'FFPREPRODBATCH', estimate_percent => DBMS_STATS. AUTO_SAMPLE_SIZE);
    exec DBMS_STATS. GATHER_SCHEMA_STATS (ownname => 'FFPREPRODMASTER', estimate_percent => DBMS_STATS. AUTO_SAMPLE_SIZE);
    exec DBMS_STATS. GATHER_SCHEMA_STATS (ownname => 'FFPREPRODMCT', estimate_percent => DBMS_STATS. AUTO_SAMPLE_SIZE);
    exec DBMS_STATS. GATHER_SCHEMA_STATS (ownname => 'FFPREPRODCMS', estimate_percent => DBMS_STATS. AUTO_SAMPLE_SIZE);
    exec DBMS_STATS. GATHER_SCHEMA_STATS (ownname => 'FFPREPRODUSER', estimate_percent => DBMS_STATS. AUTO_SAMPLE_SIZE);

    last schema was taking more time about 5 hours.

    Please tell me how I can improve the speed.

    Thank you.

    SQL performance with dbms_stats, read below
    http://www.DBA-Oracle.com/art_builder_dbms_stats.htm

  • Why collected addresses included in the personal address since v38

    I used to have collected address book and the personal address book. Since V38, entries in the collected addresses are now in personal addresses as well. I do have duplicates. When I delete an entry for the home address, it is also deleted in the collected addresses if it was in the two places, it should not been, according to the previous version of tuberculosis. Have I missed a new parameter and if not, why the change? It defeats the purpose of having separate addresses.

    Maybe you missed the creation of address ALL appearing at the top of the list of address book now book? Missing would give the impression that collected address were in the personal address book.

  • Periodical to collect Statictis of schema

    Hi all

    EBS R12.2.4

    11 GR 2

    Rhel6.5

    We have a planned simultaneous Manager run every Sunday at 17:00 the schema grather statis.

    We also have many other scheduled tasks as well as Workflows, etc.

    These updates of process also replicated on our database of EVE? Don't feel that it will operate busy all the time as well, even when there is no logged-on user?

    Thank you very much

    JC

    Hello

    use under request

    SELECT

    A.REQUEST_ID,

    B.USER_NAME,

    C.USER_CONCURRENT_PROGRAM_NAME,

    C.ARGUMENT_TEXT

    Of

    FND_CONCURRENT_REQUESTS,.

    B FND_USER,

    C FND_CONC_REQ_SUMMARY_V

    WHERE

    A.REQUESTED_BY = B.USER_ID

    AND A.REQUEST_ID = C.REQUEST_ID

    AND A.REQUESTED_START_DATE > SYSDATE

    AND A.HOLD_FLAG = N

    AND A.STATUS_CODE IN ('Q', 'I')

    AND B.USER_NAME LIKE '% '.

    AND A.DESCRIPTION LIKE '% '.

    ORDER BY

    A.REQUEST_ID

    concerning

    Pravin

  • Why control statements such a ROLLBACK or COMMIT of the Transaction are not written in the trigger?


    Hello world

    Why the ROLLBACK statement or COMMIT are not allowed in the trigger? and if I then use this problem may happen?

    IndiMinds wrote:

    Hello world

    Why the ROLLBACK statement or COMMIT are not allowed in the trigger? and if I then use this problem may happen?

    Because a trigger is NOT a transaction. This is a SINGLE STATEMENT, which is part of another transaction.

    What is the problem? Well, if the trigger does not use the pragma AUTONOMOUS_TRANSACTION to the 'problem' that occurs is an Oracle exception, since you cannot use commit or rollback in the standard triggers.

    If a trigger contained a VALIDATION you wouldn't be able to write a transaction that contained multiple measures correctly.

    What happens if you insert rows in multiple tables and you want to perform a COMMIT ONLY if all three insertions succeed?

    This is not possible if one of the tables had a trigger with a posting in it.

    What do you want to learn more about?

  • Collect Stats Job Proc in 11.2.0.3

    Hello

    I would like to discuss this theme a little. What I don't know, is what works directly appeal dbms_stats.gather_database_stats_job_proc)

    It is originally at night on application performance issues, lost connections

    in dba_jobs is not, in dba_scheduler_jobs, it's false, in dba_scheduler_programs, that the program is activated and there is the call to dbms_stats.gather_database_stats_job_proc in program_action control_management_pack_access NONE so is the first line begin if prvt_advisor.is_pack_enabled('DIAGNOSTIC') then dbsnmp.bsln_internal.maintain_statistics; end; end; so will be ignored... autotask optimizer auto stats collection is enabled

    It is the vocation of autotask work * (_job_proc)? I don't know what else I need to check.

    Thank you

    I do not understand the problem: it starts because you activated. If you want the technical details, there is a fleeting background process (ABP0 if I remember correctly) that manages all of the active autotasks.

  • Collect statistics of schema is no longer can be cancelled but Phase set EXECUTION

    Hi all.

    After a work of statistics gather scheme was started inadvertently, I canceled it. Now we can see that the parent process is blocked in:

    Phase = running

    Status = in pause.

    If we try to cancel, we see "request * can no longer be cancelled.» The concurrent Manager process that running this application has ended abnormally. The ICM will mark this request as completed with error.

    Do we need to worry about this? It is not really 'ongoing'. It is expected to run again next weekend.

    Is it safe to leave it? Or do I take action? I don't think anything more needs to be done, but others disagree.

    I thank.

    11.5.10.2

    11.2.0.2

    RHEL 5.5

    Hello

    1.) it not automatically runs through Planner if you cancel it this time, it must be planned again.

    (2.) to check if it still has the substantive session the session of $ v

    Select oracle_process_id from the fnd_concurrent_requests where request_id = 'collect the id of the request;

    Select * from session $ v where paddr = (select addr from process $ v where the spid = 'oracle_process_id_obtained_above');

    kill sessions for the sid above - this will give zero if its not actually running.

    3.), you can manually update the completed fnd_concurrent_requests table

    SQL > update fnd_concurrent_requests set phase_code = 'C', status_code = has ' where request_id = - this should update only 1 file for the schema request gather;

    -SQL > commit;  (Remember to commit)

    (4.) to ensure that all managers are on the rise (actual = target) and other concurrent requests complete with phase and code status as C and C code.

    concerning

    KK

  • Collect statistics of schema

    Hi all

    11.1.0.6

    We met the performance issue on some lots.
    Can it be attributed to a statistic of outdated diagram? We have collected statistics schema 1 months ago.
    How often should collect us statistics of schema?


    Thank you very much
    Kinz

    Well, I guess the query was degraded. Do you mean that it was always like that? In this case, you must take a very different approach: you can set from the beginning.

    First get the AWR SQL report. I already told you to do. Then check out some more detail. Run the query with this suspicion,
    / * + gather_plan_statistics * /.

    And then to get the execution statistics with
    Select * from table (dbms_xplan.display_cursor (format-online 'allstats')) last;

    Yes, it will take an hour or two to run, but it's the best way to get to the truth.

  • Why this statement run in SQLPLUS and TOAD?

    Hello
    We use Oracle 10.2.0.4.

    I'm trying to understand why the following statement CREATE VIEW statement works as a TOAD but not in SQLPLUS. In SQLPLUS, it gives me an error.

    Here's the SQL statement:
    CREATE OR REPLACE VIEW FTBV_QUOTES_PROD_ALL_V 
    AS 
    SELECT   opd.deal_id deal_id, os.form_id form_id,
                opd.sales_rep_user_id sales_rep,
                opep.response_version_number response_version_number,
                opep.version_number version_number,
                opep.team team_name,
               
                CASE opep.team
                   WHEN 'AS400'
                      THEN 'AS400'
                   WHEN 'DEC'
                      THEN 'DEC'
                   WHEN 'EBASOL'
                      THEN 'EBA Solutions'
                   WHEN 'HP'
                      THEN 'HP'
                   WHEN 'MAINFR'
                      THEN 'MainFrame'
                   WHEN 'NETWRK'
                      THEN 'Network'
                   WHEN 'ORACLE'
                      THEN 'Oracle'
                   WHEN 'OTHER'
                      THEN 'OTHER'
                   WHEN 'PC'
                      THEN 'NT/PC'
                   WHEN 'RS6000'
                      THEN 'IBM'
                   WHEN 'SECURI'
                      THEN 'Security'
                   WHEN 'STORAG'
                      THEN 'Storage Solutions'
                   WHEN 'SUN'
                      THEN 'SUN'
                   WHEN 'SUPPOR'
                      THEN 'Audit Software'
                   WHEN 'TELECO'
                      THEN 'Telecom'
                   ELSE 'Undefined'
                END team_description, 
                DECODE(os.form_id, NULL, 'N', 'Y') booked,
                
                MIN(os.status_date) booked_date,
    
                od.gross_profit gross_profit,
                opd.deal_source deal_source, opd.oracleappsdeal oracleappsdeal,
                opd.opportunity_class_code opportunity_class_code,
                ac.customer_name customer_name,
                ac.op_customer_name op_customer_name,
                ac.ams_customer_num ams_customer_num, 
                nvl(ac.top_cust,' ') top_cust,
                od.od_number od_number, od.op_customer_id op_customer_id,
                od.deal_type deal_type, opl.quote_form_id quote_form_id,
                opl.quote_lineitem_number quote_lineitem_number,
                opl.op_status op_status,
    
                opep.submitted_by submitted_by,
                TRUNC (opep.submit_date) submit_date,
                opep.created_by created_by,
                opep.create_date creation_date,
                NVL (ou.user_name, 'undefined user name') created_by_user_name,
                opep.last_edit_by last_edit_by,
                opep.last_edit_date last_edit_date,
                NVL (oc.user_name,
                     'undefined user name'
                    ) last_updated_by_user_name
           FROM op_deal opd,
                op_esc_prod opep,
                ams_customer ac,
    
                op_od od,
                (SELECT   opl.quote_form_id, opl.quote_lineitem_number,
                          opl.op_status, opl.form_id
                     FROM op_od_lineitem opl
                 GROUP BY opl.quote_form_id,
                          opl.quote_lineitem_number,
                          opl.op_status,
                          opl.form_id) opl,
                op_user ou,
                op_user oc,
                op_od_status os
          WHERE (   opep.submit_date >= '01-JAN-2005'
                 OR     opep.submit_date IS NULL
                    AND opep.create_date BETWEEN '01-JAN-05' AND SYSDATE
                )
            AND opd.deal_id = opep.deal_id
            AND ac.op_customer_id = opd.op_customer_id
    
            AND opl.quote_form_id(+) = opep.form_id
            AND opl.op_status(+) IS NULL
            AND od.form_id(+) = opl.form_id
            AND ou.user_id(+) = opep.created_by
            AND oc.user_id(+) = opep.last_edit_by
            AND os.form_id(+) = od.form_id
            AND NVL (RTRIM (os.status_type(+)), 'N') = 'CNTBK'
            AND opep.team <> 'NBASOL'
       GROUP BY opd.deal_id,
                opd.sales_rep_user_id,
                opep.response_version_number,
                opep.version_number,
                opep.team,
                os.form_id,
                od.gross_profit,
                opd.deal_source,
                opd.oracleappsdeal,
                opd.opportunity_class_code,
                ac.customer_name,
                ac.op_customer_name,
                ac.ams_customer_num,
                ac.top_cust,
                od.od_number,
                od.op_customer_id,
                od.deal_type,
                opl.quote_form_id,
                opl.quote_lineitem_number,
                opl.op_status,
                opep.submitted_by,
                opep.submit_date,
                opep.created_by,
                opep.create_date,
                ou.user_name,
                opep.last_edit_by,
                opep.last_edit_date,
                oc.user_name;
    I get the following error messages:
    unknown command beginning "CASE opep...." - rest of line ignored.
    unknown command beginning "WHEN 'AS40..." - rest of line ignored.
    unknown command beginning "THEN 'AS40..." - rest of line ignored.
    unknown command beginning "WHEN 'DEC'..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "THEN 'DEC'..." - rest of line ignored.
    unknown command beginning "WHEN 'EBAS..." - rest of line ignored.
    unknown command beginning "THEN 'EBA ..." - rest of line ignored.
    unknown command beginning "WHEN 'HP'..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "THEN 'HP'..." - rest of line ignored.
    unknown command beginning "WHEN 'MAIN..." - rest of line ignored.
    unknown command beginning "THEN 'Main..." - rest of line ignored.
    unknown command beginning "WHEN 'NETW..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "THEN 'Netw..." - rest of line ignored.
    unknown command beginning "WHEN 'ORAC..." - rest of line ignored.
    unknown command beginning "THEN 'Orac..." - rest of line ignored.
    unknown command beginning "WHEN 'OTHE..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "THEN 'OTHE..." - rest of line ignored.
    unknown command beginning "WHEN 'PC'..." - rest of line ignored.
    unknown command beginning "THEN 'NT/P..." - rest of line ignored.
    unknown command beginning "WHEN 'RS60..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "THEN 'IBM'..." - rest of line ignored.
    unknown command beginning "WHEN 'SECU..." - rest of line ignored.
    unknown command beginning "THEN 'Secu..." - rest of line ignored.
    unknown command beginning "WHEN 'STOR..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "THEN 'Stor..." - rest of line ignored.
    unknown command beginning "WHEN 'SUN'..." - rest of line ignored.
    unknown command beginning "THEN 'SUN'..." - rest of line ignored.
    unknown command beginning "WHEN 'SUPP..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "THEN 'Audi..." - rest of line ignored.
    unknown command beginning "WHEN 'TELE..." - rest of line ignored.
    unknown command beginning "THEN 'Tele..." - rest of line ignored.
    unknown command beginning "ELSE 'Unde..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "END team_d..." - rest of line ignored.
    unknown command beginning "DECODE(os...." - rest of line ignored.
    unknown command beginning "MIN(os.sta..." - rest of line ignored.
    unknown command beginning "od.gross_p..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "opd.deal_s..." - rest of line ignored.
    unknown command beginning "opd.opport..." - rest of line ignored.
    unknown command beginning "ac.custome..." - rest of line ignored.
    unknown command beginning "ac.op_cust..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "ac.ams_cus..." - rest of line ignored.
    unknown command beginning "nvl(ac.top..." - rest of line ignored.
    unknown command beginning "od.od_numb..." - rest of line ignored.
    unknown command beginning "od.deal_ty..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "opl.quote_..." - rest of line ignored.
    unknown command beginning "opl.op_sta..." - rest of line ignored.
    unknown command beginning "opep.submi..." - rest of line ignored.
    unknown command beginning "TRUNC (ope..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "opep.creat..." - rest of line ignored.
    unknown command beginning "opep.creat..." - rest of line ignored.
    unknown command beginning "NVL (ou.us..." - rest of line ignored.
    unknown command beginning "opep.last_..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "opep.last_..." - rest of line ignored.
    unknown command beginning "NVL (oc.us..." - rest of line ignored.
    unknown command beginning "'undefined..." - rest of line ignored.
    unknown command beginning ") last_upd..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "FROM op_de..." - rest of line ignored.
    unknown command beginning "op_esc_pro..." - rest of line ignored.
    unknown command beginning "ams_custom..." - rest of line ignored.
    unknown command beginning "op_od od,..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "AND opl.qu..." - rest of line ignored.
    unknown command beginning "AND opl.op..." - rest of line ignored.
    unknown command beginning "AND od.for..." - rest of line ignored.
    unknown command beginning "AND ou.use..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "AND oc.use..." - rest of line ignored.
    unknown command beginning "AND os.for..." - rest of line ignored.
    unknown command beginning "AND NVL (R..." - rest of line ignored.
    unknown command beginning "AND opep.t..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "GROUP BY o..." - rest of line ignored.
    unknown command beginning "opd.sales_..." - rest of line ignored.
    unknown command beginning "opep.respo..." - rest of line ignored.
    unknown command beginning "opep.versi..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "opep.team,..." - rest of line ignored.
    unknown command beginning "os.form_id..." - rest of line ignored.
    unknown command beginning "od.gross_p..." - rest of line ignored.
    unknown command beginning "opd.deal_s..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "opd.oracle..." - rest of line ignored.
    unknown command beginning "opd.opport..." - rest of line ignored.
    unknown command beginning "ac.custome..." - rest of line ignored.
    unknown command beginning "ac.op_cust..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "ac.ams_cus..." - rest of line ignored.
    unknown command beginning "ac.top_cus..." - rest of line ignored.
    unknown command beginning "od.od_numb..." - rest of line ignored.
    unknown command beginning "od.op_cust..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "od.deal_ty..." - rest of line ignored.
    unknown command beginning "opl.quote_..." - rest of line ignored.
    unknown command beginning "opl.quote_..." - rest of line ignored.
    unknown command beginning "opl.op_sta..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "opep.submi..." - rest of line ignored.
    unknown command beginning "opep.submi..." - rest of line ignored.
    unknown command beginning "opep.creat..." - rest of line ignored.
    unknown command beginning "opep.creat..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    unknown command beginning "ou.user_na..." - rest of line ignored.
    unknown command beginning "opep.last_..." - rest of line ignored.
    unknown command beginning "opep.last_..." - rest of line ignored.
    unknown command beginning "oc.user_na..." - rest of line ignored.
    For a list of known commands enter HELP
    and to leave enter EXIT.
    It seems that SQLPLUS does not like the instructions box or any other function that I use in the select statement. Someone at - it ideas?

    Hello

    Try to remove empty lines. SQL * Plus isn't like them in a single statement (but OK in PL/SQL blocks).

Maybe you are looking for