Can i create any procedure or function inside a oracle reserve package?

Hi!
Can i create any procedure or function inside a oracle reserve package. Suppose, I want to create a function called x in the dbms_output package. Can i do that? Or can i extend the features of this package and create/derived a function from it like we extend any class in JAVA. I'm not sure - whether this is at all possible. I'll be waiting for your reply.
Thanks in advance.
Satyaki De.

No, but you can write a wrapper package and use that instead of using the Built-In package directly. So, instead of calling DBMS_OUTPUT, you call your own Package.
Steven Feuerstein wrote a wrapper for DBMS_OUTPUT, called P:
Re: DBMS_OUTPUT.PUT_LINE

Similar Messages

  • Can we create a procedure inside a procedure

    DB version:11g
    hi ,
    Just wanted to ask you guys like can we create a procedure inside a procedure...if not is there any alternative??
    in db2 it is allowed so do oracle support this????
    thanks

    You probably would have been able to tell quicker if you'd just given it a go yourself.
    As Justin showed it's perfectly possible, though I don't personally subscribe to Justin's view that it's rarely appropriate. I go on the principle that if the functionality of a procedure/function is to be used in more than one place then it should be declared independently, but if it's a case of writing a procedure that has to perform a lots of functionality, some of which may be re-used several time within that procedure, then breaking that down into nested procedures for modularity and re-use within it is good practice and makes for more readable and maintainable code.
    So, I would say it's more a case of "it depends" and good design will dictate whether procedures should be nested or seperate.

  • Does GRANT CREATE ANY PROCEDURE auto grants EXECUTE on created obj to user?

    I have a User ABC which has GRANT CREATE ANY PROCEDURE on schema XYZ. Now, I create a new Function in schema XYZ using my ID ABC named "func123". My question is, would my User ID ABC being creator of func123 be able to EXECUTE it by default ???
    Note: ID ABC has not been explicitly given GRANT EXECUTE on this func123 function, neither it has GRANT EXECUTE ANY PROCEDURE on schema XYZ.
    Thanks in advance.

    There is no such thing as 'create any procedure on schema xyz'. When an user has create any procedure, he can create a procedure in any schema, including SYS.
    You have an unprotected and unsecured database by granting this powerful privilege to multiple users.
    Also when you create a procedure in a different schema, that schema becomes the owner, not the user creating it.
    Kindly brush up your basics and (re)read documentation.
    Sybrand Bakker
    Senior Oracle DBA

  • Checking for EXECUTE priviledges on any Procedure or Function

    Hi All,
    I know that the table DBA_SYS_PRIVS can be used to check the priviledges for any object.
    But after querying the view, I could see the priviledges on diff packages and other tables but could not find any Procedure or Function name ( Standalone or packaged) in the view.
    Where else could I find the same?
    Having execute priviledge on compelte package means having same on its contents( procs,functions etc)..is this right?
    Rgds,
    Aashish S.

    Aashish,
    You have object privileges (CREATE TABLE, ALTER TABLE and system privileges (ALTER SYSTEM, ALTER USER). They serve different purposed.
    DBA_SYS_PRIVS is for system privileges only.
    You can not have seen privileges on packages, at least not EXECUTE privileges.
    These are in DBA_TAB_PRIVS.
    Packages are granted at the package level.
    Sybrand Bakker
    Senior Oracle DBA

  • How to find out list of procedures and functions inside a package

    How I can find out the list of Procedures and Functions inside a Package.

    Look at ALL_PROCEDURES and ALL_ARGUMENTS.

  • CREATE ANY PROCEDURE privilege

    Hello,
    According to my exam prep source,
    A user having the CREATE ANY PROCEDURE system privilege can also alter, drop, and execute the PL/SQL subprograms in his own schema as well as other schemas without any further privileges being required.
    I have run a test and this appears to be *******. I (as SYSDBA) granted the privilege to SCOTT, created (as SCOTT) a procedure in HR, and tried (as SCOTT) to execute that procedure, and it didn't work. So it would appear my source is incorrect.
    Similarly, SCOTT is unable to DROP or ALTER the procedure that he just created.
    Is there any way at all to find out what other privileges, than the obvious (create a procedure in any schema) are attached to this system privilege. This kind of information does not appear to be easy to find and it would be useful, rather than having to spend time creating and recreating scenarios to try to deduce what the "set" of privileges attached to a named privilege actually are.
    Of course, what is really desired, is something that works not just for CREATE ANY PROCEDURE, but for any privilege. 
    Thanks.

    Your exam prep source is not correct, see the example below. I hope it wasn't a book I wrote or edited. If it was, send me the details and I'll make sure the publisher includes this in the errata. It is frighteningly easy for such things to slip through the technical edit process.
    orcl> create user jw identified by jw;
    User created.
    orcl>
    orcl> grant create session,create any procedure to jw;
    Grant succeeded.
    orcl> conn jw/jw
    Connected.
    orcl> create procedure scott.p1 as begin
      2  null;
      3  end;
      4  /
    Procedure created.
    orcl> exec scott.p1
    BEGIN scott.p1; END;
    ERROR at line 1:
    ORA-06550: line 1, column 13:
    PLS-00904: insufficient privilege to access object SCOTT.P1
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    orcl> drop procedure scott.p1;
    drop procedure scott.p1
    ERROR at line 1:
    ORA-01031: insufficient privileges
    orcl>

  • I can't create any new reminders on my iPhone 5S with iOS 8.

    Hi.
    I have a 16 GB iPhone 5S with iOS 8.1.3. The problem I have is that I can't create any new reminders, at all. The problem started with my iPhone 4 (which I had before this phone), and I was using iOS 7 when the problem arose (but it didn't start immediately after I switched to iOS 7).
    One day when I had the iPhone 4, I noticed that all my reminders had disappeared, and that I couldn't create any mew ones because the New List + button is grayed out. I didn't try to fix it until I got my 5S. I got to the "Scheduled" list and was able to type in a reminder (I thought I was a genius). But then when the time I'd set for the reminder actually came around, nothing happened, and when I checked Reminders, the reminder I'd entered was gone.
    I tried using Siri to set a reminder but she said she couldn't.
    I've tried Googling it, but it just says to press the + button to make a new list, and then start typing.
    I recently got a MacBook Air which I synced up to my phone, and all my old reminders from my iPhone 4 are there, and I can create new reminders. Except they don't show up on my phone (which I think they're supposed to do, right?). They do show up on my computer, though.
    I've taken to emailing myself things I need to remember, which is fine, I guess, but sometimes they get buried in my inbox.
    Any help would be fantastic!
    Also, if you'd like me to clarify anything, I'm happy to do so because I don't know how much sense this makes.
    Thanks so much!

    I have exactly the same problem. I discovered it yesterday.
    I have a 16 GB iPhone 4 with iOS 7.1.2, just to note that we both are using different devices and different iOS versions. I will add here some screenshots of the problem.
    Main view of the application when opened (the only tappable elements here are the search bar and the clock icon on the top):
    Result of tapping the search bar and searching for an existing reminder:
    Result of tapping the clock for showing scheduled reminders:

  • Can we call a procedure within function?

    Can we call a procedure in function?
    If yes, then please explain with example.
    Thanks
    Aman

    Why don't you try it?
    SQL> set serveroutput on
    SQL> declare
      2   procedure p1 (
      3    i1 in out number
      4   )
      5   as
      6   begin
      7    i1 := 200;
      8   end p1;
      9   function f1
    10   return number
    11   is
    12    l1 number;
    13   begin
    14    p1(l1);
    15    return l1;
    16   end f1;
    17  begin
    18   dbms_output.put_line(f1);
    19  end;
    20  /
    200
    PL/SQL procedure successfully completed.
    SQL> set serveroutput off

  • TS4002 Can't create any alias in iCloud mail, see message "Cannot save alias.

    Can't create any alias in iCloud mail, see message "Cannot save alias. This alias cannot be saved at this time". I tried different variations at different dates (I thought this is temporary issue) but this not helped me. Perhaps some of you have resolved this issue and can tell me how I can do it?

    Do you see in account settings two email addresses - with "@me.com" and "@icloud.com"? Or only "@me.com"? In second case just wait - your account will be updated in some time. I've waiting from summer and my account was updated in one day as soon as I've start this discussion   When your account will be updated - you will see in preferences two addresses, with "@me.com" and with "@icloud.com".

  • JOLT_CAT:1083: "ERROR: Error assigning connection request, can't create any more handlers"

    We are trying to connect a WebLogic Application server through Jolt to Tuxedo.
    We have the our MAXWSCLIENTS=100, and are trying to create a single connection
    pool through WebLogic. The errors reported in the logs are:
    121813.nprkscope01!JRAD.6155.1.0: GP_CAT:1569: ERROR: Unable to lock network mutex
    -1 at 95
    121813.nprkscope01!JRAD.6155.1.0: JRAD_CAT:1526: INFO: JRLY connection is UP
    121813.nprkscope01!JSL.6151.1.0: JOLT_CAT:1083: "ERROR: Error assigning connection
    request, can't create any more handlers"
    121814.nprkscope01!JSL.6151.1.0: JOLT_CAT:1083: "ERROR: Error assigning connection
    request, can't create any more handlers"
    I have attached the configuration file we are using. Any advice would be appreciated.
    Thanks
    [ubbsimple]

    Hi,
    I am running Netweaver 7 and ERP2005.
    J2EE support pack is 9. The sap note that you mentioned is for NW2004 and our system is running on NW2004s.
    Now I am trying to reconfigure the sld. In case if you can suggest me another solution, I will be very happy to try that out...
    Thanks for your reply
    Edited by: Rakesh Bothra on Apr 20, 2011 4:23 AM

  • Can i moved any column position at runtime, like ORACLE APPLICATIONs.

    Can i moved any column position at runtime, like ORACLE APPLICATIONs.
    ( move left - right ..... )
    Thank you

    Najeeb ur Rehman
    Thank you very much

  • How can i create a Global Temporary Table inside a Stored Procedure....

    Hi...
    I need to create a Global Temporary Table inside a Stored
    Procedure....
    I have no idea how to do that....
    Please....if u can send me a sample, send to me....
    Thanks a lot

    To create a global temporary table inside a stored procedure,
    the minimal syntax would be:
    CREATE OR REPLACE PROCEDURE procedure_name
    AS
    BEGIN
    EXECUTE IMMEDIATE 'CREATE GLOBAL TEMPORARY TABLE table_name'
    || '(column_name NUMBER)';
    END procedure_name;
    As Todd stated, it would probably be better to create the global
    temporary table outside of the procedure:
    SQL> CREATE GLOBAL TEMPORARY TABLE table_name
    2 (column_name NUMBER);
    Table created.
    You can also specify things like ON COMMIT PRESERVE ROWS or ON
    COMMIT DELETE ROWS.
    It may be that there is something else, like a PL/SQL table of
    records or a cursor, that would suit your needs better. It is
    difficult to guess without knowing what you want to do with it.

  • How can I use the procedures and functions in my library

    hello, all
    I have a pl/sql library MYLIB.pld, MYLIB.pll and MYLIB.plx.
    How can I invoke procedures and functions there in JDeveloper?
    Thanks.
    Damon

    I am indeed using ADF BC to re-develop the oracle application.
    Here is my situation:
    We have an oracle form application.
    Our objective is to try to re-use the existing sources in the form application as much as possible:
    1. tons of procedures and functions in a pl/sql library(a file with extension name portfolioLib.pll or portfolioLib.plx);
    2. tons of form-level triggers, data-block triggers and item-triggers;
    3. tons of database stored procedures and triggers;
    After doing a research on JDeveloper, we decide to use ADF Swing+ADF BC to re-develop the application.
    My opinion for the above three kinds of sources in our form application is:
    for 1: we try to move most of procedures and functions into database(except Form build-in);
    for 2: we try to wrap those triggers in a SQLJ class;
    for 3: we try to call database procedures and functions with PreparedStatment or CallableStatement;
    I just do a test on a post-query trigger on a data-block:
    I created a sqlj file, named testSQLJ.sqlj in the test.view package;
    I tried to call it in createInstanceFromResultSet of testDeptVOImpl.java which is test.model package,
    I was told that testSQLJ cannot be found there. why?
    How can I call some classes from test.view package in some classes of test.model?
    I read some documents about how to deal with post-query trigger in JDeveloper: create a view with SQL statement, but it seems that it does not support pl/sql statement there.
    Can you give me some opinion about the above stuff?
    I really appreciate your help.
    Damon

  • Create stored procedure or function of pl/sql in jdeveloper

    How can we create a stored procedure or function of pl/sql in jdeveloper 11.1.2.1.0? And how it will be called? Please help me?
    Edited by: mrs on 4 Jul, 2012 3:07 AM

    I am a beginner to jdeveloper and adf so please give a step by step method for how to create a stored procedure of pl/sql in jdeveloper 11.1.2.1.0

  • Can We Create Vehicle as a Functional Location??

    Dear experts,
    Can we create a vehicle as a functional location?
    can any one suggest me?

    We have already developed this enhancement in functional location tab for the report of cars
    used in our organization.
    we are developed new tabs also in notification to capture the running kilometers  and OT hours,
    User will enter the starting time and ending time and enter the name of the employee who has taken this vehicle.
    according to the rate of vehicle we have given in functional location additional tab total cost will come in report.
    we have already created this report and it is working fine.
    could you please suggest me is this the correct way of approach of creating the report for vehicle cost?
    if not what is the impact on the system?
    please suggest me
    Thanks ,
    Sunil Boya

Maybe you are looking for