AQ Callback across two Schemas

I'm trying to get AQ Callback working across 2 Schemas. I have it working fine when all is contained in a single Schema but when I split it out across 2 Schemas I get no messages dequeued. I'll post the code once I've had a chance to sanitise it but here's a summary of what we're doing:
1. Type created in Schema A - this will be the message payload.
2. Grant all on Type to Schema B.
3. Create Queue and Q Tab and Start Q in Schema A.
4. Create Enqueue Procedure in Schema A.
5. Create Dequeue Procedure in Schema B.
6. Add Subscriber (from Schema A, but that should be incidental)
7. Register the Callback (from Schema A) so that Schema B Dequeue Procedure is invoked via Callback.
If I enqueue a message from Schema A is just sits on the queue forever.
I'm convinced it's a permissions/privileges thing but I can't work it out. If anyone has experienced this before I'm very interested in any advice you have!
Cheers,
Pete

Hi,
I am also facing a similar issue. Is it required all the AQ infrastructure (Message tables, queues, enqueue and dequeue functions) be in the same schema? Below is my code, If I remove the schema qualifier - 'reddypr_rms01' from the below code, enqueue works fine, but it never dequeues. If I use the schema names then everything works fine.
The database is structured as follows, all my application tables, procedures etc is in schema 'rms01'. These objects are just synonyms in the schema 'reddypr_rms01'. I have created the AQ modules locally in reddypr_rms01.
create Type reddypr_rms01.message_typ_1 as object (
subject Varchar2(30), text Varchar2(80)
begin
dbms_aqadm.create_queue_table(
queue_table => 'reddypr_rms01.objmsgs80_qtab_1',
queue_payload_type => 'reddypr_rms01.Message_typ_1',
multiple_consumers => true);
dbms_aqadm.create_queue(
queue_name => 'MSG_QUEUE',
queue_table => 'reddypr_rms01.objmsgs80_qtab_1');
dbms_aqadm.start_queue(
queue_name => 'MSG_QUEUE');
end;
create procedure enqueue_msg( p_msg in varchar2 )
as
enqueue_options dbms_aq.enqueue_options_t;
message_properties dbms_aq.message_properties_t;
message_handle RAW(16);
message reddypr_rms01.message_typ_1;
begin
message := message_typ_1('NORMAL MESSAGE', p_msg );
dbms_aq.enqueue(queue_name => 'msg_queue',
enqueue_options => enqueue_options,
message_properties => message_properties,
payload => message,
msgid => message_handle);
end;
create table message_table(
msg Varchar2(4000)
create or replace procedure notifyCB( context raw,
reginfo sys.aq$_reg_info,
descr sys.aq$_descriptor,
payload raw,
payloadl number)
as
dequeue_options dbms_aq.dequeue_options_t;
message_properties dbms_aq.message_properties_t;
message_handle raw(16);
message reddypr_rms01.message_typ_1;
begin
dequeue_options.msgid := descr.msg_id;
dequeue_options.consumer_name := descr.consumer_name;
DBMS_AQ.DEQUEUE(
queue_name => descr.queue_name,
dequeue_options => dequeue_options,
message_properties => message_properties,
payload => message,
msgid => message_handle);
insert into message_table values(
'Dequeued and processed "' || message.text || '"' );
commit;
end;
begin
dbms_aqadm.add_subscriber(
queue_name => 'reddypr_rms01.msg_queue',
subscriber => sys.aq$_agent('recipient', null, null));
end;
begin
dbms_aq.register(sys.aq$_reg_info_list(
sys.aq$_reg_info('reddypr_rms01.MSG_QUEUE:RECIPIENT',
DBMS_aq.NAMESPACE_AQ,
'plsql://reddypr_rms01.notifyCB',
HEXTORAW('FF')) ) ,
1);
end;
begin
enqueue_msg('Advance_Queuing');
end;
/

Similar Messages

  • Preferred approach - Querying Across Multiple Schemas

    All,
    I am using two schemas within the same database as the source for my OBIEE repository/subject area. My question is whether anyone has a compelling argument or preference for setting up OBIEE to handle requests across the schemas as either:
    1. Set the connection pool property to 'Require Fully Qualified Table Names'
    2. Setup synonyms between the schemas for the tables that need to be exposed
    Just curious how others do it. I believe Synonyms may add on a small performance hit but I believe it would be negligible compared to qualifying the table with the schema name.
    Thanks,
    K

    There is no overhead in using synonyms to an object in another schema. In fact that's the best practice in my opinion. We have 3 DWHs in OBIEE each in its own schema. We also have a special OBIEE_RO account that has only select grants to all DWH objects and synonyms for all of them. We coded a script that generates all the grants and synonyms so we can re-run it when we add new objects. This assures we can use a single account for a OBIEE which is much more simpler to maintain. It also means we can share conformed dimensions between different DWHs.

  • Using one Itunes database across two macs

    Using one itunes database across two macs
    I currently run a 2010 MBP (500gb hd) at home and on the road and a 2013 Imac (1Tb hd) at work. I have a large lossless itunes library of about 300gb and would like to increase the library further.
    My MBP started running slowly and I realised that my iTunes library was choking the whole computer. I started to explore ways to store my library on a remote disk and bought a G drive 1Tb portable drive.
    My efforts to carry out the transfer were only partially successful with most of my library transferring but a significant number of tracks displaying the ! sign which means they couldn't be located.
    I have also got an Imac at work and what I had hoped to achieve was to have my iTunes database on the 1tb portable drive and use the portable disk on both my MBP and iMac.
    Our technical support company are dubious about whether this will work because the local specific itunes library data on each machine will differ and each machine will not operate correctly with the underlying data on the portable drive.
    I am not very technical and I am finding it difficult to follow the various posts on this board and elsewhere. Many seem to comment on splitting their library across multiple disks but I cant really seem to get to the bottom of storing my library on one disk and using it across multiple computers.
    Is what I am trying to achieve practical?
    If it is, can someone point me to an article/post please? Or alternatively could someone explain how I might achieve my goal.
    Thanks in a advance for your help.

    Here you go.
    http://lifehacker.com/software/itunes/ultranewb--how-to-move-your-itunes-library -to-an-external-drive-238296.php

  • Hello there - I am sharing an iPhoto library across two accounts on the same computer - it works fine EXCEPT for Quicktime movies - they play on one account and claim I don't have the rights on the other - all permissions are on and ok?

    Hello there - I am sharing an iPhoto library across two accounts on the same computer - it works fine EXCEPT for Quicktime movies - they play on one account and claim I don't have the rights on the other - all permissions are on and ok?

    It should be in the Users/ Shared folder.
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Note the option to check and repair Library Permissions
    Regards
    TD

  • Technical question:  Is it possible to work on the same Lightroom catalog across two computers and have the catalog sync? If so, how??

    Technical question:
    Is it possible to work on the same Lightroom catalog across two computers and have the catalog sync? If so, how??
    Here's a little more information on what I am trying to do.
    I have a desktop computer with 4tb worth of pictures that has Lightroom and Photoshop on it. I also have a laptop with Photoshop and Lightroom. I would like to be able to edit those same pictures with their current edits that are currently on my desktop on my laptop. If this can be done, I'm sure I need to be on the same wifi network for my laptop to be able to access my desktop's photo library. I am technically savvy enough to map a network drive, but how do I get my two Lightroom catalogs to sync when I make a change on one of my computers? Would i be working only on one catalog? Or two separate catalogs that would need to be manually synced to the other computer? Would it be beneficial to put my lightroom catalog on something like dropbox?
    I'd appreciate any information or tutorials if someone knows how to do this.

    I do this by having my LR catalog and photos on an external drive that I swap between the two computers.  I am on Windows and have the same drive letter assigned to the drive on both computers.
    Because the photos are on a portable drive I back up the portable drive to another hard-drive every night or after important work, because portable drives are susceptible to damage or loss.

  • How to compare two schemas in Oracle sql developer

    Hello,
    I need to compare both the data and schemas details (columns etc) between two schemas on different databases (connections).
    What is the easiest and most efficient way to do this? Hopefully in Oracle Sql Developer or Sql Plus?
    Thanks.

    In SQL Developer go to Tools -> Schema Diff !
    in SQL* Plus you will need to write PL/SQL for this.
    Amardeep Sidhu

  • How do I combine my Contacts across two email accounts into one?

    Somehow my contacts got split randomly across two email accounts. One is IMAP and the other pop3. I am trying to consolidate all my contacts again under the pop3 email account.  iCloud support could not understand how the mixing occurred, but I need to fix it now.  Can anyone help?
    Btw, I do use iCloud across my iPhone 5, iPad mini and MacBook Pro!
    Thanks
    Robert

    Contacts are not saved by type of account so your description is confusing. No matter if you have iCloud, Google, "On My Mac",  Exchange, Yahoo and AOL contacts, Mail uses them equally.
    Please post a screen shot showing this separation.
    Command-Shift-3 takes the entire screen
    Command-Shift-4 takes a portion of the screen. <--use this one
    Click on the camera icon to post.

  • Different ways to copy data between two schemas in one instance

    Hi there,
    I am searching a good way to copy data between two schemas in the same instance.
    Both schemas have an identical structure such as triggers, tables, views and so on. The only difference is the purpose: one is the productivity system and one is for development.
    I looked at datapump but I do not explicit want to export / import. I want to keep the data in the productivity schema as well as copy it to the other schema. Any ideas? I found out there is a copy statement but I dont't know how that works.
    Thank you so far,
    Jörn

    Thank you for your replies!
    I also thought of creating a second instance for development and move the dev - schema to it. I just don't know whether our server can handle both (performance?). Anyway the idea is to have a possibility to quickly rebuild the data inside a schema without indixes or triggers, just pure data. I thought the easiest way would be to copy the data between the schemas as they are exactly the same. However if you tell me DataPunp is the best solution i won't deny using it :).
    When you export data a file is created. does that also mean that the exported data is deleted inside the schema?
    best regards
    Jörn
    Ps: Guido, you are following me, aren' t you? ;-)

  • "Best Practice" for a stored procedure that needs to access two schemas?

    Greetings all,
    When my company's application is deployed, two schema owners are typically created and all database objects divided between the two. I'll call them FIRST and SECOND.
    In a standard, vanilla implementation there is never any reason for the two to "talk to each other". No rights to objects in one schema are ever granted to the other.
    I am currently charged, however, with writing custom code to roll up data from one of the schemas and update tables in the other with the rollups. I have created a user whose job it is to run this process, and this user has the proper permissions to all necessary objects in both schemas. I'll call this user MRBATCH.
    Typically, any custom objects, whether they be additional staging tables, temp tables or stored procedures are saved in the FIRST schema. I tried to save this new stored procedure in the FIRST schema and compile it, but got "Insufficient priviliges" errors whenever the code in the stored procedure tried to access any tables in the SECOND schema. This surprised me a little bit because I had no plans to actually EXECUTE the stored procedure as FIRST, but I guess I can understand it from the point of view of, you ought be able to execute something you own.
    So which would be be "better" (assuming there's any difference): Grant FIRST all of the rights it needs in SECOND and save the stored procedure in FIRST, or could I just save the stored procedure in the MRBATCH schema? I'm not sure which would be "better practice".
    Is there a third option I'm overlooking perhaps?
    Thanks
    Joe

    In this case I would put it again into schema THIRD. This is a kind of API schema. There are procedures in it that allow some customized functionality. And since you grant only the right to execute those procedures (should be packages of cause) you won't get into any conflicts about allowing somebody too much.
    Note that this suggestion seems very similiar to putting the procedure directly to the executing user MRBATCH. It depends how this schemauser is used. I always prefer separating users from schemas.
    By definition the oracle object to represent a schema is identical to the oracle object representing a user (exception: externally defined users).
    my definition is:
    Schema => has objects (tables, packages) and uses tables space
    User => has priviledges (including create session and connect) and uses temp tablespace only. Might have synonyms and views.
    You can mix both, but sometimes it makes much sense to separate one from the other.
    Edited by: Sven W. on Aug 13, 2009 9:51 AM

  • How do I re-establish a single virtual monitor across two 30" screens?

    How do I re-establish a single virtual monitor across two 30" screens?
    The fact that the screens are now separate with two menu bars, and the inability for images to appear across both of them is a great inconvenience to me. I have used this system since the dual monitors first became available and do not want to loose.
    While rearranging my desk top of current files, I seem to have jumping folders that flt to random places
    Thank for bailing me out on this!

    I've been looking for the same answer .. I stopped by local Apple store - Genius - he don't know
    3 monitors here .. and agree - it's an extreme irritant that when a window is across two monitors part of it disappears.
    Have Adobe Bridge catalog listing (and Filter, Collection, Keyword, Dates) on one monitor and main viewing window part on center monitor - no more.
    Supper long spread sheet across all three monitors - no more.
    Multiple Menu bars are irritating to use.

  • Invalid Object "Swapping" Between Two Schemas

    Hi all,
    I have an issue in my 11.2.0.2 database.
    I have two schemas that are almost exactly the same (one is part of a development environment, the other is a test environment) that have invalid procedures in them. These procedures exist in both schemas. There are a couple peculiar things about these procedures:
    -They have no compiler errors. If I compile a procedure, it becomes valid.
    -Once we compile a procedure in one schema, the same procedure in the other schema becomes invalid.
    To give an example:
    In schema APP_DEV, there is a procedure PROC1. It also exists in another schema APP_TEST.
    PROC1 is INVALID in APP_DEV, but is VALID in APP_TEST.
    If we compile PROC1 in APP_DEV, it becomes VALID in APP_DEV, but PROC1 will be INVALID in APP_TEST.
    In essence, these procedures "flip-flop" between being valid and invalid, as if they are connected somehow. But the two schemas cannot see each other because they have no select, execute or any other privileges to interact with each other.
    If anyone can shed some light on this, it'd be greatly appreciated.
    Thanks,
    Clint

    OK, I have it.
    DOH!  (told ya)
    So, while intellisense (typically) flags this table as not existing, that's just Intellisense doing the nonsense it always does. This obfuscated the ACTUAL error - which was the wrong schema defined in the output clause. The error itself pointed at the wrong
    line (nothing new there either). Once I fixed the OUTPUT clause, everything worked as expected - although SSMS is still putting squiggly red lines under everything that is working anyway. Yeah, we've all seen THAT behavior - no big deal.
    Anyway, that's the answer. It's magic - in that the error messages specialize in misdirection :)...
    Closing this. (I wonder if I get credit for answering my own question?)

  • Compare two schemas in oracle 11g

    Hi All,
    Can any one please help me how to compare two schemas in oracle 11g.
    Thanks
    Edited by: 793914 on Oct 22, 2010 9:33 AM

    You can do it with gridcontrol. Look for dictionary comparisons and dictionary baselines.
    If you don't have gridcontrol, you can also use SQLDeveloper (free download on otn).
    There are two ways to do it with SQLDeveloper.
    1) Use Tools->Database Diff. However, you need a change management license to use this functionality. I've never used this.
    The free way is to...
    2) Use Tools->Database Export. Run it once for each schema and make sure the "Show Schema" option is NOT checked before exporting the schema. Also make sure you don't export data. You can choose which types of objects to export as well.
    Once you have the two export files for the two schemas then simply run a diff tool on your platform. Use the diff command line for linux or winDiff or something similar in windows.

  • Sync Address Book across two Macs w/o .Mac

    How do I sync two address books across two Macs without using .Mac?

    Hi
    There are several third-party solutions. When I was without .Mac I used Address-O-Sync. You can find others on versiontracker.
    Matt

  • Sync iCal across two Macs w/o .Mac

    How do I sync the iCal calendar across two Macs without using .Mac? I have heard of iSyncCal but right now their website is offline and I can't get to it. Other solutions?

    Conal Ho,
    BusySync is another option: http://www.busymac.com/index.html
    ;~)

  • How do I get an image to appear across two pages?

    Setting up a book with iBook Author, and I want an image to appear across two pages, as it does with some of the images in the Life on Earth text. I've tried floating the image, but it only appears on one page, and the image cuts off at the page end. Anyone know how to do

    A Page consists a readers spread. A left facing page, and a right facing page. In the caes of iBooks Author that thinking is throw out the window. I am going to reference page 2 and page 3 of that Life on Earth iBook. The planet earth image.
    1. Take an image/object and place it where you want on the Right side of your Page. Now select that image/object and COMMAND-C (Edit>Copy) so we have a copy in the pastboard.
    2. Go to the Left ajoining page by scrolling the layout to the right and simply COMMAND-V (Edit Paste) so the image/object now resides on the left page. Position this image so it mirrors the opposite side of the image/object you place on the Right page.
    Hope that all made sense.

