Package / procedure dba_procedure

Hello

I have a package with two procedures and I will try to find procedures by querying DBA_PROCEDURES.

Could not find the procedure, but I can see them in the package.

Should all procedures be not in dba_procedures or dba_objects?

Thank you

Hello

DBA_PROCEDURES will show you only the procedures/functions which are not deprived of the packaging (that is to say, they are declared in the package specification).

Tags: Database

Similar Questions

  • Backup Tables, triggers and packages/procedures

    Oracle 11.2 and Developer SQL 3.2.

    For the backup of the data, I use OEM/Rman to schedule a backup.  My understanding, these are usually data only (physical backup).

    Now, I want to make the backup of the logic for the tables, packages/procedures and triggers.  I currently use Oracle SQL Developer to export as separate SQL files.

    I wonder if there are any other options to save the tables, procedures and triggers?

    Currently I am guard three types of backups:

    (1) creation of user scripts, role and grant the user privileges.

    (2) tables, packages/procedures and triggers saved via Oracle SQL Developer

    (3) data ora saved through OEM

    Total crash of DB, I'll run the script to create users, role, and grant privileges.  Then log in as an authorized user and run the sql scripts to create the tables, procedures, packages, and triggers; Finally, to recover the data via RMAN.

    Is this a good practice for backup/recovery, or there are ways to do better?

    Thank you.

    Scott

    scottjhn wrote:

    Oracle 11.2 and Developer SQL 3.2.

    For the backup of the data, I use OEM/Rman to schedule a backup.

    Additional OEM backup.

    The backup operation is made by rman.

    My understanding, these are usually data only (physical backup).

    RMAN backup of the physical database.  Technically, it makes copies of data blocks in the data files.  He does not know, nor she cares, that contains a given block.  And this data block "term" is wider than you can imagine.  Consider this: the entire database - tables, indexes, the data dictionary (which itself is nothing more than a collection of tables), stored the DDL, code compiled... everything fits in these data files and data files are all made up of blocks of 'data '.

    Now, I want to make the backup of the logic for the tables, packages/procedures and triggers.  I currently use Oracle SQL Developer to export as separate SQL files.

    I wonder if there are any other options to save the tables, procedures and triggers?

    That's what rman.  backup of tables, procedures, triggers,... everything.

    Currently I am guard three types of backups:

    (1) creation of user scripts, role and grant the user privileges.

    (2) tables, packages/procedures and triggers saved via Oracle SQL Developer

    (3) data ora saved through OEM

    Total crash of DB, I'll run the script to create users, role, and grant privileges.

    DB crash, you want to have a database to run these scripts.  You will FIRST need to restore/recovery database... backups rman.

    Then log in as an authorized user and run the sql scripts to create the tables, procedures, packages and triggers.

    ; You don't have to run all the scripts, because all the tables, procedures/packckages, and triggers will have already been restored by rman when he corrected/restored the database.

    Finally, retrieve the data via RMAN.

    And, precisely, what do you think this means at this point?

    Is this a good practice for backup/recovery, or there are ways to do better?

    There are much better ways.  Especially what you describe will not work.

    You have a serious misunderstanding on what rman is and does.  You need to spend some serious time, read the rman users guide, at https://docs.oracle.com/cd/E11882_01/backup.112/e10642/toc.htm

    And, FWIW, I would NOT recommend depending on the OEM manufacturer to plan backups or perform a recovery.

  • How to know the name (package, procedures or functions) for current sessions

    Hi all

    I am DBA and I want to find a way to get the object name regardless (packages, procedures or functions) for the current statement running in the current session.

    To specify when I open the browser session of Toad, I can see the active sessions and the current statement for each session, but without the name of the object.


    Is it possible to know this point.

    Thanks in advance

    Select *.

    from dba_objects

    When object_id in (select nvl (t.PLSQL_ENTRY_OBJECT_ID-1)

    v $ session t

    where sid = 452)

    -----

    Ramin Hashimzade

  • The packaged procedures, subsidies and reports

    My custom label warning: I'm a newbie, forced to be a generator of queries of database by need, please bear with my horrible explanations. I searched Google this until the end of google and can not find an answer to my particular problem, if I was able to solve many questions to get here - so, I'll try.

    Now, I have determined that a NOTICE that I had written for purposes of end-user reports using crystals, our 11 g database, wasn't going to work. I needed to integrate date parameters IN the body of the view/query. So I thought I'd build myself a packaged procedure.

    This works. It gives me the data I want (when I am logged in as owner of the schema).

    HOWEVER - I now understand that the procedures work as seen in that, if I have specific tables selected, in the procedure, users who run it must have separate SELECT privileges on each table referenced in the procedure? I don't have to do it, with a view, aren't I right? If I build a view and a PUBLIC SYNONYM for this point of view, and grant SELECT to the role that users have, they can see the data.

    And to continue that - I - I also understood I must grant EXECUTE on each individual USER privileges and cannot accomplish role, with a packaged procedure?

    Thank you!

    Hello

    EM says:
    Now, I have determined that a NOTICE that I had written for purposes of end-user reports using crystals, our 11 g database, wasn't going to work. I needed to integrate date parameters IN the body of the view/query.

    I don't know what you mean by 'embed' date settings.
    There are ways to have a view depend of parameters, such as the view does not have to be recompiled when the parameters change. I wouldn't say that the settings are included in the view. In addition, different sessions can use the display at the same time, each (potentially) with its own parameters.
    One way to store the parameters so that the view can refer to them is a global temporary Table.
    (Variables SYS_CONTEXT is another, but for the DATE parameters, I think a global temporary table would be easier).

    So I thought I'd build myself a packaged procedure.

    This works. It gives me the data I want (when I am logged in as owner of the schema).

    HOWEVER - I now understand that the procedures work as seen in that, if I have specific tables selected, in the procedure, users who run it must have separate SELECT privileges on each table referenced in the procedure?

    There are 2 types of procedures: AUTHID DEFINE and AUTHID CURRENT_USER.
    AUTHID DEFINE is the default value. When the tracks of the procedure, everything inside is done with the privileges of the owner of the procedure, so that the owner of the procedure needs the privileges on the tables, views, and other necessary procedures. The user who runs it must only EXECUTE privileges on the procedure itself.
    AUTHID CURRENT_USER is as you have described above. One who executes the procedure needs privileges on all objects referenced in the procedure.

    I don't have to do it, with a view, aren't I right? If I build a view and a PUBLIC SYNONYM for this point of view, and grant SELECT to the role that users have, they can see the data.

    It's true. If, for example, they want to make reference to the view from their own point of view, or in the stored procedures, but no not just to use the view in queries, users need additional privileges. Notice that this is similar way privileges are dealt with in the AUTHID DEFINE procedures.

    And to continue that - I - I also understood I must grant EXECUTE on each individual USER privileges and cannot accomplish role, with a packaged procedure?

    No, EXECUTE privileges can be granted through roles.
    Perhaps you are blend with the privileges of the object. If the procedure is AUTHID DEFINE, then the owner of the procedure must have all the necessary privileges granted directly, not by a role. This only applies to the owner; others who call the procedure just EXECUTE privilege, and it's okay if this privilege comes through a role.

    I don't know very well your needs, but it looks like you want really a view and a way to specify settings that does not need to grant privileges to each individual user. If so, a view and a global temporary table to hold the settings, sounds like a good option. You can grant SELECT on the view privileges and all privileges on the global temporary table, in a role. users will no longer have this role.

    If you want help, CREATE TABLE and INSERT to your base tables statements, two sets of parameters and the content of the display you want to see for each set of parameters.
    Do you want the settings to default values? Give an example.

  • Tlist to reliable independent package/procedure/function

    I want to know the list of tables with is not in the package/procedure and function.

    I did a procedure to find a few tables, but do not come from this procedure. It is not also the view user_source. But the tables are usued on this particular package.


    create table procedure_name (proc_name varchar2 (30), varchar2 (30)) from table_name;

    CREATE OR REPLACE PROCEDURE prc_table_found IS
    cursor c1 is select table_name DISTINCT from user_tables;
    v_table_name varchar2 (30);
    v_str varchar2 (10000);
    TYPE t_procedure IS TABLE OF THE user_source.name%TYPE;
    l_tab t_procedure;
    BEGIN
    Open c1;
    loop
    Fetch c1 into v_table_name;
    OUTPUT WHEN c1% NOTFOUND;
    v_str: =' select distinct name from user_source
    where the text like ' | " ' ||' %'|| v_table_name | » %'||'''';
    dbms_output.put_line (v_str);
    execute immediate v_str in bulk collect into l_tab;
    If l_tab.count > 0 then
    for me in l_tab.first... loop of l_tab. Last
    Insert into procedure_name (proc_name, table_name) values (l_tab (i), v_table_name);
    commit;
    end loop;
    on the other
    null;
    end if;
    end loop;
    Close c1;
    END;

    exec prc_table_found;

    Select distinct table_name from user_tables
    less
    Select distinct procedure_name tbl_name
    ;

    Hello
    http://download.Oracle.com/docs/CD/B14117_01/server.101/b10755/statviews_2513.htm

    Something like that

    select *
      from user_tables t
     where t.table_name not in ( select distinct e.referenced_name
                                   from user_dependencies e
                                  where e.referenced_type = 'TABLE'
                               )
    

    Edited by: user6806750 the 14.10.2011 01:00

  • Check the package/procedure for a user level privileges

    Hi gurus,
    How to check the package/procedure for a user-level privileges? as dba_tab_privs for the tables.

    for example: grant execute on User1 dbms_scheduler.
    now I must verify that user1 has run on dbms_scheduler privilege or not.

    What is the advice for this?

    Thanks in advance,
    Charles
    SQL> select privilege, count(*) from dba_tab_privs group by privilege order by 1;
    
    PRIVILEGE                       COUNT(*)
    ---------------------------------------- ----------
    ALTER                               19
    DEBUG                              256
    DELETE                              131
    DEQUEUE                            3
    EXECUTE                           19315
    FLASHBACK                          52
    INDEX                               14
    INSERT                              137
    MERGE VIEW                          36
    ON COMMIT REFRESH                     52
    QUERY REWRITE                          52
    
    PRIVILEGE                       COUNT(*)
    ---------------------------------------- ----------
    READ                                7
    REFERENCES                          54
    SELECT                                3752
    UNDER                                3
    UPDATE                              111
    WRITE                                5
    
    17 rows selected.
    

    DBA_TAB_PRIVS is more than simple tables.

  • Call a package.procedure that accepts an array type.

    I get the error message "Error (45.20): PLS-00330: incorrect use of the name of type or subtype" when I run the SP procedure when it calls the d.is_date procedure that accepts an array as the second parameter.

    Here's the short code for package.procedures that contain the "is_date.

    I tried several things and can't seem to get the SP to compile.
    Thank you.



    create or replace
    PROCEDURE SP ACE

    valid_out boolean;
    date of date_out;
    date_fmt_out varchar2 (30);

    type of Mask_Tabtype is
    table of varchar2 (30)
    index of directory;

    FMT Mask_Tabtype;

    BEGIN
    FMT (1): = 'fxDD-MON-RR ';
    FMT (2): = 'fxDD-MON-YYYY ';
    FMT (3): = 'fxDD-LUN;
    FMT (4): = ' fxMM/DD ";
    FMT (5): = ' fxMM/RRRR ";

    d.Is_Date ('test', Mask_Tabtype, Valid_out, Date_out, Date_Fmt_out);

    END SP;


    create or replace package d as

    type of Mask_Tabtype is
    table of varchar2 (30)
    index of directory;

    FMT Mask_Tabtype;

    Procedure Is_Date (Value_in in varchar2,
    Tab in Mask_Tabtype,
    Valid_out Boolean
    Date_out date,
    Date_Fmt_out out varchar2);
    end of;



    create or replace package body d as
    Whole Fmt_Count;
    Date of Date_Val: = null;
    Date_Fmt varchar2 (30): = ' fxMM/JJ/AAAA ";

    Procedure Is_Date (value_in in varchar2, Mask_Tabtype tab,
    Valid_out Boolean, Date_out date, Date_Fmt_Out out varchar2)
    is

    Start
    / * Logic here removed to make more small
    .........
    */
    End Is_date;
    End of;

    Ah, it's because you have tab_masktype stated in the package and in the calling code.

    Change your PS procedure declaration to be:

    Fmts d.Mask_Tabtype;
    

    and there is no need to declare Mast_tabtype in this procedure.

  • Global variables packed... rather than packaged procedure parameters...

    Hello
    There is only one version of procedures packed with parameters that are called in the following diagram.
    Package test
      function A(p1)
        as
         begin
           return x;
         end;
        
      procedure test1(x1 ..... ,
                             x2 tab%rowtype)
         as
           local_1 .....;

           begin
               ....
              local_:=A(p=>....);  /*the function is called*/
              test2(x3=>x1,    
                       x2=>x4);      /*the below procedure is called*/ 
           end;

      procedure test2(x3 .....,
                              x4 tab%rowtype)
       as
         begin
             .....                 /*before the commit another procedure
                                     is called (which is also declared in this package
                                     but is not written here....)*/
             insert into .....
             commit;
         end;
    Instead of passing parameters of the procedure for the procedure to be used in the last procedure, namely in test2, I consider to change the schema above and declare a packaged global variable which are available to all procedures in the package...
    Something like...
    package test
    as
        x1 ......;
       x2  tab%rowtype;
       <other variables>
      function A;
      procedure test1;
      procedure test2;
      ......
    Is there another way...?

    Note: I use DB 10.2.0.4
    Thank you
    SIM

    the only danger is almost simultaneously in the same session
    two executions of the packaged procedures/functions are running

    But that can never happen.

    A session is single-threaded (I don't know if it's the correct term).

    You cannot run two... things... at the same time.

  • The call to package.procedure thanks to DAD and it says error HTTP 404 not found

    I have a url works fine with package.procedure which has some html and JavaScript as follows:

    http://hostname:port/dad_name/package.procedure

    Regardless of the procedures in this package works very well. But when I create a new package with a different name and the same procedures, it gives me
    Not found
    The requested URL /dad_name/new_package.procedure was not found on this server.

    Both packages have same subsidies. I'm missing something.

    Is - this WHAT FATHER modplsql has any place where he lists the objects that can be accessed via the URL? I checked the dad.conf, he has not an exclusive list in there.

    Thanks in advance
    KK

    you did not mention the name of schema. did you?
    What server component applications do you work?

  • Copy the package/procedure of a diagram to another diagram

    Dear all,

    I have two of the schema in a single database. I need to copy all A scheme procedures in scfhema B.Is there an easy way to copy only the packages and procedures? If there is no code existing please let me know.

    Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    PL/SQL Release 11.2.0.1.0 - Production

    "CORE 11.2.0.1.0 Production."

    AMT for Linux: Version 11.2.0.1.0 - Production

    NLSRTL Version 11.2.0.1.0 - Production

    Regsards,

    S.Balraj

    Dear all,

    Here's the good explantion

    http://www.ulaska.com/Oracle/copy_object_between_schemas.html

  • How to pass objects in PL SQL packaged procedure as parameters to java

    Hello

    His summer job where I created type next. But when we used inside the package, it does not work...

    create or replace package pack1

    T_n ARRAY TYPE IS NUMBER (10);

    PROCEDURE insrt_pay (p_array IN t_n, p_values OUT NUMBER) IS

    v_cnt NUMBER (10): = 0;

    BEGIN

    BECAUSE me in 1... p_array. COUNTING LOOP

    v_cnt: = v_cnt + (i) p_array;

    END LOOP;

    p_values: = v_cnt;

    END;

    end pack1;

    It is now possible in 12 c:

    JDBC reference information: use of Types of PL/SQL

  • 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;
    
  • Newbie - how to import the package, procedures, etc.?

    I used the "data export", the computer of the developer, expoty tables, export procedures, export Packages, etc. in a file
    SQL Developer.

    In Sql Developer, how to import tables, import procedures, import packages on my computer "REAL LIVE"?

    I want to copy the Package, the copy procedure, etc. 'computing Developer' to computer "LIVE REAL DATA?


    TIA
    Steve42

    If you have access to 2 databases of your sqldev client (and therefore have connections put in place for both of them), just run the export file obtained from the DB dev as a script (F5), using the connection to the production DB (drop-down menu at the top right).

    Have fun
    K.

  • 1.5.4 - packages, procedures and triggers are gone

    I recently downloaded and tried to start using the new version of SQL Developer, and I had to spend for my work soe because triggers and a few packages and procedures are not appearing in the navigation area.

    Any ideas?

    Restored dba_ queries * in the line of code 2.0.

  • Oracle Package.Procedure execute privileges

    What Oracle DataDictionary Table contains the user privileges to
    run a different patterns of procedures-


    Thank you!

    I am not giving you the complete SQL statement...

    But

    Select do.owner, table_name, object_type privilege from the PAO, DBA_OBJECTS DO DBA_TAB_PRIVS
    where dtp.owner = and table_name =
    and dtp.owner = do.owner and dtp.table_name = do.object_name
    /

    Let us know the results. Only the Table_Name columns store package names?

Maybe you are looking for

  • Windows XP error number updated 0 x 8024402

    Support for Windows XP supposedly does not stop until April 8, 2014.  Yet, I can't get the security updates, whenever I try, I get the Windows Update error number 0 x 8024402.  I am running Windows XP with service Pack 3.  Is there any solution for t

  • The program executable has stopped working

    Remember - this is a public forum so never post private information such as numbers of mail or telephone! Ideas: You have problems with... of programs a SSC downloaded for smpt installation Error messages. the program executable has stopped working..

  • Failure to install Windows security update, error code 800706BA and 800706BE

    Several updates failed to install last week Windows security.  800706BE and error code 800706BA were cited as the problem. How can I fix it?

  • Unknown Unsecapp.exe in the wbem folder.

    A few days ago, I noticed a new program running in the task called unsecapp.exe Manager. It is in C:\Windows\System32\wbem\ and size 47 104 bytes. The description is "Sink to receive asynchronous callbacks for WMI client applications. Ending the proc

  • drive internal

    I have an extra internal drive WD200 BB-200DEAD can I do an external hard drive, USB