SQL MP not alerting

Hi,
On SCOM 2012R2 CU2, with the sql 6.4.1 MP, we cannot get alerts when we stop SQL Server Agent (it is set to Automatic Delayed Start). We can reboot the server, then stop the services start and stop etc and still no alert.
However, I then wrote my own service monitor to target this service and straight away when stopping the service, the alerts came through for BOTH this custom monitor and from the 6.4.1 MP !!
This is weird.
Anyone else have this??
Thx,
John Bradshaw

Verify from following:
You enable Discovery rules.
You import correct version of SQL Management Pack.
You monitor SQL with Account who has privilege to monitor SQL. {select Server roles and select "Public & "Sysadmin"}
if you monitor SQL Cluster, verify that you enable proxy Agent.
Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
Mai Ali | My blog: Technical | Twitter:
Mai Ali

Similar Messages

  • Sql server agent alert is not sending a mail

    1. sql server agent alert is not sending a mail .I have configure it for sql server event alert and error number 14151 and in "Raise alert when messaging contains" check box I have set: Replication Distribution Subsystem: agent
    2. Sql server agent is restarted also.All database mail and other settings are Ok.
    Still I m not getting mail
    Thanks

    Hi Ajay,
    You can test the connectivity with any server who has smtp access and execute osql to send email to required people.
    Below command can be put into bat file and named as DB_MirrorAlert.bat
    osql -U XXXX -P XXXXX -S Test123 -h-1 -s "|" -w 50 -n -i E:\DBscript_Santosh\DB_MirrorAlert.sql > E:\DBscript_Santosh\DB_MirrorAlert.csv
    OR
    osql -E -S Test123 -h-1 -s "|" -w 50 -n -i E:\DBscript_Santosh\DB_MirrorAlert.sql > E:\DBscript_Santosh\DB_MirrorAlert.csv
    In above command, you are connecting to a server where db email works fine for you and then you are executing a script wherein you can put alert for success or failure like below:
    Success Alert:
    Create a success alert file named as DB_MirrorAlert.sql as you are calling above in bat file and put all scripts in one folder.
    use master
    Go
    EXEC msdb.dbo.sp_send_dbmail
        @profile_name='Profile One',
    @recipients =
    XXX,
    @subject  = 'DB Mirror Server Failed over',
    @body = '
    'DB Mirror Server Failed over to Server B'
    Now you can do this after checking that any one of the server is  not responding or by checking system store procedures too. Good link about monitoring is mentioned below:
    http://msdn.microsoft.com/en-IN/library/ms190030.aspx
    Let me know if you need any more assistance at my end.
    Santosh Singh

  • PL/SQL: Could not find program unit being called: mydb.pkg_alert (newbie)

    This is my first attempt at a pretty in debt package. All the procedures and functions work successfully on their own. When i try and put them into a package and run the package, i get these errors?
    ORA-04063: package body "mydb.PKG_ALERT" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "mydb.PKG_ALERT"
    ORA-06512: at line 6
    Here's my package:
    create or replace PACKAGE pkg_alert AS
    FUNCTION fcn_chck_dt(p_date date)
    RETURN VARCHAR2;
    FUNCTION fcn_chck_decline(p_date date)
    RETURN NUMBER;
    PROCEDURE sp_run_alert(p_date date);
    END pkg_monitor;
    Here's my package body code: Your assistance is greatly appreciated:
    create or replace
    PACKAGE BODY PKG_ALERT AS
    FUNCTION fcn_chck_dt(p_date date) return VARCHAR2 is
    --DECLARE
    v_table_name VARCHAR2(35);
         v_string VARCHAR2(1024);
         v_result number;
         v_output VARCHAR2(1024);
    v_date VARCHAR2(100);
    v_dt VARCHAR2(100);
         CURSOR c_table is
              select table_name
              from user_tab_columns
              where COLUMN_NAME = 'date'
              and table_name NOT LIKE '%BIN%';
         BEGIN
    OPEN c_table;
         loop
              FETCH c_table into v_table_name;
              exit when c_table%NOTFOUND;
              v_string:='select decode(to_date(max(date),''yyyymmdd''),'''||p_date||''',1,0)'|| ' from ' || v_table_name;
    execute immediate v_string into v_result;
    v_date:='select max(date)'|| ' from ' || v_table_name;
    execute immediate v_date into v_dt;
    if v_result=0 then
              v_output:=v_output||CRLF||v_table_name||': '||v_dt;
    end if;
    end loop;
    close c_table;
    return v_output;
    END fcn_chck_dt;
    FUNCTION fcn_chck_decline(p_date date) return NUMBER is
    --DECLARE
         v_dt NUMBER;
         v_active NUMBER;
         v_delta NUMBER;
         v_perc_delta NUMBER;
         v_old_s varchar2(1024);
         v_old_dt number;
         v_string varchar2(1024);
         v_result NUMBER;
         CURSOR c_prev IS
              select date,daily_active,
              daily_active-lag(daily_active) over(order by date),
              trunc(((daily_active-lag(daily_active) over(order by date))/daily_active)*100,2)
              from pop_stats
              where to_date(date,'YYYYMMDD') between p_date-1 and p_date
              order by date desc;
    ---bringing back two rows and all records on purpose.
         BEGIN
              OPEN c_prev;
              FETCH c_prev INTO v_dt,v_active,v_delta,v_perc_delta;
         close c_prev;
         v_old_s := 'select max(date) from alert_stats';
         execute immediate v_old_s into v_old_dt;
         if v_dt!=v_old_dt then
         insert into ALERT_stats(date,
                   daily_active,
                   daily_delta,
                   daily_delta_percent)
                        values(v_dt,
                        v_active,
                        v_delta,
                        v_perc_delta);
              end if;
         v_string:='select value from config_tbl where name=''decline''';
         execute immediate v_string into v_result;
         if v_perc_delta <= v_result then
         return v_perc_delta;
              end if;
         END fcn_chck_decline;
    PROCEDURE sp_run_alert(p_date date) IS
    --DECLARE
    v_result varchar2(1024);
    BEGIN
         insert into ALERT_stats(date)
    values(p_date);
    CRLF char(2) := chr(10)||chr(13);
    v_result :='';
    v_result := v_result||fcn_chck_dt(p_date);
    v_result := v_result||fcn_chck_decline(p_date);
    if v_result.length > 0 then
    utl_mail.send('alerts@localhost','[email protected]',NULL,NULL,
    'Alert','Alert Summary: '||v_result,'text/plain; charset=us-ascii',NULL);
    end if;
    END sp_run_alert;
    END PKG_ALERT;

    Take a look at the bolded sections of your code especialy the last line of your package spec
    create or replace PACKAGE pkg_alert AS
    FUNCTION fcn_chck_dt(p_date date)
    RETURN VARCHAR2;
    FUNCTION fcn_chck_decline(p_date date)
    RETURN NUMBER;
    PROCEDURE sp_run_alert(p_date date);
    END pkg_monitor;

  • Sql type not recognized: 'int unsigned' when I expand table in Dreamweaver

    Dreamweaver warning message - "sql type not recognized: 'int
    unsigned'"
    This was happening in Dreamweaver MX and now in CS3. The
    pages using these tables are not throwing errors when I test them,
    but each time I expand a table in Dreamweaver, I get these warning
    messages. Often I get the same message multiple times and must
    click OK each time before I can proceed. Just now I had to OK the
    warning three times for a table that only has one integer field and
    two fields total.
    Any help would be greatly appreciated.
    Thanks

    Hi Bagger and Ken
    With some help from Randy Edmunds at Adobe was able to find a
    solution to this bug.
    *note I am still using DW MX 2004 so there may be some
    variation with your version.
    ANSWER: You need to add the sql type "int unsigned" to the
    dwscriptsServer.js in Dreamweaver's files.
    The file to ammend is [your path to the DW
    root]\Configuration\Shared\Common\Scripts\
    dwscriptsServer.js
    do a search for the alert: "MM.MSG_SQLTypeAsNumNotInMap" and
    then go up from there (it is about line 2059 in the DW MX 2004
    file).
    underneath a["unsignedint"] = 19;
    add a new line a["int unsigned"] = 19; // variation of
    unsigned int
    I then deleted the delete the FileCache.dat (from step #4
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19105)
    and restarted DW.
    That should fix it!
    If that doesn't work then search the DW folders for
    "MM.MSG_SQLTypeAsNumNotInMap" and ammend the sql data types where
    the functions raise the error alert.
    I hope this is helpful!
    Cheers
    Martin
    ps I would be using the CS3 web premium suite if it wasn't
    for the fact that the UK upgrade price is (£539) - >US$1000
    which is more then double what US customers pay. (OK my whinge
    over, boo hoo)

  • Insert SQL does not work properly when called using CALL

    I have a stored procedure (TEST_SP) which is used to insert a record in this perticular case. The SQL statement is 2526 characters long. I'm using
    dim Params : Params=chr(1) & "Insert query" & Chr(1) & "=300"
    runsql=&"{call TEST_SP(?,?)}"&Params 
    dim db : db=dbSelect("",0,"","")
    dbExecSQL db,runsqlto execute the stored procedure. I'm facing an issue when the 2000th character on the insert SQL (pUPDSQL) is a single quote, where the SQL is not getting executed (i.e. record is not getting created).
    The same stored procedure and the same SQL when run as below
    runsql=runsql&"DECLARE "
    runsql=runsql&"PUPDSQL VARCHAR2(4000); "
    runsql=runsql&"PRES VARCHAR2(300); "
    runsql=runsql&"BEGIN "
    runsql=runsql&"PUPDSQL := 'INSERT query..."
    runsql=runsql&"PRES:=300; "
    runsql=runsql&"MRT_LKIDFULUP(PUPDSQL => PUPDSQL,PRES => PRES); "
    runsql=runsql&"END; "
    dim db : db=dbSelect("",0,"","")
    dbExecSQL db,runsqlis working fine. Does anyone know if there is a limitaion in ODBC Call function or any explanation to above behaviour? I'm connecting to a Oracle 11g database using Microsoft ODBC for Oracle driver on Window 7
    The stored procedures:
    create or replace procedure TEST_SP(pUPDSQL IN VARCHAR2,pRES OUT VARCHAR2)
    AS
    BEGIN
    DECLARE
      emsg VARCHAR2(100);
    BEGIN
    if pUPDSQL&lt;&gt;'-1' then
      emsg:='Cant exec UPDATE';
      EXECUTE IMMEDIATE pUPDSQL;
        if SQL%RowCount=0 then
        pRES:='ERR:No row updated';
        return;
      end if;
    end if;
    pRES:='OK:';
    EXCEPTION
      WHEN OTHERS THEN
       pRES:='ERR:' || emsg;
    END;
    END;Edited by: BluShadow on 11-Dec-2012 15:47
    added {noformat}{noformat} tags for readability.  Please read {message:id=9360002} and learn to do this yourself in future.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    ... I'm facing an issue when the 2000th character on the insert SQL (pUPDSQL) is a single quote, ...Perhaps you need two single quotes? like:
    runsql=runsql&"PUPDSQL := 'INSERT query...Values(..,..,,,''This value in two single quotes'',..,...)' "
    ... I'm connecting to a Oracle 11g database using Microsoft ODBC ...Dump windoze ODBC and better use the Oracle client ODBC.
    :p

  • ORA-01031: insufficient privileges in PL/SQL but not in SQL

    I have problem with following situation.
    I switched current schema to another one "ban", and selected 4 rows from "ed"
    alter session set current_schema=ban;
    SELECT * FROM ed.PS WHERE ROWNUM < 5;
    the output is OK, and I get 4 rows like
    ID_S ID_Z
    1000152 1
    1000153 1
    1000154 1
    1000155 1
    but following procedure is compiled with warning
    create or replace
    procedure proc1
    as
    rowcnt int;
    begin
    select count(*) into rowcnt from ed.PS where rownum < 5;
    end;
    "Create procedure, executed in 0.031 sec."
    5,29,PL/SQL: ORA-01031: insufficient privileges
    5,2,PL/SQL: SQL Statement ignored
    ,,Total execution time 0.047 sec.
    Could you help me why SELECT does work in SQL but not in PL/SQL procedure?
    Thanks.
    Message was edited by:
    MattSk

    Privs granted via a role are only valid from SQL - and not from/within stored PL/SQL code.
    Quoting Tom's (from http://asktom.oracle.com) response to this:I did address this role thing in my book Expert one on one Oracle:
    <quote>
    What happens when we compile a Definer rights procedure
    When we compile the procedure into the database, a couple of things happen with regards to
    privileges.  We will list them here briefly and then go into more detail:
    q    All of the objects the procedure statically accesses (anything not accessed via dynamic SQL)
    are verified for existence. Names are resolved via the standard scoping rules as they apply to the
    definer of the procedure.
    q    All of the objects it accesses are verified to ensure that the required access mode will be
    available. That is, if an attempt to UPDATE T is made - Oracle will verify the definer or PUBLIC
    has the ability to UPDATE T without use of any ROLES.
    q    A dependency between this procedure and the referenced objects is setup and maintained. If
    this procedure SELECTS FROM T, then a dependency between T and this procedure is recorded
    If, for example, I have a procedure P that attempted to 'SELECT * FROM T', the compiler will first
    resolve T into a fully qualified referenced.  T is an ambiguous name in the database - there may be
    many T's to choose from. Oracle will follow its scoping rules to figure out what T really is, any
    synonyms will be resolved to their base objects and the schema name will be associated with the
    object as well. It does this name resolution using the rules for the currently logged in user (the
    definer). That is, it will look for an object owned by this user called T and use that first (this
    includes private synonyms), then it will look at public synonyms and try to find T and so on.
    Once it determines exactly what T refers to - Oracle will determine if the mode in which we are
    attempting to access T is permitted.   In this case, if we as the definer of the procedure either
    owns the object T or has been granted SELECT on T directly or PUBLIC was granted SELECT, the
    procedure will compile.  If we do not have access to an object called T by a direct grant - the
    procedure P will fail compilation.  So, when the object (the stored procedure that references T) is
    compiled into the database, Oracle will do these checks - and if they "pass", Oracle will compile
    the procedure, store the binary code for the procedure and set up a dependency between this
    procedure and this object T.  This dependency is used to invalidate the procedure later - in the
    event something happens to T that necessitates the stored procedures recompilation.  For example,
    if at a later date - we REVOKE SELECT ON T from the owner of this stored procedure - Oracle will
    mark all stored procedures this user has that are dependent on T, that refer to T, as INVALID. If
    we ALTER T ADD  some column, Oracle can invalidate all of the dependent procedures. This will cause
    them to be recompiled automatically upon their next execution.
    What is interesting to note is not only what is stored but what is not stored when we compile the
    object. Oracle does not store the exact privilege that was used to get access to T. We only know
    that procedure P is dependent on T. We do not know if the reason we were allowed to see T was due
    to:
    q    A grant given to the definer of the procedure (grant select on T to user)
    q    A grant to public on T (grant select on T to public)
    q    The user having the SELECT ANY TABLE privilege
    The reason it is interesting to note what is not stored is that a REVOKE of any of the above will
    cause the procedure P to become invalid. If all three privileges were in place when the procedure
    was compiled, a revoke of ANY of them will invalidate the procedure - forcing it to be recompiled
    before it is executed again. Since all three privileges were in place when we created the procedure
    - it will compile successfully (until we revoke all three that is). This recompilation will happen
    automatically the next time that the procedure is executed.
    Now that the procedure is compiled into the database and the dependencies are all setup, we can
    execute the procedure and be assured that it knows what T is and that T is accessible. If something
    happens to either the table T or to the set of base privileges available to the definer of this
    procedure that might affect our ability to access T -- our procedure will become invalid and will
    need to be recompiled.
    This leads into why ROLES are not enabled during the compilation and execution of a stored
    procedure in Definer rights mode. Oracle is not storing exactly WHY you are allowed to access T -
    only that you are. Any change to your privileges that might cause access to T to go away will cause
    the procedure to become invalid and necessitate its recompilation. Without roles - that means only
    'REVOKE SELECT ANY TABLE' or 'REVOKE SELECT ON T' from the Definer account or from PUBLIC. With
    roles - it greatly expands the number of times we would invalidate this procedure. If some role
    that was granted to some role that was granted to this user was modified, this procedure might go
    invalid, even if we did not rely on that privilege from that role. ROLES are designed to be very
    fluid when compared to GRANTS given to users as far as privilege sets go. For a minute, let's say
    that roles did give us privileges in stored objects. Now, most any time anything was revoked from
    ANY ROLE we had, or any role any role we have has (and so on -- roles can and are granted to roles)
    -- many of our objects would become invalid. Think about that, REVOKE some privilege from a ROLE
    and suddenly your entire database must be recompiled! Consider the impact of revoking some system
    privilege from a ROLE, it would be like doing that to PUBLIC is now, don't do it, just think about
    it (if you do revoke some powerful system privilege from PUBLIC, do it on a test database). If
    PUBLIC had been granted SELECT ANY TABLE, revoking that privilege would cause virtually every
    procedure in the database to go invalid. If procedures relied on roles, virtually every procedure
    in the database would constantly become invalid due to small changes in permissions. Since one of
    the major benefits of procedures is the 'compile once, run many' model - this would be disastrous
    for performance.
    Also consider that roles may be
    q    Non-default: If I have a non-default role and I enable it and I compile a procedure that
    relies on those privileges, when I log out I no longer have that role -- should my procedure become
    invalid -- why? Why not? I could easily argue both sides.
    q    Password Protected: if someone changes the password on a ROLE, should everything that might
    need that role be recompiled?  I might be granted that role but not knowing the new password - I
    can no longer enable it. Should the privileges still be available?  Why or Why not?  Again, arguing
    either side of this is easy. There are cases for and against each.
    The bottom line with respect to roles in procedures with Definer rights are:
    q    You have thousands or tens of thousands of end users. They don't create stored objects (they
    should not). We need roles to manage these people. Roles are designed for these people (end users).
    q    You have far fewer application schema's (things that hold stored objects). For these we want
    to be explicit as to exactly what privileges we need and why. In security terms this is called the
    concept of 'least privileges', you want to specifically say what privilege you need and why you
    need it. If you inherit lots of privileges from roles you cannot do that effectively. We can manage
    to be explicit since the number of development schemas is SMALL (but the number of end users is
    large)...
    q    Having the direct relationship between the definer and the procedure makes for a much more
    efficient database. We recompile objects only when we need to, not when we might need to. It is a
    large efficiency enhancement.
    </quote>

  • Error : ORA-06508: PL/SQL: could not find program unit being called

    Hi
    I got surprise issue while testing my Oracle code . Let me explain first the environment detail . Our appliaction built on
    Java/J2EE(Weblogic) and backend is Oracle 11g re2 . While calling from java it call thru different user which have been provide
    synonym and exectue option for corresponding procdure ,
    I created on package EXTRACT_CUSTOMER_INFO_PK which will exract data to text file using UTL_FILE ( direcory , UTL_FILE grant is provided to DB user).
    Now this package has been called from rp_execute_procedure_pr -- Here I is the code
    CREATE OR REPLACE PROCEDURE RP_EXECUTE_PROCEDURE_PR
    i_atlas_job_schedule_fk IN atlas_job_schedule.atlas_job_schedule_pk%TYPE,
    i_job_id IN atlas_job.job_id%TYPE,
    i_parm_value IN atlas_job_schedule.parm_value%TYPE,
    o_status_code OUT NUMBER,
    o_status_mesg OUT VARCHAR2
    IS
    -------Other old code which is not relevent for this issue ----
    --------Other old code which is not relevent for this issue ----
    ----Below code I added ----
    ELSIF l_job_id = 'CUST_EXTRACT' THEN
    EXTRACT_CUSTOMER_INFO_PK.customer_report ( i_parm_value ,
                   o_status_code,
    o_status_mesg ) ;
    -- o_status_code := -99999999;
    --o_status_mesg := 'PARTHA PARTHA PARTHAcess terminated!';
    ELSE
    o_status_code := -20300;
    o_status_mesg := 'Job Id : ' || l_job_id || ' NOT found. Process terminated!';
    END IF;
    update_log_auto
    ajs_rec.atlas_job_schedule_pk ,
    'Processing End Time (GMT): '
    EXCEPTION
    WHEN eProcError THEN
    o_status_code := SQLCODE;
    o_status_mesg := SUBSTR(vMsg ||'-'||SQLERRM, 1, 200);
    WHEN OTHERS THEN
    o_status_code := -20300;
    o_status_mesg := SUBSTR(SQLERRM, 1, 200);
    update_log_auto
    ajs_rec.atlas_job_schedule_pk ,
    'Error : '||SQLERRM||' '
    update_log_auto
    ajs_rec.atlas_job_schedule_pk,
    'Processing End Time (GMT): '
    END RP_EXECUTE_PROCEDURE_PR;
    Now It compiled sucesfully . And while I did SIT then RP_EXECUTE_PROCEDURE_PR run fine and extracted txt file . But while I called it from Java procedure It gives us error like
    Error : ORA-06508: PL/SQL: could not find program unit being called 02-AUG-2012 13:16:51.
    As I told RP_EXECUTE_PROCEDURE_PR old proc and used by other proc , So I first suspect issue is newly added code or may be some grant or synonym ( Although it should not be )
    so I created public synony amd gave execute grant to my pkg to public .
    But it repeat same error .
    I did lot of R&D on my pkg but nothing happen . Finally I remane my new pkg RP_EXTRACT_CUSTOMER_INFO_PK and it works fine
    I need to know what is the RCA for it . I donot think any dependecy issue as renaming pkg is working fine .
    NB my DB user is iATLAS and Javauser is SUDEEP
    Thanks in Advance
    Debashis Mallick

    First of all If i run the main procedure in like below in my Schema it is working fine
    begin
    -- Call the procedure
    rp_execute_procedure_pr(i_atlas_job_schedule_fk => :i_atlas_job_schedule_fk,
    i_job_id => :i_job_id,
    i_parm_value => :i_parm_value,
    o_status_code => :o_status_code,
    o_status_mesg => :o_status_mesg);
    end;
    So thre is no question of parameter .... or Invalid state etc . If it is parameter or Invalid state issue it will give other error.
    Here problem is not syntax issue .
    let me give u more detail regards this issue
    1.. All objects corresponding to procedure all Valid
    2.. If I test on the proc on my schema like above code . It works fine
    3.rp_execute_procedure_pr is a old procudere which called for differner report generartion based on parameter passing . Also as extract_customer_info_pk called with in rp_execute_procedure_pr So there is no question of synonym or privilage issue for new procedure.
    4. Suprising thing is if I rename and recreate package like extract_customer_info_pk _1 or rp_extract_customer_info_pk . Which are exactly same as extract_customer_info_pk and replace those new one with extract_customer_info_pk then it work fine in my java application
    I think I make it clear the issue
    Edited by: debashisora on Aug 3, 2012 5:31 AM
    Edited by: debashisora on Aug 3, 2012 5:40 AM

  • Calendar 7.0 does not alert me on monthly repeating  events

    SInce upgrading to an Intel Core i5 desktop running OS 10.9.2, my calendar does not alert me
    to monthly repeating events. Especially irritating because I rely on it to pay my bills on time.
    Checking settings today, I notice that Alerts is only set to my iCloud account. But both
    iCloud and my email are listed under 'accounts.'
    After resetting alerts to 'I tried switching off the iCloud account but on reopening
    Calendat it defauled to iCLoud again. I tried switching off iCloud but then ALL my
    Calendar listings disappeared! So obviously my Calendar sits on iCloud but refuses
    to alert me to monthly events.
    Help!
    Thanks,
    Ramon

    I just successfully created an event called "Good Saturday" for today (Saturday).  It was not a day long event - only an hour long event.
    I created a "Good Saturday" day long event for next Saturday and that succeeded.
    So I conclude the issue you are seeing must be with the calendar account(s) you are using.
    I also run the same build of calendar you have.

  • ORA-00933: SQL command not properly ended

    I am attempting to create a view in oracle 8.0.6 but get the error message ORA-00933 SQL command not properly ended, can anyone help?:
    SQL> create view AJT_SCHEDULES01 as
    2 select SCHDL_REFNO, STRAN_REFNO from SCHEDULES order by STRAN_REFNO desc;
    select SCHDL_REFNO, STRAN_REFNO from SCHEDULES order by STRAN_REFNO desc
    ERROR at line 2:
    ORA-00933: SQL command not properly ended

    ORDER BY cannot be used to create an ordered view or to insert in a certain order.
    Please refer to Section ORA-00933: SQL command not properly ended at : http://otn.oracle.com/doc/server.805/a58312/newch220.htm
    For further assistance, please post in the forum at : PL/SQL
    Hope this helps
    Regards
    Pushkala

  • What will you do if any SQL is not working.in oracle 10g...apps 11.5.10.2

    What will you do if any SQL is not working. in oracle 10g....apps 11.5.10.2

    928714 wrote:
    yes sir.If you help me in answering my questions i wll be very thankful to you sir.
    tnx,I haven't a clue.
    As you have been advised in many of your posts, go study the documentation for whichever specific topic you are interested in.
    For me to answer your questions, I would need to go get that documentation.
    Then I would need to read that documentation.
    Then I would need to write a forum post that interprets what I think I learned from that documentation.
    It is so very much faster if YOU go do that instead of posting to a forum and expecting others to do it. You will remember what you study for a lot longer time if you teach yourself.

  • 11.5.10.2 to R12.1.1 upgrade: Error loading seed data for GL_DEFAS_ACCESS_SETS:  DEFINITION_ACCESS_SET = SUPER_USER_DEFAS,  ORA-06508: PL/SQL: could not find program unit being called

    Hello,
    EBS version : 11.5.10.2
    DB version : 11.2.0.3
    OS version : AIX 6.1
    As a part of 11.5.10.2 to R12.1.1 upgrade, while applying merged 12.1.1 upgrade driver(u6678700.drv), we got below error :
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    ATTENTION: All workers either have failed or are waiting:
               FAILED: file glsupdas.ldt on worker  3.
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    drix10:/fmstop/r12apps/apps/apps_st/appl/admin/FMSTEST/log>tail -20 adwork003.log
    Restarting job that failed and was fixed.
    Time when worker restarted job: Wed Aug 07 2013 10:36:14
    Loading data using  FNDLOAD function.
    FNDLOAD APPS/***** 0 Y UPLOAD @SQLGL:patch/115/import/glnlsdas.lct @SQLGL:patch/115/import/US/glsupdas.ldt -
    Connecting to APPS......Connected successfully.
    Calling FNDLOAD function.
    Returned from FNDLOAD function.
    Log file: /fmstop/r12apps/apps/apps_st/appl/admin/FMSTEST/log/US_glsupdas_ldt.log
    Error calling FNDLOAD function.
    Time when worker failed: Wed Aug 07 2013 10:36:14
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    drix10:/fmstop/r12apps/apps/apps_st/appl/admin/FMSTEST/log>tail -20 US_glsupdas_ldt.log
    Current system time is Wed Aug  7 10:36:14 2013
    Uploading from the data file /fmstop/r12apps/apps/apps_st/appl/gl/12.0.0/patch/115/import/US/glsupdas.ldt
    Altering database NLS_LANGUAGE environment to AMERICAN
    Dumping from LCT/LDT files (/fmstop/r12apps/apps/apps_st/appl/gl/12.0.0/patch/115/import/glnlsdas.lct(120.0), /fmstop/r12apps/apps/apps_st/appl/gl/12.0.0/patch/115/import/US/glsupdas.ldt) to staging tables
    Dumping LCT file /fmstop/r12apps/apps/apps_st/appl/gl/12.0.0/patch/115/import/glnlsdas.lct(120.0) into FND_SEED_STAGE_CONFIG
    Dumping LDT file /fmstop/r12apps/apps/apps_st/appl/gl/12.0.0/patch/115/import/US/glsupdas.ldt into FND_SEED_STAGE_ENTITY
    Dumped the batch (GL_DEFAS_ACCESS_SETS SUPER_USER_DEFAS , GL_DEFAS_ACCESS_SETS SUPER_USER_DEFAS ) into FND_SEED_STAGE_ENTITY
    Uploading from staging tables
      Error loading seed data for GL_DEFAS_ACCESS_SETS:  DEFINITION_ACCESS_SET = SUPER_USER_DEFAS,  ORA-06508: PL/SQL: could not find program unit being called
    Concurrent request completed
    Current system time is Wed Aug  7 10:36:14 2013
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    Below is info about file versions and INVALID packages related to GL.
    PACKAGE BODY GL_DEFAS_ACCESS_SETS_PKG is invalid with error component 'GL_DEFAS_DBNAME_S' must be declared.
    I can see GL_DEFAS_DBNAME_S is a VALID sequence accessible by apps user with or without specifying GL as owner.
    SQL> select text from dba_source where name in ('GL_DEFAS_ACCESS_DETAILS_PKG','GL_DEFAS_ACCESS_SETS_PKG') and line=2;
     TEXT
    /* $Header: glistdds.pls 120.4 2005/05/05 01:23:16 kvora ship $ */
    /* $Header: glistddb.pls 120.16 2006/04/10 21:28:48 cma ship $ */
    /* $Header: glistdas.pls 120.4 2005/05/05 01:23:02 kvora ship $ */
    /* $Header: glistdab.pls 120.5 2006/03/13 19:56:21 cma ship $ */ 
    SQL> select * from all_objects where object_name in ('GL_DEFAS_ACCESS_DETAILS_PKG','GL_DEFAS_ACCESS_SETS_PKG')
      2 ; OWNER OBJECT_NAME SUBOBJECT_NAM OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_TIME TIMESTAMP STATUS T G S NAMESPACE
    EDITION_NAME
    APPS GL_DEFAS_ACCESS_DETAILS_PKG 1118545 PACKAGE 05-AUG-13 05-AUG-13 2013-08-05:18:54:51 VALID N N N 1 
    APPS GL_DEFAS_ACCESS_SETS_PKG 1118548 PACKAGE 05-AUG-13 06-AUG-13 2013-08-05:18:54:51 VALID N N N 1 
    APPS GL_DEFAS_ACCESS_SETS_PKG 1128507 PACKAGE BODY 05-AUG-13 06-AUG-13 2013-08-06:12:56:50 INVALID N N N 2 
    APPS GL_DEFAS_ACCESS_DETAILS_PKG 1128508 PACKAGE BODY 05-AUG-13 05-AUG-13 2013-08-05:19:43:51 VALID N N N 2 
    SQL> select * from all_objects where object_name='GL_DEFAS_DBNAME_S'; OWNER OBJECT_NAME SUBOBJECT_NAM OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_TIME TIMESTAMP STATUS T G S NAMESPACE
    EDITION_NAME
    GL GL_DEFAS_DBNAME_S 1087285 SEQUENCE 05-AUG-13 05-AUG-13 2013-08-05:17:34:43 VALIDN N N 1 
    APPS GL_DEFAS_DBNAME_S 1087299 SYNONYM 05-AUG-13 05-AUG-13 2013-08-05:17:34:43 VALIDN N N 1 
    SQL> conn apps/apps
    Connected.
    SQL> SELECT OWNER, OBJECT_NAME, OBJECT_TYPE, STATUS
    FROM DBA_OBJECTS
    WHERE OBJECT_NAME = 'GL_DEFAS_ACCESS_SETS_PKG'; 2 3 OWNER OBJECT_NAME OBJECT_TYPE STATUS
    APPS GL_DEFAS_ACCESS_SETS_PKG PACKAGE VALID
    APPS GL_DEFAS_ACCESS_SETS_PKG PACKAGE BODY INVALID SQL> ALTER PACKAGE GL_DEFAS_ACCESS_SETS_PKG COMPILE; Warning: Package altered with compilation errors. SQL> show error
    No errors.
    SQL> ALTER PACKAGE GL_DEFAS_ACCESS_SETS_PKG COMPILE BODY; Warning: Package Body altered with compilation errors. SQL> show error
    Errors for PACKAGE BODY GL_DEFAS_ACCESS_SETS_PKG: LINE/COL ERROR
    39/17 PLS-00302: component 'GL_DEFAS_DBNAME_S' must be declared 
    drix10:/fmstop/r12apps/apps/apps_st/appl/gl/12.0.0/patch/115/odf>cat $GL_TOP/patch/115/sql/glistdab.pls|grep -n GL_DEFAS_DBNAME_S
    68: SELECT GL.GL_DEFAS_DBNAME_S.NEXTVAL
    81: fnd_message.set_token('SEQUENCE', 'GL_DEFAS_DBNAME_S');
    SQL> show user
    USER is "APPS"
    SQL> SELECT GL.GL_DEFAS_DBNAME_S.NEXTVAL
      FROM dual; 2                         -- with GL.
      NEXTVAL
      1002
    SQL> SELECT GL_DEFAS_DBNAME_S.NEXTVAL from dual;               --without GL. or using synonym.
      NEXTVAL
      1003
    drix10:/fmstop/r12apps/apps/apps_st/appl/gl/12.0.0/patch/115/odf>strings -a $GL_TOP/patch/115/sql/glistdab.pls|grep '$Header'
    REM | $Header: glistdab.pls 120.5 2006/03/13 19:56:21 cma ship $ |
    /* $Header: glistdab.pls 120.5 2006/03/13 19:56:21 cma ship $ */
    drix10:/fmstop/r12apps/apps/apps_st/appl/gl/12.0.0/patch/115/odf>strings -a $GL_TOP/patch/115/sql/glistdas.pls |grep '$Header'
    REM | $Header: glistdas.pls 120.4 2005/05/05 01:23:02 kvora ship $ |
    /* $Header: glistdas.pls 120.4 2005/05/05 01:23:02 kvora ship $ */

  • SQL query not calculating

    SQL query not calculating
    gross_amount is giving the value of extended_amount and the gross_price_rc is giving the value of unit_selling_price
    select customer_trx_line_id,
    ( extended_amount / 1- (decode(decode(attribute6,null,0)+decode(attribute7,null,0)+decode(attribute8,null,0)+decode(attribute9,null,0)/100,null,0,1,0))) GROSS_AMOUNT,
    ( unit_selling_price /1-(decode(decode(attribute6,null,0)+decode(attribute7,null,0)+decode(attribute8,null,0)+decode(attribute9,null,0)/100,null,0,1,0))) gross_price_rc
    from ra_customer_trx_lines_all
    where attribute6 is not null or attribute7 is not null or attribute8 is not null or attribute9 is not null
    whats the isuue here??
    Thanks

    decode(attribute7,null,0)Looking at it again, this always returns 0 or NULL, so it not really surprising
    DECODE
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions040.htm#i1017437
    CASE
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/expressions004.htm#i1033392

  • SQL Query (not OMBPlus) to get Join- and Filter-Conditions

    Hallo,
    I allready used the Views ALL_IV_XFORM_... to get serveral informations on my mappings using SQL-Queries,
    but how can I retrieve the Conditions of an Join- or Filter-Transformation using SQL and not OMBPLUS?
    Thanks in advance
    Frank

    but how can I retrieve the Conditions of an Join- or Filter-Transformation using SQL and not OMBPLUS?if i understood the question correctlly then
    join will be written as
    select * from table_1 , table_2  where table_1.col1=table_2.col2;filter will be written as
    select * from table_1  where table_1.col1='A';

  • Abnormal, Same query get data in sql but not working on Fron-end

    Dear,
    Version :Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    We have created packed in oracle database befor two months ago & was working fine, but since morning select statment in package is not working while running via application which mentioned below and raise not data found but surprising thing is that same query is getting data when we execut on sql plus return one record.
    i don't know either it's abnormal behaviour or sth else becuase the same query run without changing any singl column in where_clause work in sql but not getting data while submition request through oracle application and raising not data found.
    --thankse
    Edited by: oracle0282 on Dec 29, 2011 2:20 AM

    Actully when i run this query in sql it return one record on the same parameter, while when we exeucte this select in pl/sql on the same parameter oracle raise no data found error.
    so i got confused the same query with same parameter retur record in sql but when we call it fron-end through packege raise 'no data found error'.
    hope you understand now.
    --thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • My iPhone does not alert every time I receive a text message, only some of the time.  Anyone else have this problem?

    My iPhone 4S does not alert every single time I receive a text message, only some of the time.  The software is all up to date.  Anyone else have this problem?

    There are a number of different alerts that can be played on the iPhone. Have you turned the mute switch on? That is located on the side of the phone. When it is in the down/on position (the orange is showing) you should not get any sound alerts. Also, it could be an SMS, a voicemail, an email, a 3rd party alert (if you have particiular apps that provide alerts). You would need to check all of those settings, but with the mute switch on you should not get any sound alerts.

