AQ (PL/SQL) and JMS access to same queue?

Hello,
I have a queue of type JMS-MapMessage for which I want to enqueue messages with the
AQ PL/SQL API. How would I define it's
payload since apparently the message content
cannot be displayed by sqlplus? Alternatively, how can I set my own properties for a JMS-type queue in PL/SQL?
I'd be glad if I could get to see an example
of a PL/SQL-ENQUEUE to a JMS-type queue!
Thanks,
Karin

I am using PL/SQL directly to send JMS text messages. Works fine. Here is example:
DECLARE
Enqueue_options DBMS_AQ.enqueue_options_t;
Message_properties DBMS_AQ.message_properties_t;
Message_handle RAW(16);
User_prop_array SYS.AQ$_JMS_USERPROPARRAY;
Agent SYS.AQ$_AGENT;
Header SYS.AQ$_JMS_HEADER;
Message SYS.AQ$_JMS_TEXT_MESSAGE;
Message_text VARCHAR2(100);
BEGIN
Agent := SYS.AQ$_AGENT('',NULL,0);
User_prop_array := SYS.AQ$_JMS_USERPROPARRAY();
Header := SYS.AQ$_JMS_HEADER( Agent, '', 'aq1', '', '', '', User_prop_array);
Message_text := 'Message 1 from PL/SQL';
Message := SYS.AQ$_JMS_TEXT_MESSAGE(Header, LENGTH(Message_text), Message_text, NULL);
DBMS_AQ.ENQUEUE(queue_name => 'aq1.webapp_queue',
Enqueue_options => enqueue_options,
Message_properties => message_properties,
Payload => message,
Msgid => message_handle);
COMMIT;
END;
/

