How to run a package

I am a student of plsql, how to run package? give some examples of how to self-test code and package programs

You cannot run the package
you run the procedure/function in package

Please see
http://docs.Oracle.com/CD/B10501_01/AppDev.920/a96624/09_packs.htm

>
A package is a schema object which includes subroutines, the elements and the logically related PL/SQL types.

Tags: Database

Similar Questions

  • How to run a package command line ODI

    Please can someone help me figure out how to run an ODI package from the command line without creating a scenario of the packaging.



    Appreciate your help.
    Thank you
    B

    You can not. Create a scenario and which then executes the command line.

  • How to run the packaged procedure with Ref Cursor

    Hello.
    The question may be very simple for you... but I was confused how to run
    I have the following package
    CREATE OR REPLACE PACKAGE CURSPKG AS 
        TYPE T_CURSOR IS REF CURSOR; 
        PROCEDURE OPEN_ONE_CURSOR (N_EMPNO IN NUMBER, 
                                   IO_CURSOR IN OUT T_CURSOR); 
        
    END CURSPKG;
    / 
    
    
    CREATE OR REPLACE PACKAGE BODY CURSPKG AS
        PROCEDURE OPEN_ONE_CURSOR (N_EMPNO IN NUMBER,
                                   IO_CURSOR IN OUT T_CURSOR)
        IS 
            V_CURSOR T_CURSOR; 
        BEGIN 
            IF N_EMPNO <> 0 
            THEN
                 OPEN V_CURSOR FOR 
                 SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME 
                      FROM EMP, DEPT 
                      WHERE EMP.DEPTNO = DEPT.DEPTNO 
                      AND EMP.EMPNO = N_EMPNO;
    
            ELSE 
                 OPEN V_CURSOR FOR 
                 SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME 
                      FROM EMP, DEPT 
                      WHERE EMP.DEPTNO = DEPT.DEPTNO;
    
            END IF;
            IO_CURSOR := V_CURSOR; 
        END OPEN_ONE_CURSOR; 
    
        
    END CURSPKG;
    /
    But I want to test (run) this procedure...
    But confused how to have Ref Cursor
    Could you help me in this...

    Thank you

    You must declare a variable of type T_CURSOR and pass it to the procedure like this.

    declare
      lOutCursor CURSPKG.T_CURSOR;
    begin
      CURSPKG.OPEN_ONE_CURSOR(, lOutCursor);
    end;
    
  • How to run a package on the calendar or automatic

    Is it possible to run a package on the calendar?

    For example, all our outgoing pdf to send by post mail must obtain a watermark. Doing so by hand for each lot is a lot of work.

    If I can save files in a particular folder in which Adobe running a lot on the schedule (for example, every 2 minutes), this could save a lot of work.

    Acrobat cannot be automated in this way. You will need to use other

    request to do it, or do it (execute the Action in Acrobat) manually.

  • How to run an interface or a package using SDK API

    I know how to run the scenarios generated from the interfaces or packages by using the following methods of SDK:

    Invoker RemoteRuntimeAgentInvoker = new RemoteRuntimeAgentInvoker (pAgentUrl, IVsWebBrowserUser, Ppassword)
    invoker.invokeStartScenario (pScenName, pScenVersion, pVariables, pKeywords, pContextCode, pLogLevel, pSessionName, pSynchronous, pWorkRepName);

    But I want to know if I can directly invoke a running interface/package using the API of the SDK and don't generate their scripts?

    Anyone know it and could you tell me the methods? Appreciate for your help.

    In my view, ODI SDK currently does not offer any method to run the interface or package. Although you can stop/resume a session, but cannot start a new session, so I guess that you can run manually or hand over the package and interfaces scenario for build and run through the SDK package.

  • How do I know if I can run a package proc?

    There is a view that shows this?

    Thank you

    You can check if you have the EXECUTE privilege on the packaging. There is no distinction of EXECUTE privilege at the procedure level (in the packing): you can either run all packaged procedures from the package, or any of them.

    select *
    from all_tab_privs
    where grantee=USER -- you...
      and table_name='package name'
      and privilege='EXECUTE';
    

    Funny how it's still registered in _PRIVS ALL/USER/DBA_TAB...
    Point of view comes from pre Oracle7.

  • How to run packages in the order of the sequences/ODI11g

    Hello
    I developed 10 package and I want to run these packages in order, one by one.
    When 1 package done that should start automatically 2 package when it finished then should start 3 package and package of 10.


    Concerning
    Sher

    Hello

    Generate a script for each of the 10 package.
    Then create another packet saying MAIN_PACKAGE
    Place 1 package scenario then the scenario of the 2nd package and so not until the 10th scenario package
    Join 1e-2e from line OK and will continue a 10th.

    When you run the whole package your child MAIN_PACKAGE (package1, package2,... package10) will be executed in a sequence provided no child package fails. In the case of any breach your execution stop there only.

    Thank you
    Fati

  • How to identify the time required to run a package

    Hi all

    Is the method without TKPROFF to find the time to run a package that calls a procedure.

    for the examples

    Lets say I run a packaage to SQLplus window

    SQL > Execute my_pack.bal_proc;

    (It took some time may be 4 hrs according to my watch).

    At this point if I want to find the time by a sql command that after running the package, which was the time.

    can someone help me find a query which tell what was the time required to run a package.

    Thanks n rgds
    Saaz

    Before execution:
    SET TIMING ON

    Then run your procedure. For example:

    SQL> SET TIMING ON
    
    SQL> Execute my_pack.bal_proc;
    
    PL/SQL procedure successfully completed.
    
    Elapsed: 00:00:00.00
    

    Miguel

  • Run the package to a different schema

    Hi all

    I have a very strange (at least for me) problem with a package to run in the production environment.

    The package has been installed in the application schema and in the same schema for all tables that are in the same table.

    The customer reported a slowdown in the performance of it, but if I test it in my PR env and:

    -If I run the application outside of the package, it run very fast

    -If I install the package in my personal schema and run it, it run very fast

    -If I run the package, installed on the application's schema, is very slow!

    What is the difference between these three methods?

    Thank you in advance,

    Diego

    91ca5e2c-8db6-4563-9e70-c98e10acf2ad wrote:

    OK, to start my procedure I used Notepad anonym in plsqldeveloper:

    Start

    Appuser.pkgapp.prcursors (vcode =>: vcode, pcursor =>: pcursor);

    end;

    when I try to get the cursor, with plsqldeveloper, I have different response time for:

    -package in my user-> very fast

    -package to the user of the application-> very slow

    OK - but that the above code does not recover. All this shows is a call to the procedure who, do you think, does that open the cursor.

    Once a cursor is opened the procedure who opened it has NO control over it. Only the session making the recovery is involved as is an Oracle process on the backend. But the procedure/package is NOT involved.

    If the location of the package does NOT affect actual recovery, but it can affect the execution plan used when the cursor is opened first.

    New - when you say "run the code" you tell fetch data? Or are you talking about just open the cursor as the example above shows?

    Display actual execution plan - get it from a trace file, if you need to.

    other things to say is that the number of lines to get out are some ten years.

    The question is always this THAT IS SLOW? It is the RECOVERY of these lines "a few ten at most? Or is it just open the cursor so that you can begin to pick up?

    You need to SHOW US (just tell us):

    1. WHAT you do

    2. HOW you do

    3. WHAT results you get

    4. WHAT results you expect to get

  • What is tdrc.tdrcfacade and how to run the installation wizard?

    What is tdrc.tdrcfacade and how to run the installation wizard?  My desktop creative cloud application does not open properly... it is just a blank window.

    Much obliged,

    Angiecrichards@gmail.com

    ! !

    Are Angie, you a blank white screen? What version of OS are you using?

    Here's what you can try:

    1. Blank white screen. Sign in | Creative cloud Packer
    2. New application Cloud Creative unusable: it is empty!
    3. Creative cloud Packager white screen after the Adobe ID Login
    4. Re: screen creative black cloud

    Waiting for your response.

  • How to copy a package to a schema in a file?

    How to copy a package to a schema in a file?

    need to read schema packets in the server and write as files to the customer.

    After running a query, you can export columns PACK_DDL wherever you want.

    Select DBMS_METADATA. GET_DDL (object_type-online 'PACKAGE', name => t.OBJECT_NAME, schema-online t.OWNER) as pack_ddl, t.*

    from dba_objects t

    where type_objet = 'PACKAGE '.

    and owner = 'SCHEMA_NAME ';

    OR

    Select DBMS_METADATA. GET_DDL (object_type-online 'PACKAGE', name => t.OBJECT_NAME, schema-online user) like pack_ddl, t.*

    from user_objects t

    where type_objet = 'PACKAGE '.

    -----

    Ramin Hashimzade

  • How to run a procedure with parameters in pl/sql collections?

    I created a procedure with parameter from the collection. Can somone help me how to run a procedure in passing the parameters in the collection.
    Package and how to create is successful. But I get the error message when executing the procedure.

    ORA-06550: line 3, column 19:
    PLS-00222: no function with name 'T_TAB' does exist in this scope

    I gave the example of code here. Can someone please help me solve this problem.

    -Spec package

    create or replace package pkg_dist is

    TABLE index IS THE NUMBER of t_tab_num TYPE of PLS_INTEGER;


    procedure prc_test (a t_tab_num IN,
    b IN t_tab_num,
    c IN OUT t_tab_num);
    end pkg_dist;

    -Package body

    create or replace package body is pkg_dist

    procedure prc_test (a t_tab_num IN,
    b IN t_tab_num,
    c IN OUT t_tab_num) is


    Start


    IF (a (16) = 0) then
    (16) c: = 0;
    c (17): = 0;
    c (18): = 0;
    end if;
    c (15): = (14)-(15)-a (16);
    (16) c: = b (16) /b (17);
    c (17): = 50;
    (18) c: = a (16) * 2;

    end prc_test;
    end pkg_dist;

    -executeing procedure

    declare
    TABLE index IS THE NUMBER of t_tab TYPE of PLS_INTEGER;
    x t_tab: = t_tab (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16);
    y t_tab: = t_tab (0,10,15,20,25,30,35,40,45,50,60,75,100,125,150,200,250,500);
    z t_tab;
    BEGIN
    pkg_dist.prc_test (x, y, z);
    dbms_output.put_line (z (18));
    END;

    Error:
    --------------------------------------------------------------------------------
    ORA-06550: line 3, column 19:
    PLS-00222: no function with name 'T_TAB' does exist in this scope

    My suggestion would be:

    CREATE OR REPLACE PACKAGE pkg_dist IS
    
       PROCEDURE prc_test (a IN SYS.odcinumberlist, b IN SYS.odcinumberlist, c IN OUT SYS.odcinumberlist);
    END pkg_dist;
    
    CREATE OR REPLACE PACKAGE BODY pkg_dist IS
       PROCEDURE prc_test (a IN SYS.odcinumberlist, b IN SYS.odcinumberlist, c IN OUT SYS.odcinumberlist) IS
       BEGIN
          IF (a (16) = 0) THEN
             c (16) := 0;
             c (17) := 0;
             c (18) := 0;
          END IF;
    
          c (15) := a (14) + a (15) + a (16);
          c (16) := b (16) / b (17);
          c (17) := 50;
          c (18) := a (16) * 2;
       END prc_test;
    END pkg_dist;
    /
    
    DECLARE
       x   SYS.odcinumberlist;
       y   SYS.odcinumberlist;
       z   SYS.odcinumberlist;
    BEGIN
       x := sys.odcinumberlist (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16);
       y := sys.odcinumberlist (0,10,15,20,25,30,35,40,45,50,60,75,100,125,150,200,250,500);
       z := sys.odcinumberlist (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
       pkg_dist.prc_test (x, y, z);
       DBMS_OUTPUT.put_line (z (18));
    END;
    /
    

    See you soon,.
    Manik.

  • How can we use packages start section?

    Hello guys,.

    I'm trying to write a prackages but I do not understand 1 thing, how can we start using the package body section? I mean we can write something in there, but how we run this section?

    Thank you very much.

    create or replace package my_pck
    as
    number of num1;
    end;

    create or replace package body my_pck
    as
    Start
    dbms_output.put_line (' Hello ' | num1);
    end;


    Set serveroutput on;
    Start
    / * WHAT WE CAN WRITE HERE, in order to WRITE "Hello Num ' * /.
    end.;

    861623 wrote:

    I'm trying to write a prackages but I do not understand 1 thing, how can we start using the package body section? I mean we can write something in there, but how we run this section?

    You cannot run it directly. It is executed automatically and only once when the package is loaded into memory for the first time by this session.

    Think of it as a constructor method. It is very rare that he had to use it. When it is used, for example will do something like read a parameter an array param and therefore define a local package variable. In other words, the code in the main body will be used to set the initial state (which cannot be set using declarations to initialize only variables).

  • How to run the file executable python for linux on mac?

    I have an executable file coded in python. I can run this program on linux but not on Mac.

    Do you have any idea how to run it please?

    Thank you.

    Python is available in the Terminal, which provides a unix command-line environment.

    Some python applications may need to be recompiled to run on Mac. You should maybe download and install Xcode Tools to get full access to all the compilers and related tools.

  • I can not find how to run this program on my HP50g Bessel functions...

    Hello!

    Recently, I buy my HP50g calculator and tried to find and install programs that I need... Solvesys is running, but I can't find how to operate this Bessel function program. I installed it exactly as solvesys (load the lib archive on the calculator and chargue on flash), but I can't find how to run commands, or when they are to crush with. I tried to access the list of orders directly through flash (press the arrow to the right while on archive of lib, then select from the list an eval push) but I get only a result bad argument...

    Can someone guive me a helping hand?

    The link for the program is

    http://www.HPCalc.org/details.php?id=3140

    Thanks in advance for your help

    Hi!, Ahkran:

    Happy new year and welcome to the Forum!

    (1) you need to download the library library 764, BESSEL V1.2, HP50G, in the HOME directory.

    Now, you need to install and stay permanently in memory, in any port (0, 1 or 2). Best if the option port 2 (Flash)...

    Now, reset the HP50G, with YOU and key F3 (C)...

    Find the library in Port 2, with orange right shift key and key LIB (2), with name BESSE. If necessary, use the NXT (L) key...

    Now press the function key (F1... F6), just below the word BESSE, in your HP50G.

    You have to see...

    and with NXT - key...

    Carefully read the instructions for use library 764, the .pdf file, the author.

Maybe you are looking for

  • Sufficient recovery to expert mode CD?

    Sorry - I have not find the button to meet another contribution.Thank you for the procedure for installation with a particion. The question remains: did I receive a CD of Windows XP when I got the computer? Or have I received it because everything is

  • Video call Tango for Atrix came out :-)

    Finally a videoconference for Atrix application out that cell phone users can use too (iPhone, Android). I have not yet tried, but I hope that it works.

  • slow printing/Copy

    PRINTER HP Deskjet 3052 a j611 series print slow slow copy, very very slow any ideas no ink, no power?  was working fine, then just went super slow mode sometimes takes 4hours to 5 lines or less print or adaptation / forget to deal with a photo taken

  • I'm changing my internal hard drive 500 GB to 1 TB how to start? CC = US

    How can I reboot it?

  • Thouch Tablet mouse freeze ONLY into account Admin

    I have a new laptop LG with Windows Vista. When I want in my administrator account my mouse works for a few seconds while loading, but as soon as he's done loading it will freeze. But when I connect to my account of comments it works fine. What conti