How to use type, packages, functions, and procedures in another schema ?

I have two target schema in one OWB project, such as A and B. In a mapping of A, I would like to use some types, packages, functions, and procedures from B. I have tried the method of synonym as suggested, but I could not find the metadata of these when importing ... The only type of synonym I can import is the synonym for table. Is there a bug for synonym?
If I cannot use synonym for this issue, is there another way to solve the problem?

Now, in some instances you will absolutely need to create the second module as Carsten describes, however it should also be noted that you can reference objects in things like Expressions even if you have not loaded up the metadata. It is only when you need strong binding that it becomes neccessary to import objects. For everything else, as long as the reference will resolve at compile-time then you are good to go.
For example, I have a function in one target schema (S1) and a private synonym to it in another(s2). A mapping in the S2 schema has an expression object that uses the synonym to the function in the expression property for a couple of the output attirbutes. The synonym has not been loaded into metadata - indeed OWB has no knowledge of its existance. But it resolves at compile time so the mapping validates and generates successfully.
Mike

Similar Messages

  • I don't know how to use the canlendars function and the notes are kind of messy code,anyone help me

    i don't know how to use the canlendars function and the notes are kind of messy code,anyone help me

    Step by step:
    1. On your main vi Front Panel, create your boolean indicator.
    2. On the block diagram, right click the new boolean indicator and select Create - Reference.
    3. On sub-vi front panel, create boolean indicator (or use one that is already created).
    4. On sub-vi front panel, create a reference (Controls Palette - Refnum - Control Refnum).
    5. Right click on the newly created Refnum and select Select Vi Server Class - Generic - GObject - Control - Boolean. The refnum label changes to BoolRefnum.
    6. On sub-vi block diagram, create Property Node (Functions - Application Control - Property Node). Find the BoolRefnum and move it close to the new Property Node.
    7. Wire the BoolRefnum to the reference input of the property node.
    8.
    Right click on the property node and select Change to All Write.
    9. Move mouse to point to Visible inside property node box, left click and select Value.
    10. Wire the boolean indicator from step 3 to the Value input of the property node.
    11. On sub-vi front panel, right click on icon and select Show Connector.
    12. Click on empty connector spot then click on the new BoolRefnum. Save your sub-vi.
    13. On main vi block diagram, connect refernece created in step 2 to the new connector terminal of sub-vi.
    14. Save and run.
    Here are the modified vi's.
    - tbob
    Inventor of the WORM Global
    Attachments:
    Pass_a_Reference.vi ‏20 KB
    GL_Flicker_mod.vi ‏83 KB

  • How to call package function and procedure by PL/SQL

    Dear all,
    I created a package and I want test it by a select statement. e.g. select packagename.function(1, 'A') . However, there is an error message. "ORA-14551: cannot perform a DML operation inside a query ".
    In the package, there is a function and I passed two parameters to the function and return a number. These two parameters will be used in the cursor select statment. Is there sth wrong that I use the cursor with the parameters? What can I do then?
    On the other hand, I want to test the package procedure by using select statement in SQL Plus. How can I call it (with parameter)?
    Remark: I am using Oracle 8i.
    Thanks for advance!!
    Regrads.

    Hi!
    I don't know why it is not running in ur computer. Pls check the script --
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace package pack_test
      2  is
      3    function try_test(eno in number,depno in number)
      4    return number;
      5* end;
    SQL> /
    Package created.
    SQL> create or replace package body pack_test
      2  is
      3    function try_test(eno in number,depno in number)
      4    return number
      5    is
      6      saln number(10);
      7    begin
      8      select sal
      9   into saln
    10   from emp
    11   where empno = eno
    12   and deptno = depno;
    13  
    14   return saln;
    15    end;
    16  end pack_test;
    17  /
    Package body created.
    SQL>
    SQL> select pack_test.try_test(7777,30) from dual;
    PACK_TEST.TRY_TEST(7777,30)
                           3456-it is working fine in my system.
    Regards.
    Satyaki De.

  • Compiling Packages, Functions, and Procedures Issues

    If you are in the editor for a package and attempt to compile a know good package under another schema (compiled in SQL+ and Toad), you receive the following errors:
    Error(21,5): PLW-06002: Unreachable code
    Error(131,7): PLW-07202: bind type would result in conversion away from column type
    (122) TN_EXISTS NUMBER := 0;
    (131) IF TN_EXISTS > 0 THEN ...
    When commenting a line with if you have something like the following it tells you there is a syntax error
    -- some comment here --
    When compiling a PL/SQL function that returns a Boolean, you get this error: Error(40,4): PLW-06002: Unreachable code

    Kris,
    I seem to have the same problem.
    Is there a way to 'deactivate' this behaviour, or do we need to wait for another Raport Release.
    This is basically preventing me from using Raptor at all for any PL/SQL development ;-(
    Wouter

  • Invalid packages, functions and procedures

    Hi,
    Ok, I think I screwed up. Maybe someone can help me.
    Our dev db which I just created a few days ago is 10.2.01. I was reading to see what needed to be done to this base for it to accept a 9.2 version. Data. I came upon oracle documentation that said to run the catalog.sql script. This had something to do with the Import full database and export full database procedures, they had to be added. So I did. I then noticed all these packages, procedures and functions listed on my oem tool as invalid. To correct this problem I ran the following scipts several times
    On individual schemas: EXEC DBMS_UTILITY.COMPILE_SCHEMA (SCHEMA => ‘OLAPSYS’);
    And this one: EXEC UTL_RECOMP.recomp_serial(); for all of them.
    But yet I still get invalid objects ( 6 different schemas) when I run this script the SYS owner being the outstanding one.
    COLUMN object_name FORMAT A10
    Column owner format a10
    Column object_name format a40
    SELECT owner,
    object_type,
    object_name,
    status
    FROM dba_objects
    WHERE status = 'INVALID'
    --And owner = 'PUBLIC'
    ORDER BY owner, object_type, object_name;
    Any suggestions on repairing this damage short of recreating the database?
    Any suggestions would help.
    Regards,
    al

    I just did a flashback database to time. Before I did any of these procedures above. That db came up ok and you would think that everything is fine. I went in to check with the same query
    COLUMN object_name FORMAT A10
    Column owner format a10
    Column object_name format a40
    SELECT owner,
    object_type,
    object_name,
    status
    FROM dba_objects
    WHERE status = 'INVALID'
    --And owner = 'PUBLIC'
    ORDER BY owner, object_type, object_name;
    and found the same amount of objects still invalid. I know that I didn't do any work at that time because I was in a meeting. I even logged out and back in on the oem tool and sql plus and got the same invalid in the column.
    Anyone knows what is going on here?
    regards,
    al

  • Webi  - How to use group by function and to make data distinct in that column

    Hi Everyone
    I'm a begginer in BO and i'm experiencing problems when trying to create a webi report that shows different courses, how many males and females in a course, their race and how many people attended each course. My challenge comes in wen i try to group by distinct courses:
    For Example
    Course name     Gender     Race         Attendees 
    BEXX11             Female     Coloured    2
    BEXX11             Male         African      1
    C3                    Male         Indian        2
    F3                    Female      White       1
    BEXX11            Female      Indian        3
    C3                   Female      Indian        4
    Course name     Gender     Race         Attendees
    BEXX11             Female     Coloured    2
                            Male         African       1
                            Female      Indian        3
    C3                    Male         Indian         2
                            Female     Indian         4
    F3                    Female      White       1
    Thanks in advance

    Hi Olebogeng Marumo,
    Apply the break on Course Name and then check the output.It will fulfill your requirement.
    Web Intelligence 4.0: Create breaks between groups of data
    Regards,
    Anish

  • Query for getting all function and procedure inside the packages

    hi All
    Please provide me Query for getting all function and procedure inside the packages
    thanks

    As Todd said, you can use user_arguments data dictionary or you can join user_objects and user_procedures like below to get the name of the packaged function and procedure names.
    If you are looking for the packaged procedures and functions source then use user_source data dictionary
    select a.object_name,a.procedure_name from user_procedures a,
                  user_objects b
    where a.object_name is not null
    and a.procedure_name is not null
    and b.object_type='PACKAGE'        
    and a.object_name=b.object_name

  • Drop  all functions and procedures

    How can I delete all functions and procedures by using Native Dynamic SQL

    Loop against DBA_OBJECTS for the object_type and owner you want to delete.
    For each loop, build your query into a variable, then execute it.
    http://tahiti.oracle.com/pls/db102/drilldown?levelnum=2&toplevel=b14261&method=FULL&chapters=0&book=&wildcards=1&preference=&expand_all=&result_id=1662311&verb=&word=execute+immediate#b14261
    Nicolas.

  • Calling Oracle Functions and Procedures in Java

    I've looked online for a blurb on using Oracle SQL functions and
    procedures in Java, but I haven't found anything. Can someone
    either give me a quick crash course on this, or point me to the
    best source of information for this?

    From the SQLJ FAQ.
    http://otn.oracle.com/tech/java/sqlj_jdbc/htdocs/faq.html#sqljplsql
    Within your SQLJ statements, you can use PL/SQL anonymous blocks
    and call PL/SQL stored procedures and stored functions, as in the
    following examples: Anonymous
    block:
    #sql {
    DECLARE
    n NUMBER;
    BEGIN
    n := 1;
    WHILE n <= 100 LOOP
    INSERT INTO emp (empno) VALUES(2000 +
    n);
    n := n + 1;
    END LOOP;
    END
    Stored procedure call (returns the maximum
    deadline as an output parameter into an output host expression):
    #sql { CALL MAX_DEADLINE(:out maxDeadline) };
    Stored function call (returns the maximum
    deadline as a function return into a result expression):
    #sql maxDeadline = { VALUES(GET_MAX_DEADLINE)
    Of course, you can also use JDBC code to achieve the same - the
    standard JDBC escape sequences for stored function and procedure
    calls are supported, using for example:
    "{? = CALL GET_MAX_DEADLINE}"
    or:
    "{call MAX_DEADLINE(?)}"
    and for the rest of the details, get that JDBC crash course...

  • How to know the packages,functions,triggers owned by schema

    I got the script to find the tables,columns and indexes belonged to a schema
    how to find the packages,functions triggers owned by a schema.
    I need to compare schema of PROD with UAT
    Any help will be appreciated

    is it possible to find the source of all those
    objects in a single scriptWhat do you mean?
    user_source will give the script?Yes.
    You can get script more easily with DBMS_METADATA
    SQL> drop FUNCTION "HR"."F11";
    Function dropped.
    SQL> CREATE OR REPLACE FUNCTION "HR"."F11" return varchar2
    as
    v_date varchar2(1000);
    begin
    select to_char(sysdate,'mmddyyyy') into v_date from dual;
    return v_date;
    end;  2    3    4    5    6    7
      8  /
    Function created.
    SQL> set pagesize 0
    SQL> set long 90000
    SQL> select DBMS_METADATA.GET_DDL (
    'FUNCTION',
    object_name,
    'HR')
    FROM    all_objects
    WHERE owner = 'HR'
    AND object_type ='FUNCTION'  3    4    5    6    7
      8  /
      CREATE OR REPLACE FUNCTION "HR"."F11" return varchar2
    as
    v_date varchar2(1000);
    begin
    select to_char(sysdate,'mmddyyyy') into v_date from dual;
    return v_date;
    end;
    Is there any script to identify source for all those
    objects

  • Oracle Form functions and procedures in APEX, how?

    I am working to recreate in APEX, already existing Read Only Forms in Oracle Forms. APEX Interactive Report functionality among other things, makes it worth while as well as targetting a different audience than the one that utilizies the Oracle Form versions. Oracle Forms versions use lots of pre and post query triggers, PLSQL Functions.
    In Oracle Forms one of the places those functions can be located is in the "Program Units" section of the Form. A typical function of this sort, based on a specific Mission ID Itinerary, collects scheduled passengers last names, formats them with a comma and space after each one, into a single string that is returned and displayed as the passenger list of one row.
    I have all this code written so I can move most of the main query of the Oracle Form into an Interactive Report. These functions and triggers called from within the Form, from the "Program Units" section of the Oracle Form rather than being stored in the Database schema in a package, where would they go inside APEX? Can I create a "Shortcut" in APEX and call it from the Interactive Report "Region Source"? Can I create the PLSQL function at the page level or region level of the Interactive Report? Or, is my best bet creating a package stored in the database, of all these functions and/or proecedures I may need from the original Oracle Form?
    Some advice would be greatly appriciated.

    RLBickham wrote:
    I don't think I have been clear enough in describing the specific thing I want to do, it simply does not reach the level of forms to APEX conversion. It is basically a PLSQL Function problem.
    I have an Interactive Report that is currently getting 90 percent of what I want however, each row, representing a Mission may have multiple legs. Each Leg has two locations or ICAO codes attached to it. Based on the Mission number, I want to loop through the leg table, collect all the ICAO codes for that Mission, put them all into 1 variable separated by a coma and add that variable to the column display of that Interactive Report as the last column.
    In Oracle Forms I have a function saved to the database that is called within the main query. Maybe I am asking a question that does not need to be asked but in any case my question is can I put that function currently in the database somewhere in the confines of the Interactive Report and reference it via Http somehow or should I just stick with putting functions and procedures in packages stored in the database and called the conventional way?You could move the function to the database and call it from the report query, but it sounds as if it's superfluous. In the report query use whatever form of Re: 4. How do I convert rows to columns? is appropriate to your (unspecified) database version.
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.

  • Data dcitioany view and function and procedures insure a package

    I need the run a query on the Data dcitioany, to get a list of packages as well as a list for procedures and functions inside on Oracle 10g

    I use DBA_SOURCE,
    I used like this
      SELECT v.owner,
           (CASE V.type
            WHEN 'FUNCTION'  THEN NULL
            WHEN 'PROCEDURE' THEN NULL
            ELSE v.name
            END
           )PACKAGE_NAME ,
            UPPER(
            SUBSTR
            TRANSLATE(
            LTRIM(REPLACE(SUBSTR(ltrim(v.text),LENGTH('PROCEDURE')+1),'"',''),' '),
            '+++'
            ),---TEXT TO BE SEARCH
            1,---STARTING POSITION
            INSTR(
            TRANSLATE(
            LTRIM(REPLACE(SUBSTR(ltrim(v.text),LENGTH('PROCEDURE')+1),'"',''),' '),
            '+++'
            ||'+'
            '+'
            )-1 ---lENGTH
            )OBJECT_NAME
            TRIM(SUBSTR(ltrim(v.text),1,LENGTH('PROCEDURE')))"TYPE"
    FROM dba_source v
    WHERE (TRIM(ltrim(v.text)) LIKE ('FUNCTION%') OR TRIM(ltrim(v.text)) LIKE ('PROCEDURE%')) AND
                v.type IN ('PACKAGE','FUNCTION','PROCEDURE')
    ORDER BY V.OWNER,V.name,v.text;Note: the translate, substr, etc function can be simplified based on your needs
    in my case, how developers created the function and procedure is quite messy.
    thanks

  • Calling Oracle function and Procedure using OCCI with in C++ code

    Could any body send me the sample code to create and execute Oracle function and Procedure using OCCI concept in C++?.
    Edited by: 788634 on Aug 16, 2010 4:09 AM

    Hi Vishnu,
    Yes, sure, you can create a PL/SQL procedure, function, package, package body, etc. from within an OCCI application. I would say that, generally, this is not the sort of activity a typical client application would perform unless there is some initialization/installation processes that need to happen. In any case, here is a simple demo showing how to create a stand alone procedure (in a real application I would use a package and body) that returns a ref cursor. The ref cursor is just a simple select of two columns in the hr.countries sample table. Of course, there is no error handling, object orientation, etc. in this demo - I wanted to keep the code as short and as simple as possible to illustrate the concept.
    Regards,
    Mark
    #include <occi.h>
    #include <iostream>
    using namespace std;
    using namespace oracle::occi;
    int main(void)
      // occi variables
      Environment *env;
      Connection  *con;
      Statement   *stmt;
      ResultSet   *rs;
      // database connection information
      string user = "hr";
      string passwd = "hr";
      string db = "orademo";
      // sql to create the procedure which returns a ref cursor as out parameter
      // should be run as hr sample user or in a schema that has select privilege
      // on the hr.countries table and a synonym (countries) that points to the
      // hr.countries table
      string sqlCreate =
        "create or replace procedure get_countries(p_rc out sys_refcursor) as "
        "begin"
        " open p_rc for"
        " select country_id, country_name from countries order by country_name; "
        "end;";
      // pl/sql anonymous block to call the procedure
      string sqlCall = "begin get_countries(:1); end;";
      // create a default environment for this demo
      env = Environment::createEnvironment(Environment::DEFAULT);
      cout << endl;
      // open the connection to the database
      con = env->createConnection(user, passwd, db);
      // display database version
      cout << con->getServerVersion() << endl << endl;
      // create statement object for creating procedure
      stmt = con->createStatement(sqlCreate);
      // create the procedure
      stmt->executeUpdate();
      // terminate the statement object
      con->terminateStatement(stmt);
      // now create new statement object to call procedure
      stmt = con->createStatement(sqlCall);
      // need to register the ref cursor output parameter
      stmt->registerOutParam(1, OCCICURSOR);
      // call the procedure through the anonymous block
      stmt->executeUpdate();
      // get the ref cursor as an occi resultset
      rs = stmt->getCursor(1);
      // loop through the result set
      // and write the values to the console
      while (rs->next())
        cout << rs->getString(1) << ": " << rs->getString(2) << endl;
      // close the result set after looping
      stmt->closeResultSet(rs);
      // terminate the statement object
      con->terminateStatement(stmt);
      // terminate the connection to the database
      env->terminateConnection(con);
      // terminate the environment
      Environment::terminateEnvironment(env);
      // use this as a prompt to keep the console window from
      // closing when run interactively from the IDE
      cout << endl << "ENTER to continue...";
      cin.get();
      return 0;
    }

  • Getting all Functions and Procedures using DBA_ARGUMENTS

    Hi All
    I am wanting to find out all functions and procedures that are within each of my packages and am using the following SQL to do this.
    SELECT DISTINCT A.OBJECT_NAME, A.PACKAGE_NAME,
    DECODE(POSITION,0,'FUNCTION','PROCEDURE')
    FROM DBA_ARGUMENTS A
    WHERE OWNER = 'NB'
    I have discovered however that if a procedure has been overloaded with function will appear twice: as procedure and as a function
    I was wondering if there was any workaround for this as I would only like a function to be displayed once?
    Kind Regards
    Mark

    There is an 'OVERLOAD' column which can be used to show only specific overloads (e.g. first).
    Determining which overload should be displayed in any given case may require some more thought.

  • How to Use the language function for assignment and validation

    Hi All,
    If anyone can explain me in details with example ,how to use the language function for assignments and validations?
    Thanks
    Arnab

    Hi Arnab,
    The expression is checked only for the current MDM session.
    If u login with the ABC language it will always show the ABC language no matter how many times u execute it.
    Try connecting to the DM with the XYZ language.
    It should go to the if part rather than else.
    Hope it helps.
    Thanks,
    Minaz

Maybe you are looking for

  • How to select Vendor information as per the line item of the shopping cart

    SRM ABAPers, I want to create a custom report and needs to produce SC's item details with vendor's information. So I want to select the vendor information(including the partner function- 00000019 or 00000039) as per the line item of the shopping cart

  • How many device can you have on your timecapsule

    I have multiple device on my wireles network and it seems i have hit a limit. If I put a 9th device on the network, one of the other devices seem to get kicked off or cannot establilsh connection. Is there a limit to the number of devices using a tim

  • How to Debug  ABAP/4 routine in Dynamic Selection?

    Problem:         I am not able to debug the ABAP/4 routine in data dynamic selection. Analysis:         I typed /H on  transaction command prompt. I entered to ABAP/4 debug mode. Then I am not  able to debug my routine. Give me solution for this prob

  • Alerts on mapping error from BPM

    In my BPM, when I use 'Throw Alert' via control step before transformation, it creates an Alert. What I would like to do is to Throw Alert when there is a mapping error. And in order to do this, I created an exception block within my transformation s

  • Error: Timeout for content=15005

    We have 9iAS 1.0.2.2 and Portal 3.0.9.8. When logging in Portal30, there is an error message: Error: Timeout for content=15006 on the build tab. The error-out content should be "Bild your own pplication". Go to Navigation --> Application, I can't cre