Application Processes unique across different schemas?

I have a test and dev schema on the same server. both sets of code are identical in every way. however when i try and call an on demand application process in dev nothing happens. if i try and call an identical on demand application process on test i get the results i was expecting.
I changed the name of the application process in dev and i can call it ok. i was just wondering if two on demand application processes can have the same name if they are in different schemas? what else could be causing this issue?
Thanks
Tom

Sorry,
I copied the wrong code:
function get_select_list_xml(pThis,pSelect){
var l_Return = null;
var l_Select = html_GetElement(pSelect);
var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
'APPLICATION_PROCESS=CASCADING_SELECT_LIST_D',0);
get.add('AJAX_ORACLE_JOB_NUM',pThis.value);
gReturn = get.get('XML');
if(gReturn && l_Select){
var l_Count = gReturn.getElementsByTagName("option").length;
l_Select.length = 0;
for(var i=0;i<l_Count;i++){
var l_Opt_Xml = gReturn.getElementsByTagName("option");
appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
l_Opt_Xml.firstChild.nodeValue)
get = null;
This application process:
BEGIN
OWA_UTIL.mime_header ('text/xml', FALSE);
HTP.p ('Cache-Control: no-cache');
HTP.p ('Pragma: no-cache');
OWA_UTIL.http_header_close;
HTP.prn ('<select>');
HTP.prn ('<option value="' || 1 || '">' || '- Stream ID -' || '</option>');
FOR c IN (
SELECT DISTINCT b1.STREAM_ID empno , b1.STREAM_ID ename
FROM BILLINGS b1
WHERE b1.ORACLE_JOB_NUM = TO_NUMBER(:AJAX_ORACLE_JOB_NUM)
AND b1.STREAM_ID NOT LIKE ('TWS%E')
AND b1.STREAM_ID NOT LIKE ('%ERR')
AND (SELECT COUNT(S.BATCH_ID)
FROM CHANGE_SITES S
WHERE (regexp_like(UPPER(nvl(:ajax_site,'%')),(select site_expression from print_sites where upper(print_site_desc) = upper(S.SITE)))
OR S.SITE IS NULL)
AND S.ORACLE_JOB_NUM = b1.oracle_job_num
AND S.STREAM_ID = b1.stream_id
AND S.BATCH_ID = b1.batch_id) > 0
UNION
SELECT DISTINCT STREAM_ID empno , STREAM_ID ename
FROM BILLINGS b2
WHERE b2.ORACLE_JOB_NUM = TO_NUMBER(:AJAX_ORACLE_JOB_NUM)
AND b2.STREAM_ID NOT LIKE ('TWS%E')
AND b2.STREAM_ID NOT LIKE ('%ERR')
AND (SELECT COUNT(s2.batch_id)
FROM change_sites s2
WHERE S2.ORACLE_JOB_NUM = b2.oracle_job_num
AND s2.STREAM_ID = b2.stream_id
AND S2.BATCH_ID = b2.batch_id) = 0
AND (SELECT COUNT(sv.BATCH_ID)
FROM SITE_VIEW SV
WHERE (regexp_like(UPPER(nvl(:ajax_site,'%')),(select site_expression from print_sites where upper(print_site_desc) = upper(Sv.SITE)))
OR SV.SITE IS NULL)
AND sv.oracle_job_num = b2.oracle_job_num
AND sv.stream_id = b2.stream_id
AND sv.batch_id = b2.batch_id) > 0)
LOOP
HTP.prn ('<option value="' || c.empno || '">' || c.ename || '</option>');
END LOOP;
HTP.prn ('</select>');
END;

Similar Messages

  • Java application -  processing files on different unix server

    Hi,
    I was wondering if it is possible to
    a) read a file that is on a different unix server to the one that my java application is on
    b) move a file from one directory on the remote unix server to another directory on the remote unix server
    Regards,
    sabretooth

    for (b):
    If I were you I would set up a FTP account for your app on the remote unix server. Then I would get my hands on a simple ftp framework
    and simply:
    Ftp ftp = new Ftp("UNIXHostIP", username, password);
    ftp.connect();
    ftp.moveRemoteFile("form here","to here");
    ftp.disconnect();
    some frameworks:
    JScape, iNet Factory: com.jscape.inet.ftp.Ftp
    /n software, IP*Works: ipworks.Ftp
    Enterprise Distributed Technologies, Java FTP Client Library: com.enterprisedt.net.ftp.FTPClient
    IBM alphaWorks, FTP Bean Suite: com.ibm.network.ftp.protocol.FTPProtocol
    SourceForge, JFtp: net.sf.jftp.net.FtpConnection
    The Jakarta Project, Jakarta Commons/Net: org.apache.commons.net.ftp.FTPClient
    JavaShop JNetBeans: jshop.jnet.FTPClient
    Sun, JDK: sun.net.ftp.FtpClient
    Florent Cueto, JavaFTP API: com.cqs.ftp.FTP
    Bea Petrovicova, jFTP: cz.dhl.ftp.Ftp
    The Globus Project, Java CoG Kit: org.globus.io.ftp.FTPClient
    I recomend JScape's INetFactory (Easy to use)
    OR the one from Jakarta (Free)
    IP*Works (TOP Quality at a price)
    Check out http://www.javaworld.com/javaworld/jw-04-2003/jw-0404-ftp.html
    for a complete review of all the ftp frameworks
    Firewalls?
    make a folder that is public on the unix server-ie falls outside the firewall if there is one (fire walls might cause problems for you)
    Unless you know the password to get through the Proxy then this should not be a problem.

  • Getting list of tables the user has access to across different schemas.

    Hi,
    I have to get the list of tables that an User has access to. I tried the below code. It takes a very long time. Is there any way in which I can specify the user name and get all the tables that he has access to? I know that we can use dbMetadata.getTables api. But this returns the list of tables under the said schema. But I want the list of tables that the user has access including tables in other schema.
    In the below code, I am trying to get the tables for which USER_MICHAEL has access to.
    DatabaseMetaData dbMetadata = connection.getMetaData(); String userName = null; dbrs = dbMetadata.getTables(null,userName , "%", new String[] { "TABLE" }); dbrs=dbMetadata.getTablePrivileges("",userName,"%"); while (dbrs.next()) { String tableName = dbrs.getString("TABLE_NAME"); String schema = dbrs.getString("TABLE_SCHEM"); String privilege = dbrs.getString("PRIVILEGE"); String grantee = dbrs.getString("GRANTEE"); if(grantee!=null && grantee.equals("USER_MICHAEL")){       System.out.println("Schema---"+schema+" Table---"+tableName+"  Privilege----"+privilege+"  grantee---- "+grantee); } }

    That would be database dependent.
    Some engines have some system tables that together may be used to extract such information, others may not make it available at all outside closed APIs.

  • Any way to use a single application but point it to different schemas?

    From the searching I have done, it appears that when an end-user runs an application, it can only be associated with a pre-defined schema, which I guess I just need confirmation of. What I was hoping to be able to do was either dynamically change to a different schema at run-time, or create an end-user that is associated with a different schema than the one the application is associated to so the user could use the one application but access a given schema.
    The scenario is that in our production environment, we need to maintain a separate schema for each client we manage data for. But we'd like to maintain one application end users would use but could run against any one of the client schemas. However, it seems that we willneed to make a copy of the application within the production workspace for each client schema that would be the owner schema if I understand how this works. Thus, if we have 7 different schemas we would have to have 7 copies of the application, one associated with each application.
    Thanks in advance!
    Monte Malenke

    Thanks Scott for quick response.
    We will go with different workspace for each schema.
    Just to give you quick background of my requirement. We have a 3 oracle E-Business versions (11.5.8, 11.5.9 and R12 in future) and APEX installed on another 11g database. We don't want to installed APEX on EBS database because of DB patching issues, our EBS 11i database version is 9i DB, future oracle EBS supoort and at the same time we want to use APEX 3.1.2 with 11g. We want use APEX for custom EBS Web UI development.
    We are planning to create separate schema on APEX database for each EBS instance and DB link which points to EBS database. Under APEX schema we are planning to create a view (on our custom table which are same across all EBS instances) using DB link under each schema.
    We will develop APEX application under one of the workspace and they deploy to other workspaces. We have also looked into creating APEX pages based on pl/sql procedure and we can do dynamic sql to query data from EBS instances. But its lots of code (create pl/sql api for every table) and we can not take a advantages of some of the APEX build-in wizard like master-detail, APEX record locking etc
    Based on your APEX experience; Do you think this the way we should go? OR Is there any better way?.
    Thanks in advance
    RK

  • Can BPM maintain flow across different applications

    Hello,
    I have a requirement where I have to maintain the business flow across different applications(Siebel CRM, Oracle Financials and third party applications) with out the end user knowing.
    Is it possible with BPM to navigate users from one application to another application (CRM Application-> Third party Application -> Financials)? If there is a solution availabe with BPM or a different application please provide the same doc. Appreciate your help.
    Regards,
    Jay

    Hi,
    Yes. Oracle BPM can maintain a flow across multiple applications without the end user knowing. It is something it was built to do.
    First, applications like the ones you mentioned have an API (typically web service today but older applications exposed their API as Java POJOs, EJBs, COM, etc.). For Oracle BPM to access the applications, you need to expose the API in Oracle BPM's catalog. Customers that have a service bus expose the application APIs in the service bus and then Oracle BPM catalogs the service bus proxy services. Customers that do not have a service bus can expose the application APIs directly in Oracle BPM's catalog. Either way will work.
    Second, you'd design a process with a series of Interactive (human activities) and Automatic (activities that invoke the components that in turn invoke the APIs for your applications without human intervention). You'd add something called instance variables that carry the information throughout the life the process for each work item instance. Interactive activities are placed into roles with a name associated with them (e.g. CSR or Manager) so the work done in each activity is done by the right type of person. Interactive activities can be set up where the work item instance goes to a specific person instead of everyone in the role where the activity is located (e.g. send the instance to the CSR that talked to the customer last time).
    Third, at runtime as each work item instance is created (e.g. "Order 227") in the process the work item instance flows to one of the process's Interactive or Automatic activities. If it flows into an Interactive (human) activity, the end user assigned to the role where the activity is located clicks on an item in their web based Oracle BPM WorkSpace's inbox for the specific work item instance that they are interested in working on (again - perhaps "Order 227"). Once clicked by the end user, a UI presentation (either built using Oracle BPM's WYSIWYG presentation editor or a JSP) shows the work that needs to be done specifically by that end user. The UI presentation is already populated with the information gathered from a database or a previous API call from an Automatic activity. All this is done without end users having to cut out of one application and then paste into another application's screen - the right contextual information is sent to the right person at the right time. Once the end user finishes their manual task, the work might flow to an Automatic task that invokes another applicaiton's API automatically from the logic and variable information gathered in earlier activities in the process.
    All this is done without the end users knowing that they are flowing through multiple applications to get their work done.
    Hope this helps,
    Dan

  • HTML DB application using table in a different schema

    I need to create a new HTML DB application. The table is in a different schema than mine. The DBA granted me rights to see it and I can see it from iSQL. HTML DB does not give the alternative of selecting this table.

    This thread covers your issue.
    New to HTML DB, have questions about service admin and schemas
    Ask your DBA to add workspace to schema mapping.
    Sergio

  • Switch To Different Schema Connection With Existing Application

    Hi,
    Currently, i want to connect my existing application to a different schema, how should i do it?
    The situation is that i have two schema(call Database Connection in JDeveloper) that have exactly the same structure, as one is duplicated from anothe. My purpose of doing this is to use one of the schema for daily operation, while the other for testing.
    I have tried with this method:
    1. Right click on the Business Component project node and select Edit Business Component Project.
    2. In the Connection Tab, i change the Connection Name to the new schema(which used for testing).
    3. Then i open my .jsp page and sad to see the it's still retrieving data from the old schema.
    Am i hitting it with the wrong tactic? Please lemme know if there's any way that i can solve my problem.
    Thanks,
    Sin Leng

    Hi,
    The code snippet provided above must be executed whenever an ApplicationModule is first used by a new session but only after
    that ApplicationModule has been connected (otherwise the connection will not be available). Depending upon the type of client that
    you are developing (Swing vs. servlet for example) the right place to put this code could vary. Further, if your ApplicationModule
    and/or connection is pooled you must also be careful to reset this information whenever an ApplicationModule is serially reused
    by different clients.
    As of 9.0.3, the BC4J framework has provided a single hookpoint for all clients to manage session context on the middle tier. The
    method is oracle.jbo.server.ApplicationModuleImpl.prepareSession(Session). This method is invoked whenever a session
    (represented by a SessionCookie in the BC4J framework) uses an ApplicationModule which it had not referenced from a previous
    request. The Session parameter is the ApplicationModule session context which BC4J will automatically update with the
    userData context of the client side SessionCookie before prepareSession(Session) is invoked. This makes custom, client
    side context available to the midtier. Further this method is invoked after BC4J has connected the ApplicationModule, so it is a safe
    hookpoint for initializing custom DB session context as well as MT session context.
    In order for BC4J to make the client side SessionCookie userData context availabe in prepareSession
    the SessionCookie userData context must have been set before SessionCookie.useApplicationModule has been invoked. Please see
    the javadoc for SessionCookie.getUserData() and or the pooling sample ($JDEV_HOME/BC4J/samples/Pooling) for more information
    about acquiring a SessionCookie reference programmatically (so that you can initialize the SessionCookie userData). Other options
    may be to set up the userData in a custom SessionCookieFactory. Please see the pooling sample for a sample custom
    SessionCookieFactory implementation.
    Hope this helps.
    JR

  • Can anyone recommend a decent, totally free sound equalizer app or program to work across different applications on my Mac?

    Can anyone recommend a decent, totally free sound equalizer app or program to work across different applications on my Mac?
    I am running OS 10.9.2.
    Thanks!

    NeoOffice was a OS X adaptation of OpenOffice because there wasn't a OS X version when the "Mac" came back from the dead basically.
    Sun which owned OpenOffice, was bought by Oracle, which all the developers left finding out Oracle wasn't going to support OpenOffice anymore.
    The developers of OpenOffice went and formed LibreOffice, which got some serious cash donations and now is the new fork of OpenOffice.
    So if you have files in NeoOffice, OpenOffice or Microsoft Office, they will work just fine in LibreOffice.
    LibreOffice is getitng all the attention now that's it's truly "free" and many more developers worldwide are looking at the code and contributing to it.
    So LibreOffice is what you need. It's also cross platform, Linux, OS X or Windows. AND free. (but you should contribute funds)
    http://www.libreoffice.org/

  • Session expiration across different adf web applications

    Version of jdeveloper is 11.1.1.4.0. I have two adf jsf applications deployed in two different weblogic servers. Web application 1 navigates web application 2 in an external window or inline popup using a url view activity. I navigate from web application 1 to web application 2 without a problem. However when navigating back from web application 2 to web application 1 any action made in the ui of web app 1 throws an exception:
    javax.faces.application.ViewExpiredException: viewId:/main.jspx - ADF_FACES-30108:The view state of the page has expired because of inactivity. Reload the page.
    This problem does not occur when the 2 web applications are deployed in the same weblogic managed server. Is there any way to overcome this session inactivity issue.
    Thanks in advance

    you can set session timeout in
    web.xml
    weblogic.xml
    weblogic-aplication.xml

  • DOC BUG 4.2: About On Demand Application Processes

    There is an error in Oracle Application Express Application Builder User's Guide Release 4.2 §8.8.1 "About On Demand Application Processes":
    An On Demand process is special type of application process which has a Process Point of On Demand and executes when called from a page-level On Demand process or from an AJAX call from the browser. On Demand processes are useful when you have PL/SQL logic that you would like to run from different execution points across multiple pages.
    On Demand processes should typically be created on a page and not at the application-level. On Demand processes created at the application-level are created with an initial authorization scheme of Must Not Be Public User. This prohibits the processes being invoked from users in authenticated sessions.
    As it is perfectly possible (and indeed desirable) for On Demand application processes to be invoked [only] by authenticated users, this should presumably read:
    An On Demand process is special type of application process which has a Process Point of On Demand and executes when called from a page-level On Demand process or from an AJAX call from the browser. On Demand processes are useful when you have PL/SQL logic that you would like to run from different execution points across multiple pages.
    On Demand processes should typically be created on a page and not at the application-level. On Demand processes created at the application-level are created with an initial authorization scheme of Must Not Be Public User. This prohibits the processes being invoked from users in unauthenticated sessions.
    Furthermore, the second paragraph is a new addition to the documentation for APEX 4.2. What is the reasoning for not creating On Demand processes at application level? I have used them for a number of years as a means to provide reusable, application-wide components (for example, file downloads and AJAX content) only to authenticated APEX sessions.

    Hi,
    thanks again. I added a note to the 5.0 docs.
    It is certainly fine to still create application-level On Demand processes. However, if a process is related to a single page only, it is immediately clear that the process is part of this page's interface. This is good from a maintenance point of view, because if you only use app-level processes, it can be harder to determine whether the process is still in use and where it is called from.
    Regards,
    Christian

  • Accessing tables from different schema in CDS and AMDP

    Hi All,
    We are working on a HANA system which has several schema replicated from SAP R/3/Non SAP systems. We have BW 7.4 SP9 deployed on the same system and accessing the HANA views using latest BW virtual objects such as Open ODS , Composite providers etc.
    We are also using the BW system for few ABAP based data processing developments. We are currently accessing HANA views in ABAP programs by creating dictionary views based on external HANA views.
    We would like to however use recent possibilities of CDS and AMDP for better life cycle management of ABAP based solutions. The open SAP course on this subject was of very good help. Thanks a lot "open SAP team" for that. I would however have few open questions,
    As I understand AMDP gives us full flexibility of writing sql procedures within ABAP development environment, but can we access tables from different schema into AMDP code. If yes, then sample code would help.
    If the answer of first question is yes, then how do we manage transports between development and production systems where the schema names would be different. Currently in open HANA developments, such transport is manged using Schema mapping.
    Can I also use different schema tables in CDS views.
    We are updating few tables in ABAP dictionary after applying processing logic in ABAP program as detailed in step 1. With the new approach using AMDP, can we directly update database schema tables which will give us an optimization advantage.
    New ABAP HANA program interfaces are quite promising and we would like to use them to optimize many data intensive applications.
    Thanks & Regards,
    Anil

    Hi Anil,
    I can only answer 1. and 2. (and would be interested into 3. as well):
    1.
    Yes you can access tables from a different schema and also HANA views. In this case no 'using' is needed.
    Examples:
        RESULT = SELECT
        FROM
              "SAP_ECC"."T441V" AS t,
              "_SYS_BIC"."tmp.package/AFPO" AS a.
        WHERE ...
    2. In this case, if you need schema mapping: You could use HANA (projection) views which just forward to a different schema, also see example.
    Best regards,
    Christoph

  • Moving Subpartitions to a duplicate table in a different schema.

    +NOTE: I asked this question on the PL/SQL and SQL forum, but have moved it here as I think it's more appropriate to this forum. I've placed a pointer to this post on the original post.+
    Hello Ladies and Gentlemen.
    We're currently involved in an exercise at my workplace where we are in the process of attempting to logically organise our data by global region. For information, our production database is currently at version 10.2.0.3 and will shortly be upgraded to 10.2.0.5.
    At the moment, all our data 'lives' in the same schema. We are in the process of producing a proof of concept to migrate this data to identically structured (and named) tables in separate database schemas; each schema to represent a global region.
    In our current schema, our data is range-partitioned on date, and then list-partitioned on a column named OFFICE. I want to move the OFFICE subpartitions from one schema into an identically named and structured table in a new schema. The tablespace will remain the same for both identically-named tables across both schemas.
    Do any of you have an opinion on the best way to do this? Ideally in the new schema, I'd like to create each new table as an empty table with the appropriate range and list partitions defined. I have been doing some testing in our development environment with the EXCHANGE PARTITION statement, but this requires the destination table to be non-partitioned.
    I just wondered if, for partition migration across schemas with the table name and tablespace remaining constant, there is an official "best practice" method of accomplishing such a subpartition move neatly, quickly and elegantly?
    Any helpful replies welcome.
    Cheers.
    James

    You CAN exchange a subpartition into another table using a "temporary" (staging) table as an intermediary.
    See :
    SQL> drop table part_subpart purge;
    Table dropped.
    SQL> drop table NEW_part_subpart purge;
    Table dropped.
    SQL> drop table STG_part_subpart purge;
    Table dropped.
    SQL>
    SQL> create table part_subpart(col_1  number not null, col_2 varchar2(30))
      2  partition by range (col_1) subpartition by list (col_2)
      3  (
      4  partition p_1 values less than (10) (subpartition p_1_s_1 values ('A'), subpartition p_1_s_2 values ('B'), subpartition p_1_s_3 values ('C'))
      5  ,
      6  partition p_2 values less than (20) (subpartition p_2_s_1 values ('A'), subpartition p_2_s_2 values ('B'), subpartition p_2_s_3 values ('C'))
      7  )
      8  /
    Table created.
    SQL>
    SQL> create index part_subpart_ndx on part_subpart(col_1) local;
    Index created.
    SQL>
    SQL>
    SQL> insert into part_subpart values (1,'A');
    1 row created.
    SQL> insert into part_subpart values (2,'A');
    1 row created.
    SQL> insert into part_subpart values (2,'B');
    1 row created.
    SQL> insert into part_subpart values (2,'B');
    1 row created.
    SQL> insert into part_subpart values (2,'C');
    1 row created.
    SQL> insert into part_subpart values (11,'A');
    1 row created.
    SQL> insert into part_subpart values (11,'C');
    1 row created.
    SQL>
    SQL> commit;
    Commit complete.
    SQL>
    SQL> create table NEW_part_subpart(col_1  number not null, col_2 varchar2(30))
      2  partition by range (col_1) subpartition by list (col_2)
      3  (
      4  partition n_p_1 values less than (10) (subpartition n_p_1_s_1 values ('A'), subpartition n_p_1_s_2 values ('B'), subpartition n_p_1_s_3 values ('C'))
      5  ,
      6  partition n_p_2 values less than (20) (subpartition n_p_2_s_1 values ('A'), subpartition n_p_2_s_2 values ('B'), subpartition n_p_2_s_3 values ('C'))
      7  )
      8  /
    Table created.
    SQL>
    SQL> create table STG_part_subpart(col_1  number not null, col_2 varchar2(30))
      2  /
    Table created.
    SQL>
    SQL> -- ensure that the Staging table is empty
    SQL> truncate table STG_part_subpart;
    Table truncated.
    SQL> -- exchanging a subpart out of part_subpart
    SQL> alter table part_subpart exchange subpartition
      2  p_2_s_1 with table STG_part_subpart;
    Table altered.
    SQL> -- exchanging the subpart into NEW_part_subpart
    SQL> alter table NEW_part_subpart exchange subpartition
      2  n_p_2_s_1 with table STG_part_subpart;
    Table altered.
    SQL>
    SQL>
    SQL> select * from NEW_part_subpart subpartition (n_p_2_s_1);
         COL_1 COL_2
            11 A
    SQL>
    SQL> select * from part_subpart subpartition (p_2_s_1);
    no rows selected
    SQL>I have exchanged subpartition p_2_s_1 out of the table part_subpart into the table NEW_part_subpart -- even with a different name for the subpartition (n_p_2_s_1) if so desired.
    NOTE : Since your source and target tables are in different schemas, you will have to move (or copy) the staging table STG_part_subpart from the first schema to the second schema after the first "exchange subpartition" is done. You will have to do this for every subpartition to be exchanged.
    Hemant K Chitale
    Edited by: Hemant K Chitale on Apr 4, 2011 10:19 AM
    Added clarification for cross-schema exchange.

  • 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;
    /

  • Automatic ROW Processing error after changing Schema

    Hello all,
    I have an APEX 3.0 application referencing tables on a different schema from the parsing schema.
    Workspace A -> using parsing schema A1
    Application A -> installed in Workspace A
    Application A -> access tables in schema A2 from schema A1, through synonyms
    All is working fine.
    Then I had to duplicate the application (let me say: to have a test environment).
    So, I created a Workspace B, a parsing schema B1, I've installed application A as application B in workspace B, and I've created schema B2 and I gave the grants to schema B1.
    Application B is running fine when trying to access objects on the parsing schema B1, but it returns a lot of errors when accessing objects on schema B2, in particular on Automatic Row Processing and Automated Row Fetch processes. The error I'm getting vary from ORA-942 (table or view doesn't exist) to ORA-936 (missing expression).
    A strange thing is that in Automatic Row Processing and Automated Row Fetch processes, I can choose only schema A1 as Table Owner, and all is working fine.
    In application B, I can select as Table Owner also the schema B2, even if it's not associated to the workspace. By doing this something works better. But I don't want to modify every page in the application where this happens. Also because I want the opportunity to maintain only one application.
    I think that the application installed in workspace B, still tries to access objects in schema A2, but I don't know why.
    Do you have any suggestion?
    Thanks.
    Andrea

    It returns these results:
    WORKSPACE     APPLICATION_ID     APPLICATION_NAME     PAGE_ID     PROCESS_SOURCE
    WS_DEMO     107     myappname     73160     F|&FETCH_SCHEMA.:CDW_LST_GRP:P73160_LTG_ID:LTG_ID
    WS_DEMO     107     myappname     73160     &FETCH_SCHEMA.:CDW_LST_GRP:P73160_LTG_ID:LTG_ID|IUD
    The query returns the same results in PROCESS_SOURCE columns, when ran from workspace A or B.
    I've found that FETCH_SCHEMA is an "application definition", and I've setup correctly in workspace B. The problem persists.
    Bye,
    Andrea

  • What is the best practice for connecting to different schemas?

    Hi all,
    We are porting an application from SQL Server to oracle and would like to know what the best practices are in oracle for user connections to an Oracle instance.
    More or less the question could be put like this:
    1) The equivalent of a SQL Server Database in Oracle is a Schema. (more or less)
    2) A specific application has it's own schema where it keeps all related objects (Tables, etc)
    3) In SQL Server you grant access to the Database and its objects (Tables, etc) to all users of the application.
    4) In Oracle do you grant access to the Schema and its objects (Tables, etc) to all users of the application also? Or do all users log
    in as the schema owner?
    So in Oracle if there existed [SchemaApplication].[table1], how would [userChris] and [userDave] query [SchemaApplication].[table1]?
    Would Chris and Dave log in as [userChris] and [userDave], or would they normally log in as [userApplication]?
    finally, is it good practice to log in as a unique user eg [userChris] and then issue the
    alter session set current_schema = shemaApplication;
    command to change the way references to tables are interpreted?

    We are porting an application from SQL Server to oracle and would like to know what the best practices are in oracle for user connections to an Oracle instance.
    More or less the question could be put like this:
    1) The equivalent of a SQL Server Database in Oracle is a Schema. (more or less)
    2) A specific application has it's own schema where it keeps all related objects (Tables, etc)
    3) In SQL Server you grant access to the Database and its objects (Tables, etc) to all users of the application.
    4) In Oracle do you grant access to the Schema and its objects (Tables, etc) to all users of the application also? Or do all users log
    in as the schema owner?There are ways to implement the same.
    Case 1.
    Create different roles, such as APP_ROLE, READONLY_ROLE. Create public synonym for objects in SchemaApplication user. Grant these role to single user say appUser this is different from you SchemaApplication user. Use appUser to connect to application and for different user like userChris, userDave provide another layer of security. Say userDave is allowed only to deal with cash related transaction, so allow him to open only those screens which are related to cash transaction only.
    Case 2.
    Create public synonym and grant privilege on tables from SchemaApplication to different users (say userChris, userDave).
    So in Oracle if there existed [SchemaApplication].[table1], how would [userChris] and [userDave] query [SchemaApplication].[table1]?This is resolved by public synonym. There are private synonym as well, you can create this also but in this case you have to create private synonym for each of the users.
    Would Chris and Dave log in as [userChris] and [userDave], or would they normally log in as [userApplication]? I would suggest you to connect either using a new user(Case 1) or the user itself has account in the database(Case2).
    finally, is it good practice to log in as a unique user eg [userChris] and then issue the
    alter session set current_schema = shemaApplication;
    No. It is not a good practice to allow the user to login to database using the application owner.
    command to change the way references to tables are interpreted?The public/private synonym can be used to resolve the schema.object value. For example, if SchemaApplication has table T, then you can create public synonym as 'CREATE PUBLIC SYNONYM T FOR SchemaApplication.T'; and now you can refer this table as T from any other schema(user).
    HTH
    Virendra

Maybe you are looking for

  • Installing InDesign CC 6

    I am on day two of trying to get InDesign CC 6 to finish install. I am using a MacBook Pros OS 10 10.7.5, with Chrome.  I try and re-try at least every 15 minutes - always the same result.  The install quits at 42%.  I have run cleaner, installed and

  • Non-static referencing a static..?????

    Hey guys, trying to test my new code and am getting this error. non static method getData() cannot be referenced drom a static context. The code is: public void getData() throws IOException { public static void main(String[] args) throws IOException

  • JTable setShowGrid Not Working Properly

    Hi, I have a JTable where I am attempting to use the setShowGrid method to hide the grid, but it does not seem to be working. I have created my own table renderer as follows, where the variable "cblue" is a Color object with RGB values reflecting Cor

  • Need to upgrade BI patch update..

    Dear friends, last week we have successfully upgraded our CRM patch upgradation from 5 to 7.0 now as a BI consultant i need to suggest whether we have to upgrade the BI patch upgradation? right now BI version is 7.0.1 need to updgrade latest patch ,

  • Need a query for access tables

    Hi I need a query , help please: table1: id              description                  serial                     1                des1                           ser1 2                des2                           ser2 3                des3