Using DBMS_AQ package in APEX

Hello,
I am trying to create a Queue table from application express. I read through a post on another forum that said some privs must be granted before a queue table can be created. They are:
GRANT RESOURCE TO <UserName>;
GRANT CONNECT TO <UserName>;
GRANT EXECUTE ANY PROCEDURE TO <UserName>;
GRANT aq_administrator_role TO <UserName>;
GRANT aq_user_role TO <UserName>;
GRANT EXECUTE ON dbms_aqadm TO <UserName>;
GRANT EXECUTE ON dbms_aq TO <UserName>;
GRANT EXECUTE ON dbms_aqin TO <UserName>;
Once the above privs were granted, I was able to login to SQLPLUS and successfully create a queue table. The problem is, when I try to create the queue table from within Apex, I get the following error message:
ORA-01950: no privileges on tablespace 'USERS'
Any ideas why this could be happening?
Thanks
- Brian

Scott,
Thanks for the help so far. If I am understanding correctly, I basically just have to grant the necessary privileges needed to create the queue table to pads_devel. Here is some of the DDL I have for the pads_devel user:
CREATE USER "PADS_DEVEL" PROFILE "DEFAULT" IDENTIFIED BY "*******" DEFAULT TABLESPACE "FLOW_3" TEMPORARY TABLESPACE "TEMP" QUOTA UNLIMITED ON "FLOW_2" QUOTA UNLIMITED ON "FLOW_3" QUOTA UNLIMITED ON "USERS" ACCOUNT UNLOCK
BEGIN
   dbms_aqadm.grant_system_privilege(privilege=>'DEQUEUE_ANY',    
   grantee=>'PADS_DEVEL', admin_option=>FALSE);
   COMMIT;
END;
BEGIN
   dbms_aqadm.grant_system_privilege(privilege=>'ENQUEUE_ANY',  
   grantee=>'PADS_DEVEL', admin_option=>FALSE);
   COMMIT;
END;
BEGIN
   dbms_aqadm.grant_system_privilege(privilege=>'MANAGE_ANY',
   grantee=>'PADS_DEVEL', admin_option=>FALSE);
   COMMIT;
END;
GRANT SELECT ON "SYS"."DBA_AQ_AGENTS" TO "PADS_DEVEL"
GRANT EXECUTE ON "SYS"."DBMS_AQ" TO "PADS_DEVEL"
GRANT EXECUTE ON "SYS"."DBMS_AQADM" TO "PADS_DEVEL"
GRANT EXECUTE ON "SYS"."DBMS_AQIN" TO "PADS_DEVEL"
GRANT EXECUTE ON "SYS"."DBMS_AQ_BQVIEW" TO "PADS_DEVEL"There is obviously more but the above is what I think would be necessary to create the queue table and queue from apex 2.0.
When I try to create a queue table I still get:
ORA-01950: no privileges on tablespace 'USERS
and when I try to create a queue (in a table I created in sqlplus) I still get:
ORA-01031: insufficient privileges
I'm not sure what I'm doing wrong here.
Thanks a bunch!
- Brian

