Call a package within a stored procedure

Hi people,

I created a package that works very well (well compiled).

Now, if I run my package via a command in the oracle command line:

run package_name.procedure_of_package ("arguments");

in this way, it works perfectly.

Inside of another procedure (procedure2) I do the same thing,

but it gives the error:
There is no function with the name of procedure_of_package in this scope.

I implemented on the owner of shema and I'm also running on the owner of the schema.

Thank you very much

Pipoca

Hello

What do you do?...

If you want to call the "procedure1' according to the number of records in the table 'table_a', then you can do:

CREATE OR REPLACE PROCEDURE procedure2 AS
   v_teste  number;
BEGIN
   SELECT count(*)
   INTO   v_teste
   FROM   table_a;

   IF v_teste = 0 THEN
      package1.procedure1('AAA', 'BBB');
   ELSE
      package1.procedure1('111', '222');
   END IF;
END;

Tags: Database

Similar Questions

  • Re-compile a package in a stored procedure

    Hi all
    We are using Oracle 10 g. I coded a stored procedure that does a lot of things which is re - create a materialized using the dynamic SQL view. However, when this materialized view is created, a package that this stored procedure must, becomes invalid. What is the syntax to recompile the package using the dynamic SQL? I tried something like script below, but I'm getting ' * ORA-24344: success with compilation error * "error message. I would like to re - build the package until it is used in this stored procedure.

    DECLARE
          v_sql         VARCHAR2 (1000);
          object_name   VARCHAR2 (50) := 'TEST.PS2_FNS366';
    BEGIN
           dbms_output.put_line('This is a test.');
           v_sql := 'Alter package ' || object_name || ' compile  package';
           dbms_output.put_line (v_sql);
           EXECUTE IMMEDIATE v_sql;
         
           v_sql := 'Alter package ' || object_name || ' compile  body';
           dbms_output.put_line (v_sql);
           EXECUTE IMMEDIATE v_sql;      
                  
    END;
    Thank you


    Seyed

    Normally, this means that STUDENT. V_BEN_REG_CASE_NUMBER references objects (tables and views) that has received the STUDENT SELECT on, but not with the WITH GRANT option. If this is the case, STUDENT may not grant other users access to this data.

    If STUDENT. V_BEN_REG_CASE_NUMBER refers to tables A, B and C belonged to another user U, U have to

    GRANT SELECT ON u.a TO student WITH GRANT OPTION;
    GRANT SELECT ON u.b TO student WITH GRANT OPTION;
    GRANT SELECT ON u.c TO student WITH GRANT OPTION;
    

    If the STUDENT has these privileges, it will be able to grant access to his point of view V_BEN_REG_CASE_NUMBER other users.

    Justin

  • call a packed stored procedure from within another stored procedure

    I have a stored procedure (STROKEQC) on a scheme that is not in a package. I want to be able to call a procedure stored that IS inside a package on the same scheme of STROKEQC. When I try the syntax below, I get an error "no function with name 'PARTICIPANTSPECIFICEDITS' exists in this area." That the procedure exists.
    /*Generate admin field data*/
        execute immediate QCPROCEDURES.PARTICIPANTSPECIFICEDITS('ALL');        
        execute immediate QCPROCEDURES.GENERATE_SURGYEAR_ERRFLAG;
    Is not the way to do inside a stored procedure?

    Thank you!
    Eva

    Hi, Eva,.

    You need not EXECUTE IMMEDIATE to call a stored procedure (including a procedure in a package) on the other. Just use the name and the arguments (if any):

    QCPROCEDURES.PARTICIPANTSPECIFICEDITS('ALL');
    QCPROCEDURES.GENERATE_SURGYEAR_ERRFLAG;
    

    I guess qcprocedures is the package name, and participantspecificedits and generate_surgyear_errflag are procedures in this package.

    In case you're wondering, the error was probably because you do not have a variable called participantspecificedits. If you had a dynamic code in a string called variable x, then "EXECUTE IMMEDIATE x"; would be the way to run it.

  • disconnected rowset select CachedRowSet of a statement within the stored procedure?

    Hello everyone

    I'm using CachedRowSet returned from a parameterized select statement and it works very well.

    If I put the same select statement in a simple read only then stored procedure I get this exception: "a result set has been generated for the update.

    I'm not trying to update all lines in my code.

    I tried to make the CachedRowSet to be read-only, but this does not help, same error.

    Question 1: a stored procedure returns a single result set can be called to fill a CachedRowSet read-only? (in a similar way to a method of CallableStatement prepareCall with input/output settings).

    Question 2: in general is something to be encouraged for future development or are they deprecated or replaced with something else or better using CachedRowSet, FilteredRowSet (disconnected) and WebRowSet, JDBCRowSet (connected)?

    Thank you very much in advance

    It work? (be sure that your stored procedure done * nothing * before running this query)

    PreparedStatement p = conn.prepareStatement ("{call dbo.p_testCachedJDBCRowSet (?)}" ");

    p.setInt (1, 10);

    CRS CachedRowSetImpl = new CachedRowSetImpl();

    CRS. Populate (p.ExecuteQuery ());

  • Sequence within the stored procedure

    Hi guys,.
    Hoping you can help me here too. I have a stored procedure that takes a prepared external table/list and insert it into my database where it is required.

    What I can't work out is how to add a fill to an ID column in this table with the next value in the sequence.

    This is the procedure
    CREATE OR REPLACE PROCEDURE BM120.GrowthRates_Update IS
    
    
    CURSOR c1 IS
        SELECT * FROM growthrates;
        
    BEGIN
    
    
      FOR gr IN c1
      LOOP
    
      UPDATE forecast fc
      SET    fc.change_sd = gr.change_sd,
             fc.change_sn = gr.change_sn,
             fc.change_wd = gr.change_wd,
             fc.change_wn = gr.change_wn,
             fc.last_modified_by = gr.last_modified_by
      WHERE  fc.lmp = gr.lmp
        AND  fc.dt = gr.dt
        AND  fc.event = gr.event;
      
      IF SQL%ROWCOUNT <= 0 THEN
        INSERT INTO forecast (lmp, dt, event, change_sd, change_sn, change_wd, change_wn, committed, last_modified, last_modified_by)
        VALUES (gr.lmp, gr.dt, gr.event, gr.change_sd, gr.change_sn, gr.change_wd, gr.change_wn, gr.committed, gr.last_modified, gr.last_modified_by);
        
        INSERT INTO system_log (dt, detail)
        VALUES (sysdate, 'GROWTHRATES, Details for ' || gr.lmp || ' INSERTED');
      END IF;
      
        INSERT INTO system_log (dt, detail)
        VALUES (sysdate, 'GROWTHRATES, ' || gr.lmp || ', ' || gr.dt || ', ' || gr.event || ', '
                || gr.change_sd || ', '
                || gr.change_sn || ', '
                || gr.change_wd || ', '
                || gr.change_wn || ', '
                );
      
      COMMIT;
        
      END LOOP; 
      
    END;
    /
    And it's the line of code, I think I should add somewhere in the process, I'm not sure how
    SELECT 'GR'||TRIM(TO_CHAR(GROWTHRATES_SEQ.NEXTVAL,'00000')) INTO IO_ID FROM DUAL;
    any ideas?

    This code?

    CREATE OR REPLACE PROCEDURE bm120.growthrates_update
    IS
       CURSOR c1
       IS
          SELECT *
            FROM growthrates;
    
       io_id   VARCHAR2 (32000);
    BEGIN
       FOR gr IN c1
       LOOP
          SELECT 'GR' || TRIM (TO_CHAR (growthrates_seq.NEXTVAL, '00000'))
            INTO io_id
            FROM DUAL;
    
          UPDATE forecast fc
             SET fc.change_sd = gr.change_sd,
                 fc.change_sn = gr.change_sn,
                 fc.change_wd = gr.change_wd,
                 fc.change_wn = gr.change_wn,
                 fc.last_modified_by = gr.last_modified_by,
                 fc.ID = io_id
           WHERE fc.lmp = gr.lmp AND fc.dt = gr.dt AND fc.event = gr.event;
    
          IF SQL%ROWCOUNT <= 0
          THEN
             INSERT INTO forecast
                         (lmp, dt, event, change_sd, change_sn,
                          change_wd, change_wn, COMMITTED,
                          last_modified, last_modified_by, ID
                         )
                  VALUES (gr.lmp, gr.dt, gr.event, gr.change_sd, gr.change_sn,
                          gr.change_wd, gr.change_wn, gr.COMMITTED,
                          gr.last_modified, gr.last_modified_by, io_id
                         );
    
             INSERT INTO system_log
                         (dt,
                          detail
                         )
                  VALUES (SYSDATE,
                          'GROWTHRATES, Details for ' || gr.lmp || ' INSERTED'
                         );
          END IF;
    
          INSERT INTO system_log
                      (dt,
                       detail
                      )
               VALUES (SYSDATE,
                          'GROWTHRATES, '
                       || gr.lmp
                       || ', '
                       || gr.dt
                       || ', '
                       || gr.event
                       || ', '
                       || gr.change_sd
                       || ', '
                       || gr.change_sn
                       || ', '
                       || gr.change_wd
                       || ', '
                       || gr.change_wn
                       || ', '
                      );
    
          COMMIT;
       END LOOP;
    END;
    

    * 009 *.

    Published by: 009 on March 31, 2010 21:19

  • procedure of package within a single package

    can we call a package within a package procedure.

    I have a package which has 2 procedure P1 and P2 and works. F1

    F1 needs to use both P1 and P2.

    Can I call P1 and P2 within F1. Do need to be called as pgkname. Even if they are inside the package P1?

    Thank you

    Yes, you can:

    SQL> create or replace package my_pkg
      2  as
      3    function f1 return number;
      4  end;
      5  /
    
    Package created.
    
    SQL> create or replace package body my_pkg
      2  as
      3    procedure p1
      4    is
      5    begin
      6      dbms_output.put_line('Hi, I''m P1');
      7    end;
      8    procedure p2
      9    is
     10    begin
     11      dbms_output.put_line('Hi, I''m P2');
     12    end;
     13    function f1 return number
     14    is
     15    begin
     16      p1;
     17      p2;
     18      return 1;
     19    end;
     20  end;
     21  /
    
    Package body created.
    
    SQL> select my_pkg.f1 from dual;
    
            F1
    ----------
             1
    
    1 row selected.
    
    Hi, I'm P1
    Hi, I'm P2
    

    Look and find in:
    This forum
    http://www.Oracle.com/pls/db102/homepage
    http://www.Oracle.com/pls/db112/homepage
    http://asktom.Oracle.com

  • call a stored procedure with OUT VARCHAR2 parameter fails

    Hi all

    I use the Oracle 11.2.0.1 version OLE DB provider. I have a simple stored procedure that contains a VARCHAR2 OUT parameter:

    create or replace procedure TestOut (RESULT_CODE OUT VARCHAR2) is
    Start
    RESULT_CODE: = 'X '.
    TestOut end;

    The following c# code piece fails:

    String ConnStr = "Provider = OraOLEDB.Oracle; User ID = test; Password = test; Data Source = sandbox; « ;
    OleDbConnection Conn = new OleDbConnection (ConnStr);
    Conn.Open ();
    OleDbCommand Cmd new OleDbCommand();
    Cmd.Connection = Conn;
    OleDbParameter Param = Cmd.CreateParameter ();
    Param.ParameterName = "RESULT_CODE ';
    Param.Direction = System.Data.ParameterDirection.Output;
    Param.OleDbType = OleDbType.BSTR;
    Param.Size = 1;
    Cmd.Parameters.Add (Param);

    Cmd.CommandType = System.Data.CommandType.Text.
    Cmd.CommandText = "{TESTOUT (?). CALL} ";
    Cmd.ExecuteNonQuery ();

    If the stored procedure is modified to contain an OUT parameter, the same code works, after you change the type of parameter to appropriate OleDBType (OleDbType.SmallInt).

    What am I doing wrong when handling OUTPUT VARCHAR parameters? Y at - there any limitation on the types of parameters stored procedure using the Oracle OleDB provider?

    Published by: user957565 on 1/Ago/2011 06:31

    I get an access violation, using 11202. What do you get?

    In any case, it works fine for me using OleDbType.VarChar instead of OleDbType.BSTR.

    Hope this helps, comments welcome.

    Greg

  • Creating views, dynamic SQL within stored procedure

    I'm having a problem with the creation of dynamic views of in a stored procedure. The following declare block works fine:

    DECLARE
    parameter i_nom_table varchar2 (200): = 'abc ';
    xyz cursor script, SELECT step
    STARTING from scripts
    WHERE table_name = i_nom_table parameter
    ORDER BY step CAD;
    l_sql scripts.script%TYPE;
    l_step scripts.step%TYPE;
    l_error VARCHAR2 (200);
    l_code VARCHAR2 (200);
    Start
    XYZ OPEN;
    LOOP
    XYZ-FETCH INTO l_step, l_sql;
    OUTPUT WHEN xyz % NOTFOUND;
    immediately run l_sql;
    insert into ingest_log values (null, sysdate, i_nom_table, l_step, l_sql, 'Success' parameter);
    END LOOP;
    CLOSE XYZ;
    insert into ingest_log values (null, sysdate, parameter i_nom_table, 0, "Accomplished all the steps.", "Success");
    EXCEPTION WHEN OTHERS THEN
    l_error: = substr (SQLERRM, 1, 200);
    l_code: = SQLCODE;
    insert into ingest_log values (null, sysdate, parameter i_nom_table, l_step, l_sql, l_code |) ' - ERROR - ' | l_error);
    END;

    However, if I create a procedure with this block and try to run it I get an insufficient privileges error. Do not know why. All tables, views, procedures are under the same user, and the user that I'm connected as the runtime of the declare block. The user has the following privileges:

    Connect, resource, xdbadmin, s/n

    Any reason you can think of for this? Script values are generally "CREATE OR REPLACE VIEW As.... » ;

    Permissions in Oracle to do indirectly through roles are not available when compiling packages, functions, and stored procedures. Direct subsidies are required during the creation of these objects in the database.

    http://articles.TechRepublic.com.com/5100-10878_11-6183799.html

  • Entity Framework stored procedure Mapping - OUT unrecognized parameter

    I use the following software:

    • ODP.NET 12 c Release 3
    • Entity Framework 6
    • Visual Studio 2013, SP3
    • Oracle 11g Server

      I created a package containing a stored procedure to update a row in a table.  The procedure is an OUT parameter (named ROWS_AFFECTED) which returns the number of rows affected.

      CREATE OR REPLACE PACKAGE BODY TST. Customer_Procs
      AS
      PROCEDURE Update_Customer
      (
      CUST_ID IN NUMBER,
      WHAT IN VARCHAR2,
      L_NAME IN VARCHAR2,
      EMAIL IN VARCHAR2,
      LAST_UPDATE TIMESTAMP IN
      ROWS_AFFECTED NUMBER
      )
      AS
      BEGIN
      UPDATE
      TST. CUSTOMER
      SET
      NAME = WHAT,.
      LAST_NAME = L_NAME,
      EMAIL_ADDR = EMAIL,
      LAST_UPDT_TIME = CURRENT_TIMESTAMP
      WHERE
      CUSTOMER_ID = CUST_ID
      AND LAST_UPDT_TIME = LAST_UPDATE;

      ROWS_AFFECTED: = NUMBER OF ROWS SQL %;

      END Update_Customer;


      I executed successfully the stored procedure in SQL * more.  The ROWS_AFFECTED OUT parameter is filled with the good

      value.

      I imported the stored procedure in my Entity Framework model using the function successfully import.

      I then traced the parameters of the stored procedure to my entity properties. The ROWS_AFFECTED parameter is shown in the stored procedure mappings, but the "rows affected parameter" check box is cleared.

      Attempt to run my results in the following exception being throw:
      "CustomerModel.msl (22,12): error 2047: a mapping liaison function specifies a function.

      CustomerModel.Store.CUSTOMER_PROCS_UPDATE_CUSTOMER with a parameter not supported: ROWS_AFFECTED. Output parameters cannot

      be mapped through the RowsAffectedParameter property. Use the result links to return values from a function call.

      I am trying to determine what I need to do in order to have the Entity Framework to recognize the ROWS_AFFECTED OUT parameter in the

      stored procedure chart for concurrency control.

      I found a solution: try to declare ROWS_AFFECTED such as 'PLS_INTEGER' instead of 'NUMBER '.  This solved it for me.

    • selection of lines by using the stored procedure

      All the

      At the risk of asking something obvious, I would like to know if it is possible to wrap a selection within a stored procedure.

      Create the abc as procedure

      Start

      date of b;

      Select sysdate into double b;

      end;

      /

      Question: I have a select complex which should be called from JAVA. I don't want to create a VIEW since at the request of the view, indeed I will do so: SELECT * FROM (my original query) which leads to performance.

      I would like to be able to:

      exec has;

      This should give me the result of

      SELECT

      x, z, c

      Of

      one

      ;

      How can I make this possible a stored procedure?

      Thank you

      Well, yes there are ways to do it, but first of all, you are mistaken in thinking that select * from , would lead to a performance overhead.  The optimizer based on CSSTidy will optimize the request to provide results without worrying so there is no noticeable performance difference.

      Java, you probably want to use a ref cursor and get java to retrieve the results back.

      Example of refcursor function (demonstrated SQL * more I don't have Java)...

      SQL > create or replace function test RETURN as sys_refcursor
      cur_o 2 sys_refcursor;
      3. start
      4. open cur_o to select empno, ename from emp;
      5 return cur_o;
      6 end;
      7.

      The function is created.

      SQL > var r refcursor;
      SQL > exec: r: = test();

      PL/SQL procedure successfully completed.

      SQL > print r;

      EMPNO, ENAME
      ---------- ----------
      7369 SMITH
      7499 ALLEN
      7521 WARD
      7566 JONES
      7654 MARTIN
      7698 BLAKE
      7782 CLARK
      7788 SCOTT
      KING 7839
      7844 TURNER
      7876 ADAMS
      JAMES 7900
      7902 FORD
      7934 MILLER

      14 selected lines.

    • Cannot create the web service stored procedure.

      I can create more web services is by right clicking on the package of the stored procedure in the db connection. This good worked before and I cannot explain why I can't see this option. Grateteful for tips on why it has stopped working.

      '2009' is what Oracle said.

      John

    • Tables created in a stored procedure cannot be used with dynamic SQL? The impact?

      There is a thread on the forum which explains how to create tables within a stored procedure (How to create a table in a stored procedure , however, it does create a table as such, but not how to use it (insert, select, update, etc.) the table in the stored procedure.) Looking around and in the light of the tests, it seems that you need to use dynamic SQL statements to execute ddl in a stored procedure in Oracle DB. In addition, it also seems that you cannot use dynamic SQL statements for reuse (insert, select, update, etc.) the table that was created in the stored procedure? Is this really the case?

      If this is the case, I am afraid that if tables cannot be 'created and used"in a stored procedure using the dynamic SQL, as is the case with most of the servers of DB dynamic SQL is not a part of the implementation plan and, therefore, is quite expensive (slow). This is the case with Oracle, and if yes what is the performance impact? (Apparently, with Informix, yield loss is about 3 - 4 times, MS SQL - 4 - 5 times and so on).

      In summary, tables created within a stored procedure cannot be 'used' with dynamic SQL, and if so, what is the impact of performance as such?

      Thank you and best regards,
      Amedeo.

      Published by: AGF on March 17, 2009 10:51

      AGF says:
      Hi, Frank.

      Thank you for your response. I understand that the dynamic SQL is required in this context.

      Unfortunately, I am yet to discover "that seeks to" using temporary tables inside stored procedures. I'm helping a migration from MySQL to Oracle DB, and this was one of the dilemmas encountered. I'll post what is the attempt, when more.

      In Oracle, we use [global temporary Tables | http://www.psoug.org/reference/OLD/gtt.html?PHPSESSID=67b3adaeaf970906c5e037b23ed380c2] aka TWG these tables need only be created once everything like a normal table, but they act differently when they are used. The data inserted in TWG will be visible at the session that inserted data, allowing you to use the table for their own temporary needs while not collide with them of all sessions. The data of the TWG will be automatically deleted (if not deleted programmatically) when a) a commit is issued or b) the session ends according to the parameter that is used during the creation of the TWG. There is no real need in Oracle to create tables dynamically in code.

      I noticed that many people say that the "Creation of the tables within a stored procedure" is not a good idea, but nobody seems necessarily explain why? Think you could elaborate a little bit? Would be appreciated.

      The main reason is that when you come to compile PL/SQL code on the database, all explicit references to tables in the code must correspond to an existing table, otherwise a djab error will occur. This is necessary so that Oracle can validate the columns that are referenced, the data types of those columns etc.. These compilation controls are an important element to ensure that the compiled code is as error free as possible (there is no accounting for the logic of programmers though ;)).

      If you start to create tables dynamically in your PL/SQL code, so any time you want to reference this table you must ensure that you write your SQL queries dynamically too. Once you start doing this, then Oracle will not be able to validate your SQL syntax, check the types of data or SQL logic. This makes your code more difficult to write and harder to debug, because inevitably it contains errors. It also means that for example if you want to write a simple query to get that one out in a variable value (which would take a single line of SQL with static tables), you end up writing a dynamic slider all for her. Very heavy and very messy. You also get the situation in which, if you create tables dynamically in the code, you are also likely to drop tables dynamically in code. If it is a fixed table name, then in an environment multi-user, you get in a mess well when different user sessions are trying to determine if the table exists already or is the last one to use so they can drop etc. What headache! If you create tables with table names, then variable Dynamics not only make you a lot end up creating (and falling) of objects on the database, which can cause an overload on the update of the data dictionary, but how can ensure you that you clean the tables, if your code has an exception any. Indeed, you'll find yourself with redundant tables lying around on your database, may contain sensitive data that should be removed.

      With the TWG, you have none of these issues.

      Also, what is the impact on the performance of the dynamic SQL statements in Oracle? I read some contrasting opinions, some indicating that it is not a lot of difference between static SQL and SQL dynamic in more recent versions of Oracle DB (Re: why dynamic sql is slower than static sql is this true?)

      When the query runs on the database, there will be no difference in performance because it is just a request for enforcement in the SQL engine. Performance problems may occur if your dynamic query is not binding variable in the query correctly (because this would cause difficult analysis of the query rather than sweet), and also the extra time, to dynamically write the query running.

      Another risk of dynamic query is SQL injection which may result in a security risk on the database.

      Good programming will have little need for the tables of dynamically created dynamically or SQL.

    • Wrong execution of a package within a procedure stored

      Oracle version: 10.2.0.4 RAC

      I posted the below problem in REPLICATION forum but I think he needs to be here. I think I'm having a problem with some "shade" of Oracle, which relates to the appellant a package in a regulation and immunities.

      Here is the original post:
      ================================================================================================

      Get an ora-12048 and ora - 942 when executing dbms_refresh.refresh in a stored procedure. When I invoke dbms_refresh.refresh directly from SQLPlus things work very well.

      Here is the header and the relevant code in the stored procedure:

      create or replace PROCEDURE p_mv_refresh (p_refgrp IN VARCHAR2) AS

      v_refgrp all_refresh_children.rname%TYPE;

      BEGIN
      v_refgrp: = UPPER (p_refgrp);
      DBMS_REFRESH. Refresh (v_refgrp);
      end;

      Here is the definition of the refresh Group:

      exec dbms_refresh.make (name = > 'BENEFITS_REFGRP',-)
      list = > 'MV_INDIVIDUAL_CUR, MV_CCR_CUR, MV_BUSINESS_DBA_CUR, -.
      next_date = > sysdate;
      interval = > NULL,--
      implicit_destroy = > FALSE;
      Lax = > FALSE;
      rollback_seg = > NULL,--
      push_deferred_rpc = > FALSE;
      refresh_after_errors = > FALSE;
      purge_option = > NULL,--
      parallelism = > 8, -.
      heap_size = > NULL);

      I run in SQLPLUS by passing the name of the refresh Group in the stored procedure:

      SQL > exec p_mv_refresh ('BENEFITS_REFGRP');

      And I get this:

      Error: ORA-12048: error in materialized view Refresh
      'UIMVIEWS '. "" MV_BUSINESS_DBA_CUR ".
      ORA-00942: table or view does not exist

      When I have exec dbms_refresh.refresh('BENEFITS_REFGRP') directly in SQLPlus, everything runs without failure.

      Here is the definition of MV:

      CREATE THE MV_BUSINESS_DBA_CUR MATERIALIZED VIEW
      ON PREBUILT TABLE
      COMPLETE REFRESH
      DISABLE THE QUERY REWRITE AS
      (SELECT *)
      OF xxxxxxxx...) ;

      There is no newspaper of MV on the source (no fast refresh) table.

      Table source and MV are same DB, different schemas.

      Just to be safe in tests, I attributed select privileges on the source table to the MV schema via a role and directly. Does not solve.

      New - the MV refreshes thin when done directly from a SQLPlus prompt. It fails only when I run it from within the stored proc.

      Thanks in advance for your suggestions...

      TonyG

      Here are additional info I posted:
      =========================================================================
      Here is an update - I tried the same procedure only this time replaced the call to dbms_refersh with a call to dbms_mview, just to see if he would run.

      This isn't. I am quite sure, I hit a kind of question of privilege that has to do with a package requiring a package, but I don't know enough with what it might be. dbms_mview works fine from the command line, just like the fact dbms_refresh.

      Here's what happened when I called the proc dbms_mview

      Error: ORA-12008: error in the path of refresh materialized view
      ORA-00942: table or
      view does not exist
      =========================================================================

      Thanks in advance for any help.

      A stored procedure does not inherit from grants of role, you must make grants directly to the relevant tables/views/mast views and can not give these permissions to the roles of througth.

      Date of arrival:
      http://download.Oracle.com/docs/CD/B10500_01/server.920/a96524/c24privs.htm#4770--> blocks named with copyright

      Published by: Pedro_gloria on 10-Dec-2010 07:54

    • ODP 12 c version 3 with EF 6.1.1 I can't add Stored Procedure of a package to my model

      I use the ODP 12 c Release 3 (12.1.0.2.1), with Entity Framework 6.1.1 with the first database in MS Visual Studio 2013 update 4

      I have a MVC 5 (.Net Framework 4.5.2) project that connects to Oracle 11 G R2 Database server, an existing database (Tables, views and a pack of Stored procedures)

      I can add tables and use them successfully in my model
      I can add a simple stored procedure

      Here's the problem:
      I have my .edmx file right click and click on "update model from database...". «, on the 'Add' tab, I chose «Stored procedures and functions»
      I can see the list of procedures stored in the package (format packageName.usp) and check the box for the stored procedure of my package, then click 'Finish' to start the update process.

      No stored procedures have been added to my Model.Store


      The only possible exit I get the 'entity data model' is:
      Generated template file: Model1.edmx.
      Loading metadata from the database took 00:00:00.5803351.
      The model generation took 00:00:00.3761861.

      How to add a stored procedure from a package with the Entity Framework 6.1.1?

      I found the answer.

      When in the edmx model and you right click "Update Model database.

      Uncheck "Import selected stored procedures and functions in the entity model", select the package and update procedures. (It works)

      Then in "Model Explorer" under "Model. Store\ stored procedures/functions" you will see your procedures in the package (finally). Then their card in "Function Imports".

      I don't understand why unchecking import stored procedures works, but it does.

      I also found easier to simply call the procedure directly and not using Entity Framework, as all my procedures are: insertion, update and deletions and not all parameters mapped on the model for the view.

    • Internal error: catalog view incompatible when calling a stored procedure

      Hello

      I use JDeveloper 11.1.1.4

      When you call a stored procedure from AppModuleImpl, I get this error internal error: inconsistent display catalog

      I'll call the stored procedure of this way

      String lErrCode;

      String lErrMsg;

      Result of an integer;

      ARRAY inputArray = null;

      Table STRUCT that can be passed to a PLSQL PROCEDURE

      inputArray =

      JdbcSqlMapper.preparePlSqlArrayUsingVOAttrbs (conn, recordType,

      view, rm);

      OracleCallableStatement st =

      (OracleCallableStatement) conn.prepareCall ("{?}") = call ("+

      procedureName +.

      "(?,?,?))}");

      st.registerOutParameter (1, Types.INTEGER);

      st.setObject (2, inputArray, OracleTypes.ARRAY);

      st.registerOutParameter (2, OracleTypes.ARRAY,

      recordType.getTableType ());

      st.registerOutParameter (3, Types.VARCHAR);

      st.registerOutParameter (4, Types.VARCHAR);

      St.Execute ();

      I checked the subsidies for this package to all users. All users with grants to this package.

      I don't know where I start to debug this issue.

      Kindly help.

      Thank you and best regards,

      John.

      Have yo uchecked the right of the types of data used (at least the TABLE) to the user (referred to Pokusak blog: JPublisher - incompatible catalog display)?

      Timo

    Maybe you are looking for

    • H320 computer Type: 4041 food and card Gforce

      I looked very hard on these forums and sites of the knowledge base to find information about food in my H320. I called Lenovo support twice and did not get a confident answer. The first person told me the N8400GS 1 GB card should work. I asked the 2n

    • EOS Solution disk download

      Hi, I am trying to download the canon eos solution disk v 24.1 windows7/vista/xp (sp3) eos on my laptop lenovo 17 ", but while the pc download manual disc ok, it won't download this disc repeat myself that my screen affecting low asre, he checked the

    • HP Officejet Pro 8500 Wireless print pink instead of blue

      Until recently, I never had a problem with this printer; However (now when I didn't print blue) it comes out pink... I cleaned the head many times and has also replaced the Cyan Ink Cartridge with a new and fresh cartridge, and nothing seems to solve

    • Computer Vista stops himself every day

      my computer has learned to turn off recently about all 3 or 4 days.  What could be the problem?

    • I can't run the Explorer windows or any other program for me on internet

      I have problems of online both of my computers. A computer that I use has a wireless router with a reliable Internet connection. But when I click on Internet Explore looks that it starts but then it immediately disappears. When I try to connect using