INSERT Script stored as "SQL Statement Script" not firing on Oracle Alert

We are using Alert Manager to run Alerts based on absence information in EBS R12.1.3 HR tables.
Application: Human Resources
Period/Event: Periodic
Frequency: Every Day
The Alert has 2 actions.
One is to email a supervisor based on the Alert SQL finding staff who have had x number of absences over a set period of time.
That is working fine.
The other action is defined as an "SQL Statement Script".
The SQL script inserts the variables defined in the SQL from the main Alert definition SQL, into a custom table.
When the Alert fires, we are getting the email generated, but the INSERT statement isn't firing.
However, when we look at the result of the Alert when it has run, and look at the steps which were fired, we can see the email step and the SQL step. When we look at the SQL in the SQL step which was generated, we can copy and paste it direct into TOAD and it works fine.
We have tried a simple SQL INSERT statement which even just does:
INSERT INTO xx_tmp (VALUE1_DATE, VALUE2) VALUES (SYSDATE, 'this');
But even that does not work.
We wonder if the issue is that we cannot do a direct INSERT from an alert type of "SQL Statement Script"?
We have found another Alert which does a direct UPDATE on a table, but the SQL Statement Script definition has "Purchasing" as the Application, because it's updating a PO table.
In our case, we're trying to insert into a custom table held in our in-house XX schema.
Could the problem be that we don't have the "Application" set? If that's the case, we don't have a corresponding application anyway.
Or can we not do a direct INSERT like this - do we need to use a package instead, and call that?
Any advice much appreciated.
Thanks

Hi Brian,
Alert issue - Custom SQL fix
1. Define actions via "Actions" button on Alert Definition
2. Create an action for e.g. "Send Message to Supervisor"
   Action type: message
   Action - sends email to people
3. Create another action called e.g. "Insert Record"
   Action type: SQL Statement Script
   Fill in SQL in the "Text" section, no need to add a begin or end bit, just a simple INSERT INTO X etc ending with a semi colon
4. Back on the main alert definition window, go to "Action Sets" button
   Here, need one SEQ for the Message / Email (e.g. Seq 1), and then click on "Action Set Details" and click on "Members" tab and select the "Send Message to Supervisor" Action
   Then close the "Action Set Details" window, and return to the "Action Sets" window
   click into 2nd line, add e.g. Seq 2, and call it e.g. "Insert Record", click on "Action Set Details" > Members tab and select the "Insert Record" The problem was that in the first instance, we had a single Action Set, and under "Members" had selected the "Send Message to Supervisor" and "Insert Record" at the same time.
Short answer: each Action needs to be defined as a separate line in the Action Sets definition.
I can send screenshots if you need them, and don't mind putting your email address on this forum.
You can always edit the thread after I've emailed you, to remove your email address.

