Schema name in DB Adapter

Hi,
Schema name is hardcoded in the DB adpater even if I am not selecting the schema name while creation.
<jca:operation
SchemaName="APPS"
PackageName="XX_PKG"
ProcedureName="POPULATE_DATA"
InteractionSpec="oracle.tip.adapter.db.DBStoredProcedureInteractionSpec" >
How do I make it generic? Can I remove SchemaName parameter?
My JNDI Url may change dynamically and the target database may have different schemas.
Thanks,
Rishi

The adapter uses the schema name to qualify the stored procedure invocation (e.g. "APPS.XX_PKG.POPULATE_DATA"). Having the schema name means that you can invoke a stored procedure in a schema other than the one associated with your connection. If you remove the schema name then the qualified execution will be "XX_PKG.POPULATE_DATA" and the schema will be your connection schema. So be careful about removing the schema name because the stored procedure qualified by package name alone may not be enough to resolve it for execution. In other words, the package containing your stored procedure may not exist in the schema associated with your connection.

Similar Messages

  • Any Function module or BAPIs are available to get scheme name for the inter

    I have internal order no value in table  AUFK-AUFNR ,  and the internal order corresponding Scheme value is available in IMPR-PRNAM . Now I want to inner join both the tables to extract the data , but there is no common field . Is there any Function module or BAPIs are available to get scheme name for the internal orders?

    look at DB-VIEW  "V_IVP_OR".
    Regards,
    Laurent

  • How to configure the schema name dynamically based on user input.

    configure the schema name dynamically based on user input.
    For ex:
    We have two schemas:
    Schema1  - base schema having 15 tables.
    Schema2 -  tables which is specific to modules. Having only 10 tables which is also available in Schema1
    Login to application using Schema 1
    Access a particlular module and select the country. Here country selection is identified.
    Based on the country selection, we need to connect the schema respectively.
    If the user selects France --> It should connect Schema1
    If the user selects Germeny --> It should connect schema2.
    Used: Eclipselink

    You may want to have a different persistence unit for each country, then you just need to switch persistence units, and can put the schema in your orm.xml file.
    You may also want to investigate EclipseLink multi-tenant support,
    http://www.eclipse.org/eclipselink/documentation/2.5/jpa/extensions/a_multitenant.htm
    You can the schema in a persistence unit in code using a SessionCustomizer and the tableQualifier.

  • How to get the current schema name

    Hi,
    Can anybody please tell me how to get the current schema name, there is some inbuilt function for this,but i am not getting that. Please help me.
    Thanks
    Jogesh

    ok folks, I found the answer at Tom's as usual.
    http://asktom.oracle.com/tkyte/who_called_me/index.html
    I rewrote it into a function for kicks. just pass the results of DBMS_UTILITY.FORMAT_CALL_STACK to this function and you will get back the owner of the code making the call as well some extra goodies like the name of the code and the type of code depending on the parameter. This ignores the AUTHID CURRENT_USER issues which muddles the schemaid. Quick question, does the average user always have access to DBMS_UTILITY.FORMAT_CALL_STACK or does this get locked down on some systems?
    cheers,
    paul
    create or replace
    FUNCTION SELF_EXAM (
       p_call_stack VARCHAR2,
       p_type VARCHAR2 DEFAULT 'SCHEMA'
    ) RETURN VARCHAR2
    AS
       str_stack   VARCHAR2(4000);
       int_n       PLS_INTEGER;
       str_line    VARCHAR2(255);
       found_stack BOOLEAN DEFAULT FALSE;
       int_cnt     PLS_INTEGER := 0;
       str_caller  VARCHAR2(30);
       str_name    VARCHAR2(30);
       str_owner   VARCHAR2(30);
       str_type    VARCHAR2(30);
    BEGIN
       str_stack := p_call_stack;
       -- Loop through each line of the call stack
       LOOP
         int_n := INSTR( str_stack, chr(10) );
         EXIT WHEN int_cnt = 3 OR int_n IS NULL OR int_n = 0;
         -- get the line
         str_line := SUBSTR( str_stack, 1, int_n - 1 );
         -- remove the line from the stack str
         str_stack := substr( str_stack, int_n + 1 );
         IF NOT found_stack
         THEN
            IF str_line like '%handle%number%name%'
            THEN
               found_stack := TRUE;
            END IF;
         ELSE
            int_cnt := int_cnt + 1;
             -- cnt = 1 is ME
             -- cnt = 2 is MY Caller
             -- cnt = 3 is Their Caller
             IF int_cnt = 1
             THEN
                str_line := SUBSTR( str_line, 22 );
                dbms_output.put_line('->' || str_line);
                IF str_line LIKE 'pr%'
                THEN
                   int_n := LENGTH('procedure ');
                ELSIF str_line LIKE 'fun%'
                THEN
                   int_n := LENGTH('function ');
                ELSIF str_line LIKE 'package body%'
                THEN
                   int_n := LENGTH('package body ');
                ELSIF str_line LIKE 'pack%'
                THEN
                   int_n := LENGTH('package ');
                ELSIF str_line LIKE 'anonymous%'
                THEN
                   int_n := LENGTH('anonymous block ');
                ELSE
                   int_n := null;
                END IF;
                IF int_n IS NOT NULL
                THEN
                   str_type := LTRIM(RTRIM(UPPER(SUBSTR( str_line, 1, int_n - 1 ))));
                 ELSE
                   str_type := 'TRIGGER';
                 END IF;
                 str_line  := SUBSTR( str_line, NVL(int_n,1) );
                 int_n     := INSTR( str_line, '.' );
                 str_owner := LTRIM(RTRIM(SUBSTR( str_line, 1, int_n - 1 )));
                 str_name  := LTRIM(RTRIM(SUBSTR( str_line, int_n + 1 )));
              END IF;
           END IF;
       END LOOP;
       IF UPPER(p_type) = 'NAME'
       THEN
          RETURN str_name;
       ELSIF UPPER(p_type) = 'SCHEMA.NAME'
       OR    UPPER(p_type) = 'OWNER.NAME'
       THEN
          RETURN str_owner || '.' || str_name;
       ELSIF UPPER(p_type) = 'TYPE'
       THEN
          RETURN str_type;
       ELSE
          RETURN str_owner;
       END IF;
    END SELF_EXAM;

  • Dynamic File name in File Adapter

    Hi,
    I have a requirement to pass dynamic file name in File Adapter.
    Is there any way to pass a variable for the file name attribut in file adapter.
    I am looking for some options apart from %yyMMddHHmmss%,%SEQ%...etc
    Please suggest if any of you have information on how to put values from a variable to file name attribute in file adapter
    regards
    Saiju

    Hi Saiju,
    Yes there is.
    Assign your file name to a variable, let's say 'fileName'.
    Now go to your invoke activity(for the specific fileadapter) -> Property tab-> find a property call jca.file.FileName -> in the value field assign 'fileName' variable.
    That's it... (assuming you are using 11g)
    Arik
    Edited by: Arik on Jun 27, 2012 3:12 PM

  • Dynamic Receiver file name in AS2 adapter

    Hi Experts,
    How to get dynamic receiver file name in AS2 adapter. We need receiver file name same as of sender file name.
    We tried selecting dynamic attributes file name but we are getting followin error in CC.
    Message processing failed. Cause: javax.resource.ResourceException: Fatal exception: com.seeburger.xi.connector.queue.TaskBuildException: Mandatory attribute dtAS2FileName is not present in XI message., Mandatory attribute dtAS2FileName is not present in XI message.
    Thanks,
    Hari

    hi hari,
    You can't do it manually. As both adapter are in different context.
    You can go with UDF to slove ur problem.
    Just extract the input file name using Dynamic configuration
    Store that in some variable.
    Use same name in the dynamic file name in AS2 receiver. Below code might be useful.
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://seeburger.com/xi/common/dtAS2FileName", "DYNFILENAME");
    conf.put(key,strfilename);
    Thanks
    Jai
    Edited by: Jaideep Baid on Apr 9, 2010 9:16 AM

  • Schema name not present on filename for "Save Package Spec and Body"

    In versions previous to 3.0 EA, the filename defaulted to schema.object.sql when using the "Save Package Spec and Body" on the right click of the package/body. This appears to have disappeared. Also, it now defaults to the .PLS ext/type, which I prefer to save them as .SQL (which i can override, but it would be nice in the file type dropdown). Also, I had posted a suggestion about the actual file not including the schema name prefixing the object name when using the "Save Package Spec and Body". i.e. it does create or replace package reader_package instead of what it should be doing which is create or replace package schema.reader_package

    Would be nice indeed having the real name as default, and all supported PL/SQL types (as in the preferences) in the extensions dropdown.
    As for the schema name inside, I reckon that would do damage for more users than it would do good for others. But a preference would be best of course.
    K.

  • Using dbms_datapump package to export the schema with the schema name as pa

    Hi,
    I am using the pl/sql block to export schema using dbms_datapump package,Now I want to pass the scheme name as the parameter to the procedure and get the .dmp and .log files with the schema name included.
    CREATE OR REPLACE PROCEDURE export
    IS
    h1 number;
    begin
    h1 := dbms_datapump.open (operation => 'EXPORT', job_mode => 'SCHEMA', job_name => 'export1', version => 'COMPATIBLE');
    dbms_datapump.set_parallel(handle => h1, degree => 1);
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT.LOG', directory => 'DATA_PUMP_DIR', filetype => 3);
    dbms_datapump.set_parameter(handle => h1, name => 'KEEP_MASTER', value => 0);
    dbms_datapump.metadata_filter(handle => h1, name => 'SCHEMA_EXPR', value => 'IN(''CHECKOUT'')');
    dbms_datapump.set_parameter(handle => h1, name => 'ESTIMATE', value => 'BLOCKS');
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT%U' || to_char(sysdate,'dd-mm-yyyy') || '.DMP', directory => 'DATA_PUMP_DIR', filetype => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'INCLUDE_METADATA', value => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'DATA_ACCESS_METHOD', value => 'AUTOMATIC');
    dbms_datapump.start_job(handle => h1, skip_current => 0, abort_step => 0);
    dbms_datapump.detach (handle => h1);
    exception
    when others then
    raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    end;
    Thank you in advanced
    Sri

    user12062360 wrote:
    Hi,
    I am using the pl/sql block to export schema using dbms_datapump package,Now I want to pass the scheme name as the parameter to the procedure and get the .dmp and .log files with the schema name included.
    OK, please proceed to do so
    >
    CREATE OR REPLACE PROCEDURE export
    IS
    h1 number;
    begin
    h1 := dbms_datapump.open (operation => 'EXPORT', job_mode => 'SCHEMA', job_name => 'export1', version => 'COMPATIBLE');
    dbms_datapump.set_parallel(handle => h1, degree => 1);
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT.LOG', directory => 'DATA_PUMP_DIR', filetype => 3);
    dbms_datapump.set_parameter(handle => h1, name => 'KEEP_MASTER', value => 0);
    dbms_datapump.metadata_filter(handle => h1, name => 'SCHEMA_EXPR', value => 'IN(''CHECKOUT'')');
    dbms_datapump.set_parameter(handle => h1, name => 'ESTIMATE', value => 'BLOCKS');
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT%U' || to_char(sysdate,'dd-mm-yyyy') || '.DMP', directory => 'DATA_PUMP_DIR', filetype => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'INCLUDE_METADATA', value => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'DATA_ACCESS_METHOD', value => 'AUTOMATIC');
    dbms_datapump.start_job(handle => h1, skip_current => 0, abort_step => 0);
    dbms_datapump.detach (handle => h1);
    exception
    when others then
    raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    end;
    EXCEPTION handler is a bug waiting to happen.
    eliminate it entirely

  • Retrieving the file name in the adapter module in the sender file adapter

    hi,
    i need to retrieve the file name, in the adapter module. This module is placed in the sender file channel.
    After the file adapter has picked up the file from the file directory, the file is placed in the archived directory.Custom adapter mofule is place in the file shanel. i need to retrieve the file name of the file in the adapter module. Is it possible to retrieve the file name?
    Also is it possible to retrieve the archive directory path in module?
    Regards,
    Meenkashi

    Hi Meenakshi,
    I guess you are looking for this
    /people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
    Regards
    Suraj

  • Function not found when package name exists with same name as schema name

    Hi all, any help would be appreciated :)
    I found an issue with pl/sql resolving a functions location when the db has a package name with the same as the db schema name.
    My example:
    -- arbitrary test function, not in any package
    create or replace FUNCTION testFunc
         inTest     IN VARCHAR2
    RETURN VARCHAR2
    AS
    BEGIN
    RETURN 'a';
    END;
    -- There is a package called "FM" with functions that are not referenced or used in this example and the db schema is "FM".
    -- The following PL/SQL fails with the message: "ORA-00904: "FM"."TESTFUNC": invalid identifier"
    select cursor (select testFunc('a') from dual) from dual;
    -- The following PL/SQL works:
    select * from (select testFunc('a') from dual);
    As mentioned the function testFunc is NOT in the FM package. This issue does not happen when I remove the FM package. So it seems like there is an issue with cursors calling functions when there exists any package with the same name as the db schema.
    Can anyone tell me why this happens and also what I can add to force the function that is not in any package to be referenced (without Oracle trying to look in the FM package)?
    DB: Oracle 11.2.0.2
    thanks!
    Paul

    Hi Paul,
    In general I would not advice to have schema and objects with the same name.
    Here is what documentation is saying here: How Name Resolution Differs in PL/SQL and SQL
    PL/SQL uses the same name-resolution rules as SQL when the PL/SQL compiler processes a SQL statement, such as a DML statement. For example, for a name such as HR.JOBS, SQL matches objects in the HR schema first, then packages, types, tables, and views in the current schema.
    PL/SQL uses a different order to resolve names in PL/SQL statements such as assignments and subprogram calls. In the case of a name HR.JOBS, PL/SQL searches first for packages, types, tables, and views named HR in the current schema, then for objects in the HR schema.As you can see above when using PL/SQL for your case Oracle searches first for packages, types, tables, and views named FM in the current schema, then for objects in the FM schema.
    And because a package FM is found it is raising an error due to the fact that the procedure could not be found in that package.
    I hope this clarify.
    Regards.
    Al

  • How to parameterize the schema name in APEX

    Hi,
    How to parameterize the schema name in APEX , in order to access different tables from the respective schema.
    For example:-
    select NAME display_value, CODE return_value
    from paramSchema.DESC_LIST WHERE SELECTION_FLG = 'Y'
    order by 1
    in the above code, paramSchema will be replaced with the actual schema name duing runtime. I tried doing so by some hidden fields on page, but it didn't worked out.
    I took the schema name from the respective server as per the IPof the server.
    stored in a hidden field named as schema.
    And replaced the same in place of schema name. But no luck.
    select NAME display_value, CODE return_value
    from :schema.DESC_LIST WHERE SELECTION_FLG = 'Y'
    order by 1
    Please help me in shorting it out.
    Thanks,
    Anuradha

    Hi
    In order to do that, you would need to use dynamic SQL by changing the report type to PL/SQL Function Body Returning SQL Query and have code along the lines of
    DECLARE
    l_sql VARCHAR2(32767);
    BEGIN
    l_sql := 'select NAME display_value, CODE return_value
    from '||:schema||'.DESC_LIST WHERE SELECTION_FLG = 'Y'
    order by 1';
    RETURN l_sql;
    END;However, by doing this, you lose alot of flexibility. The other options would be...
    To have seperate report regions that are conditional on the value of the variable.
    To use a WITH clause at the tope of the query like...
    WITH src_data AS
    (SELECT * FROM schema1.my_table
    WHERE :schema = 'schema1'
    UNION ALL
    SELECT * FROM schema2.my_table
    WHERE :schema = 'schema2')
    SELECT *
    FROM src_dataOther than that you could look at using synonyms and doing something similar.
    Hope this helps.
    Cheers
    Ben

  • Help on Dynamic queue name in JMS Adapter

    Hi Experts,
      Could you please explain how to configure dynamic queue name in JMS Adapter.
    My requirement is i would have to add the date and time to JMS Queue Name in receiver JMS Adapter.
    Thanks in Advance
    Chilla

    hi,
    as it's not in Adapter-Specific Message Properties
    http://help.sap.com/saphelp_nw04/helpdata/en/10/b1b4c8575a6e47954ad63438d303e4/content.htm
    looks like you cannot do it with jms adapter in standard
    use proxy or your own adapter instead
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Need to include table name,schema name in select output

    I need to output the table name and schema name of the current user into a table.. I have tried including
    within a select statement..
    table_name,
    from user_tables
    where table_name='mnme';
    no rows returned

    Hi,
    Its in upper case 'MNME'
    Best.
    EA

  • To get rid of Schema name in output using DBMS_METADATA

    Hi all,
    Would someone be able to tell me how to get rid of the schema name output given by the below select stmt.
    Query
    Select Dbms_metadata.Get_ddl('FUNCTION','ACCOUNT_CODE')
    from dual;
    Result
    CREATE OR REPLACE FUNCTION "GOINGLIVE"."ACCOUNT_CODE" (PTransCode VarChar2,.............
    I checked for the documentation, but could manage to eliminate only storage clauses, tablespace etc. but not teh schema name.
    Please provide your advise on this.
    Thanks
    - Sandeep

    Which version are you on?
    In 10g, you can use DBMS_METADATA.SET_REMAP_PARAM to get rid of schema name:
    SQL> create table md_test(x int, y varchar2(10));
    Table created.
    SQL> declare
      2    l_ctx number;
      3    l_ctxt number;
      4    l_ddl sys.ku$_ddls;
      5  begin
      6    l_ctx := dbms_metadata.open('TABLE');
      7    dbms_metadata.set_filter(l_ctx, 'NAME', 'MD_TEST');
      8    l_ctxt := dbms_metadata.add_transform(l_ctx, 'MODIFY');
      9    dbms_metadata.set_remap_param(l_ctxt, 'REMAP_SCHEMA', user, null);
    10    l_ctxt := dbms_metadata.add_transform(l_ctx, 'DDL');
    11    dbms_metadata.set_transform_param(l_ctxt, 'SEGMENT_ATTRIBUTES', false);
    12    l_ddl := dbms_metadata.fetch_ddl(l_ctx);
    13    dbms_output.put_line(l_ddl(1).ddltext);
    14    dbms_metadata.close(l_ctx);
    15  end;
    16  /
    CREATE TABLE "MD_TEST"
       (    "X" NUMBER(*,0),
            "Y" VARCHAR2(10)
    PL/SQL procedure successfully completed.In 9i, you have to resort to some manual tricks (with REPLACE, probably):
    SQL> create table md_test(x int, y varchar2(10));
    Table created.
    SQL> declare
      2    l_ctx number;
      3    l_ctxt number;
      4    l_ddl sys.ku$_ddls;
      5  begin
      6    l_ctx := dbms_metadata.open('TABLE');
      7    dbms_metadata.set_filter(l_ctx, 'NAME', 'MD_TEST');
      8    l_ctxt := dbms_metadata.add_transform(l_ctx, 'DDL');
      9    dbms_metadata.set_transform_param(l_ctxt, 'SEGMENT_ATTRIBUTES', false);
    10    l_ddl := dbms_metadata.fetch_ddl(l_ctx);
    11    dbms_output.put_line(
    12      replace(l_ddl(1).ddltext, '"' || user || '".'));
    13    dbms_metadata.close(l_ctx);
    14  end;
    15  /
    CREATE TABLE "MD_TEST"
       (    "X" NUMBER(*,0),
            "Y" VARCHAR2(10)
    PL/SQL procedure successfully completed.
    SQL> select * from v$version where rownum = 1;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - ProductionHope this helps,
    Andrew.

  • What is table schema name?

    Hi,
    I was looking at DatabaseMetaData::getColumns() while searching for a way to get a table's column names and I run into these ugly params catalog and schemaPattern. Of course nowhere on the sun's site could I find a definition of these terms although they're used quite often in the API documentation. So I turned to a specific DBMS provider and found out that catalog is a fancy term for the system metadata. But what about the String schema param? I usually see a table's schema referred to as the "structure" of the table, what columns it contains of which types. But I've never known this "schema" can have a string name. Anyone so kind to explain it to me or better point me to a text that has definitions and explanations of the concepts used in the JDBC API documentation? And more generally for JDK where do you folks usually go when you want a simple explanation of how things work, not the dry listing of function and parameter names? Look at MSDN for example, it is both a good reference and a reasonable self-contained tutorial. Not that I praise Microsoft but...
    BTW I found that probably ResultSetMetaData is more suitable for my initial purposes, but still the questions bother me. So if you have any suggestion please let me know.
    Thank you in advance

    To answer your question, what is a table schema name?, it is the name of the schema that the table belongs to. If you have an Oracle database, MYDB, it will have at the very least two users which are SYS and SYSTEM, these are schema names, there are objects that exists in their schema. If you create a new user, JAKE, and then create a bunch of objects as JAKE, these objects are said to belong to the JAKE schema. All objects are like this, not just tables (indexes, sequence tables, triggers, etc.).

Maybe you are looking for

  • How do I simply get a photo off my iPhone 5 to my PC?

    Jeez, you might think this would be intuitive or straight forward but I can find no way to take a photo from my iPhone 5 and transfer it to my Dell PC.  Do I need a sticking App for that simple, simple task or am I just an idiot?  Trying to make a Ch

  • How to use checkbox using InputSelectGroup in JSP

    Hai please help me how to get a check box in a form so that multple values are returned to multiple colum in databse using InputSelectGroup and multple values to a single column

  • IPsec VPN IOS - ASA

    Hi, I'm in the process of migrating some old IOS IPsec VPN configurations from IOS to ASA. What immediately becomes a problem is that there is no way to virtualize the routing tables on a single ASA. The original IOS setups uses separate VRF:s for ea

  • How to recover deleted content file in webcenter content 11g

    How to recover deleted folder and contents containing (.doc,.pdf etc), FrameworkFolders component used.

  • Master password not a directory

    Hello, when computers start's up a message appears on screen /etc/master password:not a directory /etc/master password:not a directory -sh:/etc/profile:not a directory -sh-2.05b any suggestions as to this message?