Similar Messages

  • Error while using UTL_FILE package

    I am getting error while using UTL_FILE package in apex 3.0 version
    Pls help me out.

    ok, how are you using UTL_FILE and what is the error?

  • Can not dequeue JMS message of type SYS.AQ$_JMS_TEXT_MESSAGE using DBMS_AQ

    I'm having a problem using DBMS_AQ package to dequeue a JMS message of type SYS.AQ$_JMS_TEXT_MESSAGE that was put on the queue using Java JMS API.
    Both JMS header and payload return empty but if I do "select user_data" from the queue table, I can see the message.
    Appreciate any helps or tips.
    Kim

    This has been asked a lot of times - I'm not sure how my initial searching missed all of the other questions/answers related to this topic.
    In our case, the solution was to:
    1) Leave the queue as a sys.aq$_jms_text_message type
    2) Construct a sys.xmltype object with our desired payload
    3) Do a getStringVal() on the xmltype object and use that string as the payload for our queue message
    - Nathan

  • Has anyone used the as_pdf2 package in APEX to create pdf's from sql

    I need to create a pdf in APEX. I have researched and found as_pdf2 as a possible solution. If anyone has used this solution in APEX, can you provide any more detail on implementing than what was provided with the plugin? The readme explains at a high level on how to implement but I would like to get as much detail as possible.

    as_pdf2 isn't meant to be used as an stand alone package. It's a trimmed down version, made especially for the plugin http://www.apex-plugin.com/oracle-apex-plugins/process-type-plugin/reports-2-pdf_140.html , of it's big brothers as_pdf
    Edited by: ascheffer on Sep 30, 2011 5:11 PM

  • Integrating Oracle APPS with APEX using popay_apex package...

    Hi,
    I am a newbie in APEX and tried to explore it only a few months back...
    I must admit that this tool is Awesome..!!!
    Also, I tried to integrate Oracle EBS 11i with APEX using [popay package |https://sites.google.com/a/popay.be/apex-on-apps/integration] and the integration was absolutely fantastic...!!!
    h6. (Thanks Thierry for your impecabble work on developing and releasing this excellent package under BSD License !!!)
    My question is,
    I have created an Online Leave Application (OLA) in APEX which should retrieve the username from EBS Login and display the leave information of that particular user.
    I have created the OLA in APEX and registered it in EBS as a form function and also attached it to a user responsibility.
    When I run the form thru the EBS Responsibility logged in as a EBS user, the OLA Application opens in a new window...
    But,
    The username is retrieved as APPS instead of the user's login info.
    because of this retrieval the global variable :APP_USER is storing the username as APPS and all my internal references with :APP_USER has been erroring with "NO DATA FOUND", since there is no user login as APPS.
    Is there any way to overcome this bottleneck...?
    Or Do I need to add any code in the APEX >Application >Security > VPD
    Thanks in Advance...
    Ben

    Hi,
    I have solved the issue, Thanks to Rod & Thierry !
    I have created a cookie to send the apps username to my APEX application.
    (Added this code snippet in the popay_apex.start_application procedure)
    --------<CODE>------------------------------------------
    l_user := fnd_global.USER_NAME;
    OWA_COOKIE.send
    +(NAME=>'APEX',+
    VALUE=>l_user,
    path=>'/');
    ---------<ENDS>----------------------------------------
    (Created an on-load before header process at page 1 and fetched the cookie value to an application item.)
    -----------<CODE>-------------------------------------
    DECLARE
    c OWA_COOKIE.cookie;
    a wwv_flow_global.vc_arr2;
    BEGIN
    c := OWA_COOKIE.get('APEX');
    a := htmldb_util.string_to_table(c.vals(1));
    +:F101_USER := a(1);+
    EXCEPTION WHEN OTHERS THEN
    NULL;
    END;
    -------------<ENDS>---------------------------------------
    It's a mashup of Rod & Thierry's work....!
    Hat's off to Rod & Thierry !
    Ben

  • Error when using DBMS_XMLDOM package

    Hello,
    I have created a set of triggers that use the DBMS_XMLDOM packages. These triggers were created on a Win 2k install of 9.2.0.2.1. A brand new user was created and a specific set of permissions granted. The permissions were:
    GRANT CONNECT, RESOURCE, AQ_ADMINISTRATOR_ROLE, AQ_USER_ROLE
    GRANT EXECUTE ON DBMS_AQADM
    GRANT EXECUTE ON DBMS_AQ
    grant execute on dbms_aqin
    execute dbms_java.grant_permission('<USER>', 'java.net.SocketPermission', 'localhost:1024-', 'accept, listen, resolve');
    execute dbms_java.grant_permission( '<USER>', 'SYS:java.lang.RuntimePermission', ' getClassLoader', '' )
    execute dbms_java.grant_permission( '<USER>', 'SYS:java.lang.RuntimePermission' , 'setContextClassLoader', '' )
    I then went to install these triggers on our application database server. This is a Solaris installation that started out as 9.2.0.1.0 and was then upgraded to 9.2.0.2.0. I created the user and granted the exact same permissions on this database. However, everytime I attempt to execute the triggers, or anything else that uses DBMS_XMLDOM packages, I get the following error:
    doc dbms_xmldom.DOMDocument;
    ERROR at line 3:
    ORA-06550: line 3, column 11:
    PLS-00201: identifier 'DBMS_XMLDOM.DOMDOCUMENT' must be declared
    I did not create the application database instance on the Solaris machine, but from what I've talked with the DBA, it was created as a general database, which is how I created my test databases. I also verified that the users in both databases have Execute on SYS.XMLDOM granted.
    Any ideas on why I might be getting this error?
    Thanks,
    Andrew

    When I try the describe, it says object not found. If I go into OEM, I don't see that package either. Again, I didn't create that database, but I thought the XML DB stuff was installed by default with the database. Is there a way to add that package after the database is created?
    Thanks,
    Andrew

  • Using oracle text in apex report search

    I am trying to use oracle text in apex, integrating it in an existing application. The idea is that it will allow to do a search in bigger textfields. Thats how I want it to get to work. In one of the oracle packaged applications oracle text is used as well, so I will have a look to that as well. I've addapted this search. I've added
    AND t. contains(oplossing, :P15_OPLOSSING)
    AND t.contains(sleutelwoorden, :P15_SLEUTELWOORDEN)
    That didn't work, so I changed those two to:
    AND t.oplossing = (t.contains(oplossing, :P15_OPLOSSING)>0)
    AND t.sleutelwoorden = (t.contains(sleutelwoorden, :P15_SLEUTELWOORDEN)>0)
    which didn't work either, which I expected to be the case. Clearly I'm not doing it correctly, I intend to look it up tonight in the packaged applications as I do want to findt it myself to.
    But does anyone can give a hint, on what I am doing wrong ?
    SELECT t.ticketid ticketnr, t.ticketid,
    g.voornaam||' '||g.naam aangemaaktdoor,
    t.credt, t.applicatiecd, t.titel,
    s.statusdefoms,
    si.statusdefoms instat,
    NVL2(t.toegekend,'Y','N') toegekend,
    sleutelwoorden, klantprioriteitid, oplossing, s.htmlkleur, si.htmlkleur inthtmlkleur
    FROM ticket t,
    gebruiker g,
    status s,
    status si
    WHERE t.gebruikerid = g.gebruikerid
    AND t.statusid = s.statusid
    AND t.statusinternid = si.statusid (+)
    AND t.applicatiecd = NVL(:P0_APPLICATIECD, :F101_APPLICATIECD)
    AND (t.categorieid = :P15_CATEGORIEID OR NVL(:P15_CATEGORIEID, 0) = 0)
    AND (t.moduleid = :P15_MODULEID OR NVL(:P15_MODULEID, 0) = 0)
    AND (t.statusid = :P15_STATUSID OR NVL(:P15_STATUSID, 0) = 0)
    AND (t.statusinternid = :P15_INTSTATUSID OR NVL(:P15_INTSTATUSID, 0) = 0)
    AND (t.versieid = :P15_VERSIEID OR NVL(:P15_VERSIEID, 0) = 0)
    AND t.ticketid LIKE '%'||:P15_TICKETID||'%'
    AND t.gebruikerid = DECODE(NVL(:P15_GEBRUIKERID,0), 0, t.gebruikerid, :P15_GEBRUIKERID)
    AND t.credt BETWEEN NVL(:P15_DATUMVAN, To_Date('01-01-1900', 'DD-MM-YYYY')) AND NVL(To_Date(:P15_DATUMTOT, 'DD-MM-YYYY'), sysdate) +1
    AND t.titel LIKE '%'||:P15_TITEL||'%'
    AND t. contains(oplossing, :P15_OPLOSSING)
    AND t.contains(sleutelwoorden, :P15_SLEUTELWOORDEN)
    AND PCK$Ticket_Admin.getklantid(t.gebruikerid) = DECODE(Pck$Ticket_Admin.isklantadminroleN(:APP_USER,NVL(:P0_APPLICATIECD, :F101_APPLICATIECD)), 1, PCK$Ticket_Admin.getklantid(:APP103_GEBRUIKERID), PCK$Ticket_Admin.getklantid(t.gebruikerid))
    AND (:APP103_GEBRUIKERID IN (t.voor_gebruikerid, t.gebruikerid)
    OR Pck$Ticket_Admin.isintern(:APP_USER,:P0_APPLICATIECD) = 1)
    changed to:
    AND t.oplossing = (t.contains(oplossing, :P15_OPLOSSING)>0)
    AND t.sleutelwoorden = (t.contains(sleutelwoorden, :P15_SLEUTELWOORDEN)>0)

    I have worked it further out now, and looked at the search of the packaged application. It turned out to be a pl/sql block . I used what I found in there to adapt the previous search. I added the following:
    OR (CONTAINS(t.oplossing, :P15_OPLOSSING)>0)
    OR (CONTAINS(t.sleutelwoorden, :P15_SLEUTELWOORDEN)>0)
         OR (CONTAINS(t.titel,:P15_SEARCH_T_O_S)>0 OR
         CONTAINS (t.oplossing, :P15_SEARCH_T_O_S)>0 OR
         CONTAINS(t.sleutelwoorden, :P15_SEARCH_T_O_S)>0 )
    OR (CONTAINS(t.titel,:P15_SEARCH_T_O_S)>0 AND
         CONTAINS (t.oplossing, :P15_SEARCH_T_O_S)>0 AND
         CONTAINS(t.sleutelwoorden, :P15_SEARCH_T_O_S)>0 )
    oplossing means solution
    sleutelwoorden means keywords
    titel means title
    Yet this doesn't work yet. It gives an error message:
    failed to parse SQL query:
    ORA-01719: outer join operator (+) not allowed in operand of OR or IN
    I've tried adding the addition in a different place, yet that gives the same error message. I'm not sure now.

  • DBMS_AQ package

    Hi there! I would like to send messages to a IBM WebSphere MQ using the DBMS_AQ package (ORACLE 10g) and PL/SQL but I don´t know how (as a matter of fact I am not sure if I have to use the DBMS_AQ package). I am very confused about it. No Java, I have to use PL/SQL. Sorry, I hate to post this kind of posts. Thank you in advanced.

    Hi,
    in order to send messages from an AQ to MQ you have to use the Oracle Message Gateway
    (see e.g. http://filibeto.org/sun/lib/nonsun/oracle/11.2.0.1.0/E11882_01/server.112/e11013/mg_start.htm ).
    Then you can put messages into an AQ (via DBMS_AQ) and then these messages will be transfered automatically
    (via a DB scheduler and an agent process) to MQ. The installation is not so easy, but it is worthwile.
    Kind regards,
    WoG

  • Reading html data & uploading a file in single html form using htp package

    Hi
    I have designed a html screen using htp package in which i have few text items and file upload button. I have to validate all forms data like text items and check box elements and upload file to unix. I am using java script for file validations and cgi script to upload file. With this I am able to either read form data or upload file but not both.
    At a time I want to insert a record to database with html form values and upload file to unix with htp package. Please suggest how can I read html form data + uploading a file to unix simultaneously in a single htp procedure.
    Thanks,
    Pradeep

    Have you ever considered using Application Express (APEX)?
    Oracle Application Express (APEX)
    Sounds like you're going the long way around to create a web based application.

  • Error while sending a mail using UTP_MAIL package in Oracle 10g

    Hi,
    We are using UTP_MAIL package to send a mail from Oracle 10g.We have follwed the following steps ...
    SQL> connect sys/password as sysdba
    Connected.
    SQL> @$ORACLE_HOME/rdbms/admin/utlmail.sql
    Package created.
    Synonym created.
    SQL> @$ORACLE_HOME /rdbms/admin/prvtmail.plb
    Package body created.
    SQL > alter system set smtp_out_server = '<mail_server_ip:25>' scope =spfile;
    System altered..
    Now we try the code
    begin
    utl_mail.send(
    sender => 'sender's mail',
    recipients => 'receiver mail',
    CC => 'optional',
    subject => 'Testing utl_mail',
    message => 'Test Mail'
    end;
    But we get the following error...
    ERROR at line 1:
    ORA-29278: SMTP transient error: 421 Service not available
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 97
    ORA-06512: at "SYS.UTL_SMTP", line 139
    ORA-06512: at "SYS.UTL_MAIL", line 405
    ORA-06512: at "SYS.UTL_MAIL", line 594
    ORA-06512: at line 2
    We also tried connecting to the mail server through telnet .But it is not getting connected..
    Please help us to solve the issue.

    From your own posting you may have the clue, if you try to access your mail server through telnet and it is not successful, it means the service is down or there are networking issues.
    On pre 10gR2 versions there was a bug 4083461.8. It could affect you if you are on 10gR1
    "Bug 4083461 - UTL_SMTP.OPEN_CONNECTION in shared server fails with ORA-29278 Doc ID:      Note:4083461.8"
    This was fixed on 10gR2 base and on 9.2.0.8.0
    ~ Madrid

  • How to delete data from a file using IO package

    Hi All,
    i am trying to remove some content of the file.
    this content is not at starting of file not even at end of file.
    can anybody tell me how can i delete number of lines from file using IO package.

    iam having some data in text file .ex:in flowrist.txt
    12/5/07,500,300,6000 like many set of datas are
    there.In these if i want to delete the data based on
    the date which i specified.How to do this specific
    deletion?You need to open a stream to read in the file and then use the indexOf method provided in the Sting class to check if the line contains the date or whatever String you are looking for, if so then skip that line and store or re-write the lines you wish to keep, as well as some extra lines you may wish to add.
    Take a look below at this example found on Google.
    http://www.java-tips.org/java-se-tips/java.io/how-to-read-file-in-java.html
    The above read a file line by line and prints it to console. You should be able to modify this, instead of using System.out to print the line you should use index of to check the lines for a date/String. Index of return -1 if the String you specify is not in the line you parse.

  • Help finding and using a package

    hi guyz,
    Iam new to this forum and i need this info urgently. so plz try to help me.
    I want to use the package below in an applet to convert my TemporaryRegistrationPermit to create a PNG file and then print it.
    how can i get the above package. I searched a lot on net and even on IBM website but never found it. How can i get it and include the class file in an applet and use the methods in it.Is there any other way to include this package in my applet, i mean a URL pointing to this class file.
    package com.ibm.gs.houston.saz.trp.utils.TemporaryRegistrationPermit
    I would really appreciate an early reply
    thank you
    tarun

    How do you know you need this package ? You know the path to it, so you must have seen it referenced somewhere.
    Some background please, but it sounds like it's an IBM internal class of some sort, so I wouldn't get your hopes up unless you have legitimate access to this or know it to be freely available.
    D.

  • Submitting Oracle job via OCCI using dbms_job package

    I am using 10g client to connect to a 9i Database on Redhat Linux AS 3.0.
    I am trying to submit a job via OCCI. I get back a jobId, but don't see the job in the user_jobs table or the result of the job being executed.
    I am using occi::Statement in the following way :
    stmt = connection->createStatement("begin dbms_job.submit(:v1, 'submitJobTest;', sysdate,'sysdate+1'); end;");
    // where submitJobTest is a stored procedure
    stmt->registerOutParam(1, OCCIINT);
    stmt->executeUpdate();
    int jobId = stmt->getInt(1);
    I get back a job id, but can't find it in the user_jobs. The first time I executed the program, i got back jobId 0, then 1 and so on..
    Any ideas? Do I need to use dbms_scheduler package?
    Thanks, Nilofer

    Good catch!
    Had a bug, in that my autocommit was not being set!
    Works now.
    Thanks,
    Nilofer

  • How to print new line using DBMS_OUTPUT package

    Hi,
    I am trying to print a new line using DBMS_OUTPUT package. but it do not print the new line.
    set serveroutput on size 200000
    set feedback on
    BEGIN
    DBMS_OUTPUT.PUT_LINE('First Line');
    DBMS_OUTPUT.PUT_LINE('');
    DBMS_OUTPUT.PUT_LINE('Second Line');
    END;
    I expect following output ...
    First Line
    Second Line
    but i got following output....
    First Line
    Second Line
    why DBMS_OUTPUT.PUT_LINE( '); is not printing a new line ?

    You can try the following:
    SQL> ED
    Wrote file afiedt.buf
      1  BEGIN
      2  DBMS_OUTPUT.PUT('ONE LINE...');
      3  DBMS_OUTPUT.PUT('SECOND LINE...');
      4  DBMS_OUTPUT.NEW_LINE;
      5  DBMS_OUTPUT.PUT_LINE('THIRD LINE WITH NEW LINE...');
      6  DBMS_OUTPUT.PUT('TEST');
      7  DBMS_OUTPUT.NEW_LINE;
      8  DBMS_OUTPUT.PUT_LINE('FOURTH LINE'||CHR(10)||'EXAMPLE');
      9  DBMS_OUTPUT.PUT_LINE(CHR(10));
    10  DBMS_OUTPUT.PUT_LINE('FIFTH LINE');
    11* END;
    SQL> /
    ONE LINE...SECOND LINE...
    THIRD LINE WITH NEW LINE...
    TEST
    FOURTH LINE
    EXAMPLE
    FIFTH LINE
    PL/SQL procedure successfully completed.Documentation:
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_output.htm#i1000062

  • How do I create and use a package?

    Sorry for the noobish question, but I have never had the need to use a package and currently would like to learn how they work just to satisfy my own curiosity.
    Suppose I have a file named Node.class in a folder named Classes, and I have another class named Main.class sitting in another folder. I want to create a Node object using the Main class.
    How do I accomplish that? Would I need to use a package?
    I tried to write package Classes; on my Main file but it did not work. thanks

    This is an old explanation I wrote:
    This is a minimal explanation of packages.
    Assume that your programs are part of a package named myapp, which is specified by this first line in each source file:
    package myapp;
    Also assume that directory (C:\java\work\) is listed in the CLASSPATH list of directories.
    Also assume that all your source files reside in this directory structure: C:\java\work\myapp\
    Then a statement to compile your source file named aProgram.java is:
    C:\java\work\>javac myapp\aProgram.java
    And a statement to run the program is:
    java myapp.aProgram
    (This can be issued from any directory, as Java will search for the program, starting the search from the classpath directories.)
    Explanation:
    Compiling
    A class is in a package if there is a package statement at the top of the class.
    The source file needs to be in a subdirectory structure. The subdirectory structure must match the package statement. The top subdirectory must be in the classpath directory.
    So, you generate a directory structure C:\java\work\myapp\ which is the [classpath directory + the package subdirectory structure], and place aProgram.java in it.
    Then from the classpath directory (C:\java\work\) use the command: javac myapp\aProgram.java
    Running
    Compiling creates a file, aProgram.class in the myapp directory.
    (The following is where people tend to get lost.)
    The correct name now, as far as java is concerned, is the combination of package name and class name: myapp.aProgram (note I omit the .class) If you don't use this name, java will complain that it can't find the class.
    To run a class that's NOT part of a package, you use the command: java SomeFile (assuming that SomeFile.class is in a directory that's listed in the classpath)
    To run a class that IS part of a package, you use the command java myapp.aProgram (Note that this is analogous to the command for a class not in a package, you just use the fully qualified name)

Maybe you are looking for

  • Won't detect Logitech Bluetooth mX900 mouse unless moving it at startup

    When I start up my iMac, it does not automatically detect my Logitech MX 900 bluetooth mouse unless I am moving the mouse around at the right moment. If I am not moving the mouse, a screen pops up saying the computer has been unable to detect the mou

  • Clear inspection lot for defect items

    Hi All, What is the process if i found the inspection lot have defect how do i create the notification .and result. after moved it to blocked stock. how can i close the nodification and change the result and do the ud for the lot.

  • SAVE / SAVE AS buttons in editor - possible ?

    Is it possible to enable Save and Save As buttons in the editor? The only way I see to save files is File > Save or File > Save As Would be great if there were buttons in the toolbar Many thanks

  • RFC Lookup - Best Approach To Parse Returned Tables

    Hi Everyone, We are doing some RFC Lookups at a header node that are returning tables for all of the items (for performance reasons).  I am trying to figure out what the best way to extract the values from the table, which is most of time has more th

  • Unable Install Bootcamp 2.0 OS X 10.5 - Error "A system restart is pending"

    We are using Bootcamp Beta 1.4 on a Macbook Pro with Windows Vista installed without any problems. We have succesfully upgraded to OS X 10.5 and tried to upgrade the Windows drivers. This fails with the message "A system restart is pending. Complete