Similar Messages

  • How many instances can access the same queue at the same time ?

    Hi,
    In my application I am cloning a VI n times and these n instances are accessing the same queue. Is there any restriction on this 'n' for successful operation.
    Regards,
    Runjhun

    Runjhun,
    If the accesses are to enqueue data, then no limit (beyond the number of VIs which will fit in memory).  If you are dequeuing, then n =1. Dequeue removes data from the queue and you would have no way to know which of the n VIs got which element from the queue.  Read the deteiled help for the queue functions.  If you need to read the same data in multiple places, you need some other mechanism.
    Please tell us more about your application.  What kind of data and how much data are in the queue? How fast is the data being generated? How long must the data persist (be availabel after it is generated)? Do you need to guarantee that all the VIs get the data?
    Lynn

  • Oracle PL/SQL and Microsoft Access..

    Does anyone know of a good tutorial on how to write the correct syntax for Oracle PL/SQL in an Access pass-through query?

    Do you want to write PL/SQL via Access, or just pass a SQL string as a query? There are many books on PL/SQL if that is what you need, however, I suspect it is not.
    Oracle SQL is pretty standard, except that for versions up to and including 8.x, it only accepts joins listed in the "WHERE" clause. Access itself will accept this syntax for inner joins. Most general SQL books seem to include a section on Oracle and T-sql variations.
    SELECT a.field_1, b.field_2
    FROM table_1 a, table_2 b
    WHERE a.field_x = b.field_y ;
    BUT if field_x is a CHAR field containing trailing spaces (CHAR(6) value is 'ABC ') and field_y is a VARCHAR2 field (value is 'ABC'), then the join condition should be:
    WHERE TRIM(a.field_x) = b.field_y ;
    for outer joins you add "(+)" to the field that may be blank
    SELECT a.field_1, b.field_2
    FROM table_1 a, table_2 b
    WHERE a.field_x = b.field_y(+) ;
    (Access) MID([field_1],2,5] becomes (Oracle) SUBSTR(field_1,2,5)
    regards

  • Can CF and ASP Access the Same Database?

    Hello. I'm about to go into beta with a ColdFusion 8 site I
    just wrote, and I've just realized there could be a problem I
    haven't anticipated. There's another site, written in ASP, which
    will accessing the same data at the same time. The data are in
    FoxPro for DOS, which (if I have the terminology right) is a 'file
    server' database. Both my site and the ASP site will be accessing
    it through ODBC. I will be accessing it on a read only basis, and I
    believe the ASP site accesses it read only as well. However, other
    employees in the company are constantly accessing it read/write.
    The ASP site has been already up and running for some time,
    and the office manager (it's a small company) finds that he is able
    to avoid conflicts by first stopping the ASP server each morning,
    then starting FoxPro, then re-starting the ASP server. (I do not
    mean the IIS server, but a little EXE written by the ASP
    programmer, which puts up its own little window with 'start' and
    'stop' buttons on it.)
    However, I find that on my own PC, using the free Developer
    version of ColdFusion and accessing my site as localhost, if a DBF
    (database file) is opened in FoxPro (even if no one is currently
    writing to it), then my CF web site cannot access it, and vice
    versa. That is, if I start FoxPro first and open the DBF of
    interest, my web site can't access that DBF. And conversely, if I
    access it first via my web site, then FoxPro can't access it. In
    other words, the solution which works for the office manager and
    his ASP site does not work for me with CF on my local PC.
    Will matters be different in their system, where I will be
    installing my site tomorrow, along with the Standard version of CF
    8? If it matters, the FoxPro data and the Web server will be
    different boxes linked by a network. The operating system is
    Windows 2003 if I recall correctly.
    Should I be saying 'Oops!' right about now?
    I can probably come up with a workaround by having FoxPro
    write a record to an alternate DBF every time the DBF of interest
    to my site is updated, but will I have to do this?
    Thanks for your help.

    paross1 wrote:
    > there probably isn't
    > much that can be done with a database that probably
    isn't designed for multiple
    > simultaneous transactions.
    >
    > Phil
    >
    Not much that can be done to make the database robust and
    handle
    simultaneous transactions. But you could wrap all your CFML
    that
    accesses this resource in named <cflock ...> tags so
    that they are
    single threaded, thus restricting CF to one access at at
    time. Then
    wrap all of this up in a <cftry><cfcatch...>
    blocks to gracefully handle
    when the database is locked up by some other user/process.
    You will still have many times when the CF application will
    not be able
    to access the resource do to locking issues, but it will
    handle this
    gracefully and not just FAIL.
    Of course this will have serious performance, throughput and
    scalability
    consequences. But I suspect if you are using something like
    FoxPro you
    are not building an application expected to handle heavy
    load.

  • Routing JMS message from same queue to different channels.

    From a given adapter module, is there a way of calling different communication channels?
    The scenario: The sender of the data is JMS. One single queue contains desperate text format. Based on the content of the first 4 characters , PI has to parse it differently in its own corresponding MT. The target IDoc structure remains the same. I have multiple messageTransformBeans set up, one for each MT assuming that the data would arrive in different JMS queues. However since the data is now all heaped on to a single queue, the challenge of routing the data now lies in SAP PI.
    HowTo - Send Test Messages to the Adapter Engine (to an Integrated Configuration) - This solution does send message directly to the IE (using 7,1), but not to the adapter engine where the messageTransformBeans exist.
    Any solid pointers in the direction will be really helpful.
    Regards,
    Keerti

    Hi,
    you can go for end to end testing.
    if jms not available use file adapter in the sender side and fetch the text file and test it.
    Regards,
    Muni

  • Mail on iMac not accessing MS Exchange server but both iPhone and iPad access the same account with no problems.

    I have been using an iPhone and iPad to access my work emails via our MS Exchange server for a number of years now with no problems at all.  I recently replaced my home PC with an iMac (first Mac I have owned) but cannot get it to communicate with the exchange server.  I've checked and re-checked the information on the iMac and my iPad - I even deleted the mail account on the iPad and input the details concurrently with setting up on the iMac - but the Mac will not access the exchange server.
    I receive the message "The Exchange server "---------------" rejected the password for user "------"  Enter you password again or cancel."  I am using the correct password.  iPad and iPhone are logging on using that password fine.  iMac just ends up repeating this message.
    Our IT support at work assure me that there is no reason from their end for it not to work, and reasonably point to it working using the iPhone etc.
    I'd be extremely grateful if anyone can provide a solution to this basic, but extremely frustrating, little problem.

    iPhone and iPad use a different way of accessing the server.
    I don't know the exact details, but we are using Zarafa instead of Exchange and have the same problem:
    iPhone and the likes can connect to Zarafas z-push interface, which is some identical interface to the native Exchange interface, while the desktop e-mail application tries to interface with the web front end (via http) of the server.
    These are completely different setups and it depends on the actual installation of the server to get this going.
    So, you will most likely need different access parameters for the desktop - and the web mail feature has to be enabled on the Exchange server.
    In my opinion using the web mail interface is just silly. On the other hand, the native protocol has less features comparedto the web front end, so you are somehow stuck with sins of the past.
    Good luck!

  • SQL and MS Access

    I have a Microsoft access database which holds information about several different people for each person there are several records each for a different week using week numbers (from 1 first week january to 52). I need to extract the last record for each person the trouble is that the last record for each person is from a different week and therefore has a different week number. i need to extract all the latest record for all the people in a single statement i cannot find a way is it possible in access.

    In your last topic about this problem
    http://forum.java.sun.com/thread.jsp?forum=48&thread=213166
    you were told to use ORDER BY and GROUP BY and WHERE.
    But WHERE is a selection refering to the entire table. So only the records of the very last week (of all records) are selected.
    I think the solution lies in using the HAVING clause instead of WHERE: this is a selection condition for each group, e.g.
    HAVING week = ( select MAX( week ) FROM table )
    Sorry, I have no time to work it out.
    If you might use a SQL book or document for understanding HAVING and try it by yourself.
    I hope this is possible for Access then.

  • Can I have an Australian account and UK account in itunes and still access on same pc/iphone? I live in both countires for part of the year.

    I currently have a UK based account but I am in Australia for about half of the year (have both UK and Aussie based bank accounts) is it possible to have iTunes accounts in both contires. Especially as there are loads of songs on the iTunes Australia that just aren't on the UK iTunes.
    Many thanks in advance!
    H

    Hi ...
    is it possible to have iTunes accounts in both contires.
    The issue is that your credit or debit card credentials must be associated with the same country where you reside so you will have to change your credit card credentials each time you switch stores.
    "Although you can browse the iTunes Store in any country without being signed in, you can only purchase content from the iTunes Store for your own country. This is enforced via the billing address associated with your credit card or other payment method that you use with the iTunes Store, rather than your actual geographic location."
    From here >  The Complete Guide to Using the iTunes Store | iLounge Article

  • Can I change two devices of my Id and assign new id's and still access the same cloud.

    After ISO8 my sons iPad rings when I receive a call. I have two 5c's and an iPad under one apple id. Can I assign a new id to my wife's phone and my son's iPad and then all of use the same cloud under the new update? Will my wife lose her contacts? Im thinking what I need to do is start both devices from scratch and assign new id's with different emails and then add them to family sharing. Am I correct here, I just want to verify before attempting so I do not lose anything or create unnecessary backlash in my direction. Thank you for any assistance

    If your goal is to stop your son's iPad from ringing when you receive a call, all you need to do is go to Settings>FaceTime on his iPad and turn "iPhone Cellular Calls" off.

  • SOA 11g and JMS cannot write to queue

    I have a process which will read from a queue (works fine), but trying to write to a queue never posta a record. I am using the JMS adapter. The write operation in the console shows it was successful . I am using a non-XA data source. the xa worked, but I have my own error handling which the XA does not work with.
    Maybe the non-xa is not doing a commit on wirte?

    You have to configure a transport header action with "pass all headers through pipeline" option to make this work.
    Configuring Transport Headers in Message Flows
    The transport header action is a communication type action, and it is available in pipeline stages and error handler stages.
    Configuring Global Pass Through and Header-Specific Copy Options for Transport Headers
    The following options are available when you configure a transport headers action:
    > * The Pass all Headers through Pipeline option specifies that at run time, the transport headers action passes all headers through from the inbound message to >the outbound message or vice versa. Every header in the source set of headers is copied to the target header set, overwriting any existing values in the target >header set.

  • Multiple users accessing the same server.

    Ok here is my issue, about 2 months ago I started having issues with Filesharing on my 2012 Mac Mini running Lion server (current update). We have 3 users that VPN into our conpany network and usually access the same folder, 2 months ago they started conflicting with each other. When one VPNs into the network and connects to the server they are fine, if the second one connects to the network they are fine but if the second one tries to access the fileshare they knock the second one off the server. The first one's connection eventually hangs and they have to completely disconnect from the VPN. I am wondering if this was caused by a patch or if there is something else going on. I have tried to reboot the server and checked the logs for anything but I am not seeing what may be causing this. I have restarted the Filesharing in the Server app and still get the same problem, the users are connecting via local credentials to the server. I don't think it is a password issue since either user can log in and access as long as another user doesn't so I am not sure what the issue could be.
    any help appriciated,
    josh

    By 'standard record locking system' do you mean there is nothing I need to do programatically? No block level properties to change?
    So you are saying this is just the way it always works. So as soon as one of our call center agents opens a record all I have to do is create a pending update to any field?
    But won't another user be able to open the form and just query that record not knowing another user has it open?

  • Simultaneous Access to the same queue

    Could some one please clarify how does the AQ mechanism handle requests in the following scenario:
    Two applications are both talking to the same Queue using the same consumer for dequeuing messages. The dequeuing happens under a main transaction and the dequeue mode is set to REMOVE. The messages is completely removed from the queue when the transaction is committed at the end of processing the message. Also, the dequeue API is through stored procedures.
    I would like to know if, while one application has dequeued a message and is still processing it as a part of the transaction, what happens when the second application tries to access the same queue and try to dequeue a message. Would it get the same message that the first application is still processing and is not yet been completely dequeued.
    Let me know.
    Thanks,
    -NS.

    --- create queue type
    CREATE TYPE mesaj_t AS OBJECT
    message varchar2(100)
    --- create queue table , queue and start queue
    BEGIN
    dbms_aqadm.create_queue_table(queue_table => 'mesaj_qt',
    queue_payload_type => 'mesaj_t',
    sort_list => 'PRIORITY,ENQ_TIME',
    multiple_consumers => FALSE);
    dbms_aqadm.create_queue(queue_name => 'mesaj_q',
    queue_table => 'mesaj_qt');
    dbms_aqadm.start_queue(queue_name => 'mesaj_q');
    END;
    --enqueue message
    DECLARE
    r_enqueue_options dbms_aq.enqueue_options_t;
    r_message_properties dbms_aq.message_properties_t;
    v_message_handle RAW(16);
    BEGIN
    dbms_aq.enqueue(queue_name => 'mesaj_Q',
    enqueue_options => r_enqueue_options,
    message_properties => r_message_properties,
    payload => mesaj_t(message => 'selam'),
    msgid => v_message_handle);
    END;
    --dequeue message from session 1 and dont comit
    DECLARE
    r_dequeue_options dbms_aq.dequeue_options_t;
    r_message_properties dbms_aq.message_properties_t;
    v_message_handle RAW(16);
    l_corr_identifier VARCHAR2(128);
    l_recipient_list dbms_aq.aq$_recipient_list_t;
    v_payload_handle mesaj_t;
    BEGIN
    dbms_aq.dequeue(queue_name => 'mesaj_Q',
    dequeue_options => r_dequeue_options,
    message_properties => r_message_properties,
    payload => v_payload_handle,
    msgid => v_message_handle);
    END;
    --and try to dequeue from second session same message with using msg_id property
    DECLARE
    r_dequeue_options dbms_aq.dequeue_options_t;
    r_message_properties dbms_aq.message_properties_t;
    v_message_handle RAW(16);
    l_corr_identifier VARCHAR2(128);
    l_recipient_list dbms_aq.aq$_recipient_list_t;
    v_payload_handle mesaj_t;
    BEGIN
    r_dequeue_options.wait := DBMS_AQ.NO_WAIT; -- if i change to DBMS_AQ.FOREVER then it will wait for new message for dequeuing, with no_wait you will get an exception immediately if there is no message for you in queue
    r_dequeue_options.msgid := 'BBAB7BA403CD4B259A86B55783862912'; --replace this with your msg_id of your enqueued message
    dbms_aq.dequeue(queue_name => 'mesaj_Q',
    dequeue_options => r_dequeue_options,
    message_properties => r_message_properties,
    payload => v_payload_handle,
    msgid => v_message_handle);
    END;
    conclusion :
    with remove mode other session can not dequeue message when first session processing message and not committed yet

  • RRAS VPN performance and Internet access which connecting to RRAS VPN

    For the first time, I setup win2008R2 RRAS VPN(L2TP and SSTP ) in Azure VM for my client.
    I am running Package Application which include SQL2008 in that  VM.
    I plan that remote user connect from client application using RRAS VPN to Application server in Azure VM.
    But I am worrying about the performance bottle net due to network speed reason.
    I am not yet make sure network environment of my client ( my client is living in USA ).
    1
    But if we decide to use RRAS VPN for that application , which kind of VPN(PPTP,L2TP,SSTP,IKE) will be better in network speed?
    2
    I noticed that which connecting to RRAS VPN, I could not connect to the Internet from remote client PC.
    Is there any way to enable RRAS VPN access and Internet access at same time ?

    Hi,
    1. PPTP is the easiest protocol to use for setting up VPN. And it have minimal security.
    L2TP/IPSec, SSTP and IKEv2 was more security than PPTP.
    IKEv2 can provide a secured uninterrupted ubiquitous VPN connectivity.
    Here are good article about comparing four types of VPN,
    Different VPN tunnel types in Windows - which one to use?
    http://blogs.technet.com/b/rrasblog/archive/2009/01/30/different-vpn-tunnel-types-in-windows-which-one-to-use.aspx
    2. Two common scenarios cause the problem that connected client can’t browse the Internet. First, the VPN server might not let remote clients access the Internet when they have a connection. In this case, when we close the VPN connection,
    the client can browse the Internet because the default gateway reverts to the gateway that ISP defines. Second, Windows might overwrite the ISP gateway with the VPN server-defined gateway when the client connects, so the client has no path to the Internet.
    We may need to uncheck the use default gateway on remote network to solve this problem.
    Best Regards,
    Tina

  • Entity Framework - Code First - Migration - How to access SQL Server and Oracle using the same context?

    Hello,
    I use Entity Framework code first approach.
    My project is working fine with SQL Server. But, I want to access Oracle too. I want to switch SQL Server and Oracle in run time.
    I am able to access Oracle using "Oracle.ManagedDataAccess.EntityFramework.dl" in a new project.
    But, Is this possible to access SQL Server and Oracle in the same project.
    Thanks,
    Murugan

    This should be possible with a Code-First workflow.  In Code-First the database mapping layer is generated at runtime.
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Differernce between SQL Tuning Pack and SQL Tuning Advisor, Access Advisor

    Hi. all.
    I have been using "TKPROF" in order to tune SQL till now.
    I am learning 10g, and would like to know the difference
    between "1. SQL Tuning Pack" and "2. SQL Tuning Advisor, Access Advisor".
    Are they same thing? If not, what are the differences in their "functionality"?
    All I know is that SQL Tuning Pack is not free, and SQL Tuning Advisor
    is packed with default installation. Right???
    Could you give me some html links or your "any advice and experience"?
    Thanks in advance. Have a good day.
    Best Regards.

    Hi,
    There are alternatives to the Oracle tuning packs, and remember the SQL advisors are relatuively simple, finding missing indexes and recommending MV's.
    A human can do a better job if you use the right techniques.
    BTW, you can get a SQLTuning advisor license online for only $3k:
    http://www.dba-oracle.com/oracle_news/2005_3_17_dql_tuning_access_advisor_licenses_available_online.htm
    SHAMELESS PITCH! - I wrote a book that describes techniques for tuning with scripts, instead of the advisors, if you are interested:
    http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm
    Hope this helps. . . .
    Donald K. Burleson
    Oracle Press author

Maybe you are looking for

  • Multiple Libraries - One Preferences File

    Hi all, I would like to set up Multiple Libraries in iTunes to Sync one with ATV and stream the other to ATV when it is active. The problem I have is that iTunes has ONE preferences file independent to the library and in particular the "Shared Name"

  • Using Airport for office network and still connect to public wifi

    HI I work in the public sector and we have open public wifi network that we can connect to, but have no control over and would never be given no access by our service user. we are a small sub contractor in a office tucked away. We have 3 Macs and 2 w

  • Upgrade from Mac OS 10.6.8 to the latest

    I have iMac with Mac OS 10.6.8 and when trying to install Adobe Photoshop I'm told that I have to upgrade to 10.7. How to do this and is it OK regarding all other applications I already have installed on my computer?

  • Mountain Lion internet sharing not working

    After installing server app, Internet sharing does not work anymore. am on 10.8.3 mid 2012 Mac Book Pro 13''. Can please anyone help me out.

  • Need SAPGUI for Mac OS 10.4.11 (Tiger)

    First, what is the recommended version of SAPGUI which will run in Mac OS 10.4.11 (Tiger). Would it be SAPGUI 7.1? And secondly, where can I download a version which will work in Tiger running on an Intel-based Mac? I would be so grateful for anyone'