Similar Messages

  • Script to know how many statements are not loaded in oracle CM

    Hi,
    Can some one would help me on how to prepare a script to know the bank statements are not loaded into oracle CM and how many checks under that particular statement are not loaded??
    I have the following info with me..
    1. The statements are loaded in a temporary table as soon as we run statement loader program.
    2. Then the records will get into ce_statement_headers_int_all and ce_statement_lines_interface.
    3. Then they will get loaded into ce_statement_headers_all and ce_statement_lines tables.
    Now, the only thing i am confused is how to get to know the statements list that are not loaded into oracle along with the error message. i am confused which tables will give the exact info ce_statement_headers_int_all and ce_statement_lines_interface or ce_headers_interface_errors and ce_lines_interface_errors??? immediate help would be highly appreciated and its very urgent...........
    Thanks.

    Hi Helios,
    I dint get you. This is not something which SR can be raised. I need to know how script can be written to know the statements that are not loaded in oracle cash management. I need to prepare a notification where in that should contain how many statements have been loaded successfully and how many are not on a daily basis...
    Thanks.

  • Executing the SQL statement is not allowed - Error

    I am getting "Executing the SQL statement is not allowed" for an INSERT cfquery that I'm running.  I checked the usual suspects:
    - DSN allows INSERT
    - I've seen reports online where certain field names or values are considered key words, so for protection CF blocks the query in this way (it would be nice if there was a different error message when it gets blocked this way vs. the DSN doesn't allow INSERT error message).  The field names and values were all benign strings, so it didn't seem like that.
    I took the same string for the query and ran it on another page and it ran fine (same DSN, too).

    SOLVED: I decided to enter this in here, just to get it into web searches for others since I couldn't find anything.
    - I was calling a function for one of the values in the query:  get_db_status_code("initialize")  Apparently CF parses the query to see if it's allowed BEFORE it runs the CFML in it, so something in that function name, or the parameter "initialize" was a key word that CF doesn't allow.  I moved the function call outside of the query and loaded a temp variable for use in the query and it then worked.

  • The SQL statement is not valid - when importing data from SQL Server using a query

    Hi there,
    I am trying to import data from SQL to Power Pivot using a SQL query like below:
    SELECT Score.FieldCount, Score.Record.GetAt(0), Score.Record.GetAt(1),  Score.Record.GetAt(2),  Score.Record.GetAt(3),  Score.Record.GetAt(4)
    FROM 
    SELECT * FROM dbo.CLR1(
    dbo.CLR2('c:\FILES\Test.xml'), 
    'SELECT * FROM [dbo].[CXCustomer_Small]') Input
    ) Score
    And when I tried to validate it, it returns
    The SQL statement is not valid. A column name cannot be blank.
    I ran the above SQL statement in Management Studio and it works without problem. Any idea?
    Thanks!
    Chu
    -- Predict everything. http://www.predixionsoftware.com

    Never mind, I figured out - I need to give each column a name.
    -- Predict everything. http://www.predixionsoftware.com

  • SQL statement is not performing

    Hi community,
    I've a problem with a SQL statement.
    First of all here's the statement and the explain plan for it:
    select PPRJPOI.BBASE , PPRJPOI.CONTROLLINGAREA, PPRJPOI.COSTOBJTYPE , PPRJPOI.COSTOBJMAINPATH , PPRJPOI.COSTOBJSUBPATH ,
    PPRJPOI.PPOSNUM , PPRJPOI.PPOSTXT , PPRJPOI.PPOSBTG , PPRJPOI.PDCWABL , PPRJPOI.PDCWNUM , PPRJPOI.PDCWBUD , PPRJPOI.PKTOORI ,
    PPRJPOI.REFKEY1 , PPRJ.COSTCENTER , PPRJ.PATHELEM1 , PPRJSUB.PTPRTXT , LSUPPLIER.AADDRLINE1
    from PPRJPOI
    inner join PPRJ on PPRJ.BBASE = PPRJPOI.BBASE and PPRJ.CONTROLLINGAREA = PPRJPOI.CONTROLLINGAREA
    and PPRJ.COSTOBJTYPE = PPRJPOI.COSTOBJTYPE and PPRJ.COSTOBJMAINPATH = PPRJPOI.COSTOBJMAINPATH
    and PPRJ.COORGPATHELEM1 = ? and PPRJ.COORGPATHELEM2 = ? and PPRJ.COORGPATHELEM3 = ?
    and PPRJ.COORGPATHELEM4 = ? and PPRJ.COORGPATHELEM5 = ?
    inner join PPRJSUB on PPRJSUB.BBASE = PPRJPOI.BBASE and PPRJSUB.CONTROLLINGAREA = PPRJPOI.CONTROLLINGAREA
    and PPRJSUB.COSTOBJTYPE = PPRJPOI.COSTOBJTYPE and PPRJSUB.COSTOBJMAINPATH = PPRJPOI.COSTOBJMAINPATH
    and PPRJSUB.COSTOBJSUBPATH = PPRJPOI.COSTOBJSUBPATH
    left outer join LSUPPLIER on LSUPPLIER.BBASE = PPRJPOI.BBASE and LSUPPLIER.LSUPPLIERNUM = PPRJPOI.PLFTNUM
    where PPRJPOI.BBASE = ? and PPRJPOI.CONTROLLINGAREA = ? and PPRJPOI.COSTOBJTYPE = ?
    and PPRJPOI.SUMSTS = ? and (PPRJPOI.MOVCOSTOBJMAINPATH is null or PPRJPOI.CLEAREDITEM = ?)
    and (PPRJPOI.CLEAREDITEM ? or PPRJPOI.CLEAREDITEM is null)
    and PPRJPOI.COYEARID = ? and (PPRJPOI.COPERIODNUM between ? and ? )
    and PPRJPOI.BTS_CREATE <= TO_TIMESTAMP('27.10.2008 17:00:00')
    and PPRJPOI.PATHELEM2 = ? and PPRJPOI.PATHELEM3 = ?
    order by PPRJPOI.BBASE, PPRJPOI.CONTROLLINGAREA, PPRJPOI.COSTOBJTYPE,
    PPRJPOI.COSTOBJMAINPATH, PPRJPOI.COSTOBJSUBPATH
    | Id  | Operation                        | Name         | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                 |              |     1 |   489 |    40   (5)| 00:00:01 |
    |   1 |  SORT ORDER BY                   |              |     1 |   489 |    40   (5)| 00:00:01 |
    |*  2 |   FILTER                         |              |       |       |            |          |
    |   3 |    NESTED LOOPS OUTER            |              |     1 |   489 |    39   (3)| 00:00:01 |
    |   4 |     NESTED LOOPS                 |              |     1 |   439 |    38   (3)| 00:00:01 |
    |*  5 |      HASH JOIN                   |              |     1 |   262 |    37   (3)| 00:00:01 |
    |   6 |       TABLE ACCESS BY INDEX ROWID| PPRJ         |     1 |    95 |     1   (0)| 00:00:01 |
    |*  7 |        INDEX RANGE SCAN          | PPRJ_ORA4    |     1 |       |     1   (0)| 00:00:01 |
    |*  8 |       TABLE ACCESS BY INDEX ROWID| PPRJPOI      |    41 |  6847 |    36   (3)| 00:00:01 |
    |*  9 |        INDEX SKIP SCAN           | PPRJPOI_ORA3 |    83 |       |    26   (0)| 00:00:01 |
    |  10 |      TABLE ACCESS BY INDEX ROWID | PPRJSUB      |     1 |   177 |     1   (0)| 00:00:01 |
    |* 11 |       INDEX UNIQUE SCAN          | PK_233       |     1 |       |     1   (0)| 00:00:01 |
    |  12 |     TABLE ACCESS BY INDEX ROWID  | LSUPPLIER    |     1 |    50 |     1   (0)| 00:00:01 |
    |* 13 |      INDEX UNIQUE SCAN           | PK_177597    |     1 |       |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - filter(:13<=:14)
       5 - access("PPRJ"."BBASE"="PPRJPOI"."BBASE" AND
                  "PPRJ"."CONTROLLINGAREA"="PPRJPOI"."CONTROLLINGAREA" AND
                  "PPRJ"."COSTOBJTYPE"="PPRJPOI"."COSTOBJTYPE" AND
                  "PPRJ"."COSTOBJMAINPATH"="PPRJPOI"."COSTOBJMAINPATH")
       7 - access("PPRJ"."BBASE"=:6 AND "PPRJ"."CONTROLLINGAREA"=:7 AND
                  "PPRJ"."COSTOBJTYPE"=:8 AND "PPRJ"."COORGPATHELEM1"=:1 AND "PPRJ"."COORGPATHELEM2"=:2
                  AND "PPRJ"."COORGPATHELEM3"=:3 AND "PPRJ"."COORGPATHELEM4"=:4 AND
                  "PPRJ"."COORGPATHELEM5"=:5)
       8 - filter("PPRJPOI"."SUMSTS"=:9 AND ("PPRJPOI"."MOVCOSTOBJMAINPATH" IS NULL OR
                  "PPRJPOI"."CLEAREDITEM"=:10) AND ("PPRJPOI"."CLEAREDITEM" IS NULL OR
                  "PPRJPOI"."CLEAREDITEM"<>:11) AND "PPRJPOI"."BTS_CREATE"<=TO_TIMESTAMP('27.10.2008
                  17:00:00'))
       9 - access("PPRJPOI"."BBASE"=:6 AND "PPRJPOI"."CONTROLLINGAREA"=:7 AND
                  "PPRJPOI"."COSTOBJTYPE"=:8 AND "PPRJPOI"."COYEARID"=:12 AND "PPRJPOI"."COPERIODNUM">=:13
                  AND "PPRJPOI"."PATHELEM2"=:15 AND "PPRJPOI"."PATHELEM3"=:16 AND
                  "PPRJPOI"."COPERIODNUM"<=:14)
           filter("PPRJPOI"."PATHELEM3"=:16 AND "PPRJPOI"."PATHELEM2"=:15)
      11 - access("PPRJSUB"."BBASE"=:6 AND "PPRJSUB"."CONTROLLINGAREA"=:7 AND
                  "PPRJSUB"."COSTOBJTYPE"=:8 AND "PPRJSUB"."COSTOBJMAINPATH"="PPRJPOI"."COSTOBJMAINPATH"
                  AND "PPRJSUB"."COSTOBJSUBPATH"="PPRJPOI"."COSTOBJSUBPATH")
      13 - access("LSUPPLIER"."BBASE"(+)=:6 AND "LSUPPLIER"."LSUPPLIERNUM"(+)="PPRJPOI"."PLFT
                  NUM")Additional infos:
    Tablesize:
    PPRJPOI - 44.500.000 rows
    PPRJ - 7.013 rows
    PPRJSUB - 1.150.000 rows
    LSUPPLIER - 115.000 rows
    Used indexes:
    PPRJ_ORA4: index on PPRJ(BBASE, CONTROLLINGAREA, COSTOBJTYPE, COORGPATHELEM1, COORGPATHELEM2, COORGPATHELEM3 ,COORGPATHELEM4 , COORGPATHELEM5 , COORGPATHELEM6, COORGPATHELEM7, COORGPATHELEM8);
    PPRJPOI_ORA3: index on PPRJPOI(BBASE, CONTROLLINGAREA, COSTOBJTYPE, COYEARID, COPERIODNUM, PATHELEM2, PATHELEM3, PATHELEM4, PATHELEM5, PATHELEM6, PATHELEM7, PATHELEM8);
    PK_233: index on PPRJSUB(BBASE, CONTROLLINGAREA, COSTOBJTYPE, COSTOBJMAINPATH, COSTOBJSUBPATH);
    PK_177597: index on LSUPPLIER(BBASE, LSUPPLIERNUM);
    If I execute this statement I recieve a resultset which returns 5800 rows and takes about 70 seconds. Executing the same statement on DB2 returns the same number of rows but lasts only 15 seconds.
    I would really appreciate, if anybody can help me optimizing this statement so that the execution time will be equal to the DB2..
    Thanks in advance,
    Tobias Schmidt
    Edited by: tobiwan on Oct 31, 2008 1:01 PM

    tobiwan wrote:
    The statement we use is a prepared statement and the "?" are standing for the binding variables.
    I generated the explain plan by adding the prefix "explain plan for" to the statement and fetching the result by executing the statement "SELECT * FROM TABLE(dbms_xplan.display)". The plan table was created with the Oracle script ($ORACLE_HOME\RDBMS\ADMIN\utlxplan.sql).The cardinality estimates of the plan posted seem to be way off if you say that the statement returns 5,800 records, but since you're using bind variables the optimizer in the case of an "EXPLAIN PLAN" just applies default selectivities, like 1% for an equal comparison 5% for a range comparison etc.
    Note that you're using (a lot of) bind variables and therefore the output of EXPLAIN PLAN is only of limited help, because it doesn't/can't use the "bind variable peeking" that happens when the statement is actually executed.
    So you need to find out the actual execution plan(s) used at run time. You can use the convenient DBMS_XPLAN.DISPLAY_CURSOR function in 10g to obtain that information. You just need to find out the SQL_ID of your statement if it is cached in the Shared Pool, e.g. by searching the V$SQL* views available, or you can check V$SESSION if you know that the statement is currently being executed.
    You should check if you've histograms in place on the columns used with the bind variables, in a different thread I've provided already this useful blog note by the Pythian Group about this issue.
    http://www.pythian.com/blogs/867/stabilize-oracle-10gs-bind-peeking-behaviour-by-cutting-histograms
    Once you've obtained the actual execution plan(s, it could be multiple if you have histograms in place), post them here to find out if the cardinality estimates are still way off or what else could be the reason for the unexpected long execution time.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Execute Stored Procedure SQL Statement with Parameter from Cell

    I would like to know if there is a way to pass the parameters to SQL Statement of Power Query. For example, I have a SQL Statement as follows:
    EXEC [dbo].[spReportBuilder]
    @Report = N'Revenue Summary',
    @Year = N'2014',
    @Period = N'11'
    I would like to know if it is possible to pass the @Report, @Year, @Period values from cells in the workbook, preferably without vba.
    Thanks

    rtisserand, 
    Here is the M code: 
    let
    IDValue = Excel.CurrentWorkbook(){[Name="YearTable"]}[Content],
    Source = Sql.Database("localhost", "AdventureWorks2012", [Query="EXEC [dbo].[spReportBuilder] @Report = N'Revenue Summary', @Year = N'" & Number.ToText(IDValue[ID]{0}) & "', @Period = N'11'"])
    in
    Source
    Some notes:
    You have to reference the excel query from another step in the query or you will get the following error: 
    Formula.Firewall: Query <>something<> references other queries or steps and so may not directly access a data source. Please rebuild this data combination.
    I only did the parameter for one value.
    Hope this helps.
    Reeves
    Denver, CO

  • TestStand Open SQL Statement does not support SQL's ORDER BY clause???

    TestStand 1.0.3
    Windows 2000 SP1
    SQL Server 2000 Personal
    You've got to be kidding me...
    It appears that the built-in TestStand Open SQL Step does NOT support the
    "ORDER BY" clause in the SELECT statement, even though the documentation
    says it does. Is this true?
    I have an Open SQL Statement query:
    "SELECT * FROM [MyTable] WHERE ([Batch ID]=1234)"
    it works fine, returning a correct record count 120 records. If I change
    the Open SQL Statement query simply by adding an ORDER BY clause, such as:
    "SELECT * FROM [MyTable] WHERE ([Batch ID]=1234) ORDER BY [MyField] ASC"
    it returns a record count of zero. I know that "MyField" exists in the
    MyTable table and contains valid data. The
    second query works fine in SQL
    Server Enterprise Manager.
    Am I missing something? Is it true that the TestStand Open SQL Step does
    NOT support the "ORDER BY" clause? If not, what &#$!ing good is it and why
    does the manual state it is supported? Is there any other way using just
    the TestStand steps to order a database recordset on one or more fields?
    Any help would be appreciated.
    Grrrrr....
    Bob Rafuse
    Etec Inc.

    > Bob -
    > The database step types do not do anything special to the SQL command
    > that you give it. The step just passes the command to the ADO
    > provider. I tried a simple query using the step types with the
    > following command,
    >
    > "SELECT UUT_RESULT.* FROM UUT_RESULT WHERE ([UUT_SERIAL_NUMBER] =
    > 12345) ORDER BY [EXECUTION_TIME] ASC"
    >
    > and this return the expected results and the record count parameter
    > was as expected. I tried this on TS 1.0.2 and TS 2.0 with MS Access
    > 2000 and MS SQL Server 7.0. I do not have MS SQL Server 2000 at this
    > time.
    >
    > It would be surprised if the step types are messing something up.
    I've been doing some experimenting over the past couple of days. Simple,
    one-table queries seem to handle the ORDER BY clause fine. Th
    ings seem to
    get messed up when I try multi-table queries with ORDER BY clause with the
    TestStand database steps. I get no errors but the returned record counts
    are always 0 with the ORDER BY and positive without the ORDER BY. The exact
    same queries work fine in Visual Basic/ADO and the SQL Server Query
    Analyzer.
    > Questions:
    > 1. Have you verified whether the data is actually returned even though
    > the record count is zero?
    Hmmm... yes data IS getting returned (at least on the two instances I just
    checked), but the record count is always zero. I was not proceeding with
    processing if the record count was 0.
    Still... I don't know how to loop through the recordset without knowing how
    many records there are an not eventually generate an error by passing EOF.
    Is there another way using the TestStand database steps to determine a) the
    number of records in the recordset or b) when I'm at EOF?
    > 2. Are you using any advanced options on the Opend SQL Statement step
    > type, specifically
    the cursor type set to forward only? Forward only
    > cursors do not allow for record counts.
    Everything on the Advanced tab of the Open SQL Statement step is set to "Use
    Default".
    Bob.

  • Group by sql statement is not sorted.

    execut sql statement include group by clause in a oci program, the result is not sorted.
    I don't know why..
    in SqlPlus, same sql statement return sorted data.
    SELECT A.SHOP_ID,A.RESALE_TYPE,
    SUM(A.DEAL_AMT,0) DEAL_AMT
    FROM SHOP_ACC A, CD_TAB C
    WHERE A.RESALE_TYPE = C.CD(+)
    AND C.GB = 'AB'
    AND A.ACC_M = :s_AccMonth
    AND DEAL_GB='FOD'
    GROUP BY A.SHOP_ID,A.RESALE_TYPE
    But, RESALE_TYPE is outer join on CD_TAB..
    if remove outer join between CD_TAB and SHOP_ACC,
    sql statement is return sorted result.
    and if modify the column RESALE_TYPE like
    RESALE_TYPE||']' or NVL(RESALE_TYPE,'AAA')
    return sorted result..
    please help..
    thanks for your kind.

    thank you.. for reply..
    I knew that order by clause make to sort.
    but, using group by clause alone in SQL statement, that return sorted results too.
    I was found a fault that outer join table CD_TAB column of one is not symbloc "(+)" in SQL statement
    SELECT A.SHOP_ID,A.RESALE_TYPE,
    SUM(A.DEAL_AMT,0) DEAL_AMT
    FROM SHOP_ACC A, CD_TAB C
    WHERE A.RESALE_TYPE = C.CD(+)
    AND C.GB = 'AB' <----------- AND C.GB(+) = 'AB'
    AND A.ACC_M = :s_AccMonth
    AND DEAL_GB='FOD'
    GROUP BY A.SHOP_ID,A.RESALE_TYPE
    I want to know that why in other application - such as SqlPlus or SqlGate and ..etc. - this fault was ignore.. but OCI application such as my application programs is not ignore.. and is not sorted..
    thank you..

  • In audit few statemntns SQL statements is not populating

    Hi,
    I enable audit,for few (SELECT,CREATE TABLE)statements audit not populating sqltext in sys.aud$.But i can see few more SELECT&CREATE TABLE activityit populates SQLTEXT.
    if it not populates sql text ,what ll be the reason behind this?

    Thank you for quick reply, Joe!
    Yes, I meant the second option with '%' symbols but still I get incorrect results. Seems that OpenSQL layer ignores the 'NOT LIKE' criterias. Any other ideas?
    I'm pasting you the log I have with the JPQL and the prepared SQL queries
    <query jpql="select distinct e, e.time.srvrStrInitTime from SlAutoGeneral e where e.status not like :status order by e.time.srvrStrInitTime desc ">
        <executeQuery>
            <prepare sql="SELECT DISTINCT E.ID E_ID_id,E.STATUS E_STATUS_status,E.SYNTH_SUBJECT E_SYNTH_SUBJECT_synthSubject,
              ALIAS_1.SRVR_STR_INIT_TIME DISPLAY_2
              FROM SL_AUTO_TIME ALIAS_1, SL_AUTO_GENERAL E WHERE ALIAS_1.ID = E.ID AND E.STATUS NOT LIKE ? ORDER BY DISPLAY_2 DESC"/>
    Best regards,
    Martin

  • Mails are not received  through Oracle   Alert

    Hi ,
    User is not getting the mails after submitting the alert through concurrent request but concurrent is getting completed normal.
    Regards,
    Kavitha

    Hi Kavitha;
    Is there any error message?
    You need to investigate your issue. Please see also below note which some are posted by Sandeep
    Oracle Alert Documentation Resources, Release 12 [ID 396315.1]
    How to determine what email system is being utilized for Oracle Alert processing [ID 428193.1]
    Configuring the Oracle Workflow 2.6 Java-based Notification Mailer with Oracle Applications 11i [ID 231286.1]
    Subject: How to setup Email Notification from Microsoft Exchange with Oracle Alerts [ID  163249.1]
    HOW TO CONFIGURE ORACLE*MAIL FOR USE WITH ORACLE ALERT [IDD 1005013.6 ]
    Using Oracle Alert with Workflow Mailer [ID: 395128.1]
    Which electronic mail facilities does Alert use/support? [ID: 211840.1 ]
    FAQ: Using Oracle Alert to Send MAPI Mail on Windows NT [ID: 75011.1 ]
    How to setup Email Notification from Microsoft Exchange with Oracle Alerts [ID: 163249.1 ]
    How to Configure Concurrent Request Output Option to be Notified by Email .[ID 456925.1]
    Concurrent Request Email Notification is Not Sending Email [ID 382766.1]
    Regard
    Helios

  • SQL Developer 3.0.04 generated scripts not compatible with Oracle 10g (XE)

    HI,
    I tried to do an export from one XE database (still 10g) to another XE database. (also 10g).
    I tried to do a database copy as well as a separate export and import (by loading the file and running as a script).
    Neither of them work without modifying the files as it seems that SQL Developer generates scripts that are only compatible with Oracle 11g.
    - Create table contains "segment creation automatic"
    - Storage clauses contain parts that are not compatible with 10g
    I ran through the wizard several times but neither can I find an option to choose for compatibility with earlier versions of Oracle.
    Checked the preferences screen as well.
    Is this a well hidden option or is it not possible to make this work for 10g.
    Extra : found workaround by removing the storage clause to the export. Is there another way that does not force me to remove the storage clause?
    Edited by: kcaluwae on 24-jun-2011 6:03

    I'm sure this is far from the supported way to fix this but, seeing that it's apparently an issue with the classpath or something in it, I hacked <sqldeveloper_install>\sqldeveloper\bin\sqldeveloper.bat and added [ORACLE_HOME]\jdbc\lib\ojdbc6.jar to the classpath. At least that gets me started with 3.0 and lets me create TNS connections.
    I'd really appreciate a better solution, if any of you kind folks knows of something.
    Thanks,
    Kelly

  • User can Execute SQL Statement but not Stored Procedure

    I have a function in Access that calls a stored procedure to update a table. When I run it, it works fine but when the users try to run it, they get an error.
    If I change it run the actual SQL syntax that is in the stored procedure then the users can run it and update the table without any problems, which makes no sense to me. It's doing the same exact thing as the stored procedure. I'd much rather have them be
    able to run the procedures then writing the SQL in VBA modules because that's going to end up being a lot of code.
    Any idea on why it's like this and how to correct it? Any assistance would be appreciated.

    Hello,
    When you give a user permission to run a stored procedure, everything on that procedure but Dynamic SQL will be executed
    without evaluating user permissions on the objects the stored procedure deals with.
    On the link I provided above, you will see how to provide permissions to stored procedures. Try creating database roles, add user to database roles, then assign permissions to database roles.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • 'lag' works in normal SQL statement, but not when in a view (resolved)

    hi,
    got a problem when using 'lag' in a view.
    if i set up a select statement using 'lag' and execute it, all the results are correct.
    when i stick the exact same select into a view, then the results for the 'lag' entries are not correct any more.
    has anyone experienced this ?
    any hints would be good.
    thanks
    Martin
    using Oracle 10g Express
    version 10.2.0.1.0
    can not download the patch because i can not log into metalink - no CSI
    setting to resolved.
    Message was edited by:
    user614086

    Hi again,
    I think the problem is more with your expectation of what LAG should be doing than with LAG itself.
    LAG must calculate based on the result set, in your stand alone query that means what's left after the WHERE clause is applied.
    In the view that means across all rows the view produces. THEN you apply the where clause to the calculated values. You can see this in the example below.
    So what you'd need to do is define this view in a manner in which the WHERE clause won't make a difference to the logical window produced.
    That would mean using some columns in the partition by clause and order by clause, or leaving the lag function outside the view.
    create table test_lag (column1 number, column2 varchar2(10), column3 date);
    insert into test_lag values (1, 'ONE', trunc(sysdate,'DD') - 1);
    insert into test_lag values (2, 'TWO' trunc(sysdate,'DD') );
    insert into test_lag values (3, 'THREE', trunc(sysdate,'DD') + 1);
    insert into test_lag values (4, 'FOUR', trunc(sysdate,'DD') + 2);
    commit;
    create or replace view test_lag_v
    as
    select column1, column2, lag(column2, 1) over (order by column1 asc) AS laggery, lag(column1) over (order by column3 desc) as laggery_2
    from test_lag;
    ME_XE?select *
      2  from test_lag_v
      3  where column1 <> 3;
               COLUMN1 COLUMN2                        LAGGERY                                 LAGGERY_2
                     4 FOUR                           THREE
                     1 ONE                                                                            3
    2 rows selected.
    Elapsed: 00:00:00.50
    ME_XE?
    ME_XE?select *
      2  from test_lag_v;
               COLUMN1 COLUMN2                        LAGGERY                                 LAGGERY_2
                     4 FOUR                           THREE
                     3 THREE                          ONE                                             4
                     1 ONE                                                                            3
    3 rows selected.
    Elapsed: 00:00:00.68

  • Auditing: Flushing SGA to ensure SQL statement is not cached

    Currently I'm experimenting with Oracle auditing and have noticed that when I audit an object, like a table (AUDIT SELECT ON MY_TABLE), the select on the table is audited only once per session. I.e. When a user connects, and does:
    SQL> select * from my_table;
    SQL> ..
    SQL> ..
    SQL> select * from my_table;
    SQL> ..
    SQL> ..
    .. only the first select statement is audited. I have to reconnect each time for the statement to be audited.
    Is this how auditing works? I was thinking that it could be that the statement is held in memory and when a user does another subsequent select statement, the statement is cached and thus not audited. Could this be the case? I flushed the SGA and I still got the same results above...
    I'd like to hear your opinions about this.

    Raj has provided the solution but I would like to point out that auditing selects by access can generate an alful lot of audit records very quickly. The sys.aud$ table and its index may grow very, very large and fill the system tablespace if you are not careful. Also the updates to sys.aud$ are logged so you will also be generating a lot of extra redo if you make this type of auditing widespread.
    IMHO -- Mark D Powell --

  • Iif() sql statement is not working please help. An expression of non boolean type specified the context

    the following sql is not working . If  sum(salary) = null   should be displayed  1 or 0
    select empname,iif((isnull(sum(salary),0)),1,0) from salary group by empname
    regards
    Pol
    polachan

    I think what you're looking at is this
    select e.empname,
    COALESCE(s.totalsal,0) as salary
    from employee e
    left join (select empname,sum(salary) as totalsal
    from salary
    group by empname
    )s
    on s.empname = e.empname
    where employee represents your master table containing employee information
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Maybe you are looking for

  • Cannot send email from within iPhoto

    Using OX X 10.7.5 cannot send email from within iPhoto.  I get this error message: "Your email did not go through because the server did not reply." If I change the preference to use email, everything goes fine but I lose the formatting feature.

  • JDBC, JMS and EJB transactions - possible problem?

    Hello,           I am using Oracle 9, Weblogic 8.1 SP 4, MyEclipse and           XDoclet.           In my current project I have the following piece of code           in one of my message driven beans (code cited as pseudocode           without unnec

  • Java.lang.NullPointerException trying to migrate from MySQL to OracleXE

    (Originally posted in the SQL Developer forum) I'm trying to migrate a small MySQL database (four tables) to OracleXE. When I capture an object (table, schema or entire database), I'm receiving a java.lang.NullPointerException message from the Captur

  • Silly question re: synching ipod touch 5g to itunes!!! (avoiding crashes/freezes) .

    Hi All, In order to prevent crashes/freezes when syncing an ipod touch 5g to itunes, does all of my music library have to be in mp3 format or will a combination of AAC and mp3 tracks be OK? I'm new to this apple thing and want to get it right BEFORE

  • Timemachine and mountain lion cannot find harddrive to boot to

    So i booted my macbook pro this morning and it came up with the question mark sign. so i restart in recovery mode with command r. tried to repair the drive and it only came up with verify so then i tried to backup from time machine and it found the e