Maybe you are looking for

  • Overflow Error - Type P

    In the Portal, we're running Enteprise Compensation Management with EHP4.  For some Employees, we get an error that reads 'Overflow during the arithmetical operation (type P) in program SAPLZECM.  Any idea what causes this error? Thanks.

  • How do I restrict access to JSP or servlet only through SSL Port

    Hi I want to restrict the access to few jsp and servlet only through SSL port, so how can I block the acces to those jsp and servlet through normal port??? We are using weblogic 5.1. Any help on this highly appreciated. Aruna

  • Adobe Reader 10.0.1 on same machine as Acrobat 8 and 9

    We are about to upgrade to Adobe Reader 10.0.1. In our environment we have one platform with WinXP SP3 and Adobe Acrobat Standard 8.2.5 and Adobe Acrobat Pro 8.2.5. The other platform is a Win 7 and Adobe Acrobat Standard 9.4.1 and Adobe Acrobat Pro

  • A SOFTWARE AUTOUPDATE PROB

    I've tried to run the Software Autoupdate on my PC and after Accepting the terms, installing the acti'veX and install the required file that pops out on it's own, I always get that standard windows error message saying Internet Explorer has encounter

  • Safari changes url to local IP

    When away from home I can reach my server via a xyz.dnsalias.net dynamic address. For sometimes now Safari on my iPhone 3g "translates" this into a 192.168.x.y address that is the local IP of my server, which I sometimes connect to locally with my iP