Maybe you are looking for

  • Does the Ipod Classic 120 GB still connect to itunes? Because mine will not show up at all in itunes!

    My Ipod classic will not show up in itunes at all but it says its charging and that it is connected to the computer! I have my itunes updated fully and it still does not work! So i am thinking that maybe its not able to connect anymore because of the

  • What is the difference between the generic accessories and the original apple brand?

    I am looking on Amazon for a new cable, wall charger, car charger, and headphones with built in mic. There were a lot of generic brands for cheap and I was wondering what the differences between the apple and the generic brands were. Also I looked on

  • SQL if/else help

    Can somebody help me with a query. select name, isdefault, display_value  from v$parameter where name in ( 'memory_target' , 'sga_target', 'statistics_level') order by name; If memory_target is set non-zero, print AMM Else if sga_target is set non-ze

  • Data for Actual/ Plan Cost and Budget

    Hi All, Can you please adviseme  which content i need to activate to get the Actaul, Plan cost and the Budget Data in SAP BW. Do i need to exploer CCA cubes or Fund managment Cubes.. Please let me know... I need to know the Tables in R/3 Side for bud

  • RACF - create alias

    Hi, In oim10g setup when I try to provision user to RACF on success of create user task I am calling another process task which defines alias for the user. But alias creation is failing with exception : log from ldapgateway: NamingException processin