Execute procedure in a package using the caller privileges?

Is it possible to execute a procedure within a package using the privileges of the caller rather than the privileges of the package owner? So if we have a procedure that does a select, one that does an insert, and another for update and a 4th for delete, then we just want to grant execute to user X on the select procedure in the package. This is a developer request. I think I just need to tell the requestor to copy or move the procedure out of the package and into it's own procedure so that it's safe to run by user X and not grant execute on the package since I don't believe it is possible to specify what procedures in a package are granted execute since that command is a blanket for the whole package right?
Example - fails due to specifying the proc:
grant execute on scmemaname.pkgname.procname to usr;
There's no other command to do that is there?
Thanks,
Dave
Edited by: Gib on Jan 19, 2010 8:42 AM

AUTHID is at the package level ... not the individual function or procedure.
Create a second package.

Similar Messages

  • Why do I get error -17500 when calling a batch file using the call executable step type?

    I am calling a batch file using the call executable step type. If the path to the batch file contains a space I get error -17500 and a message stating there was an error in "Post". For example the path to the batch file is "c:\TestWin\Test Files\...\Program.bat" When I run this I get the above mentioned error, however if I change my directory structure so the path is now "c:\TestWin\TestFiles\...\Program.bat" it runs fine. I use the browse feature to find my batch file so it is not me typing in a path incorrectly. I have removed the batch file and I get a different error stating that it couldn't find the file so it appears that for my error it can find the file but can't run it. I am
    sure that this has something to do with the fact that batch files are written in DOS but really don't want to resort to changing my directory structure on all my test stations. Is there any way to fix this problem so I can leave a space in my path?

    It appears I have figured it out. This was on another computer so I was unaware of how they used their computer. I like you got it to work in the temp directory and in fact got the program.bat file to work as long as I put it under the temp directory, but when I switched out to my TestWin directory it wouldn't work, so I removed everything from the directory except the batch file it self and it work. What I found out after adding files in one at a time is that the person had a file called "Test" with no file extension in there "c:\TestWin\" directory. Removing this file made it work. Putting the file back broke it. So it appeares that when teststand was running it followed the path saw a space and attempted to grab the "Test" file instead of bro
    wsing into the "Test Files" directory. If you create a file in your temp directory called "temp" with no file extension you will see the same problem. Thank you for your help.

  • Errors when using the Call statement for MS SQL Server

    I've tried executing a Stored Procedure using the Call method of Portal 2 Go. But it gets an internal error b/c of it. Any Ideas why and how to resolve?

    Hello,
    Which version of SAP BOBJ XI3.1 you are using?
    What I am aware is BEGIN_SQL was very well working for SQLServer2005 in case of ODBC connection.
    Can you try one thing for SQLServer2008 have a Native driver installed on your client machine and use ODBC connection rather than OLEDB connection.
    If that works fine, its good
    Otherwise you can raise a message for resolving this problem with the support team.
    Thanks,
    Vivek

  • When using the online editor in our wordpress blog on any other online editor I get this error "Your browser security settings don't permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl+X)" Please help.

    I have online editors for our blog and websites for generating articles and blog posts. Different editors from different sites and programmers. Firefox doesn't allow me to use the cut/paste/copy functions with these editors. I get this message or something similar every time. "Your browser security settings don't permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl+X)"

    See:
    *http://kb.mozillazine.org/Granting_JavaScript_access_to_the_clipboard
    *https://addons.mozilla.org/firefox/addon/852 - AllowClipboard Helper

  • Can the iPhone have settings profiles?  I want the settings of what apps are using the "call home" automatically set based on my location or the time of day.  Is this possible?

    Can the iPhone have settings profiles?  I want the settings of what apps are using the "call home" automatically set based on my location or the time of day.  Is this possible?  Of course the GPS location feature will need to be on in order for this to work.  But the idea here would be to optimize battery life by disabling the 'call home' requests of apps.  The settings profile should also support downloads as I would like to download and allow it when I am on WiFi but not so much when I am using my cellular data.

    No, this is not possible as the sandboxed nature of iOS would not allow any app to modify another app like that. Such a feature would have to be enabled by Apple as a part of iOS itself. You can submit feedback to Apple about the idea if you wish to.
    https://www.apple.com/feedback/

  • Executing A Procedure In a Package Using DBLink

    I need to execute a procedure which is residing in a package using dblink.
    The package got a execute PUBLIC grant.
    When I execute the following statement, I am getting error ORA: 00904, Invalid Identifier
    select PKG_NAME.PROCEDURE_NAME@dblink(null,null,null,null,null,null,null,null,null,null,null) from dual
    How can I execute the above statement.
    Thanks in advance

    I have a database INLABNEW in that i have done this
    SQL> create table temp(no number)
      2  /
    Table created.
    SQL> create or replace package pkg
      2  as
      3     procedure p;
      4  end;
      5  /
    Package created.
    SQL>  create or replace package body pkg
      2   as
      3      procedure p
      4      is
      5      begin
      6             insert into temp values(1);
      7      end;
      8   end;
      9  /
    Package body created.
    SQL> select * from temp
      2  /
    no rows selectedNow i executed the procedure pkg.p from another database
    SQL> exec pkg.p@to_inlabnew
    PL/SQL procedure successfully completed.
    SQL> commit
      2  /And i query the table tmp in INLABNEW
    SQL> select * from temp
      2  /
            NO
             1Now question is have you given your procedure name properly.
    as your procedure is in a package it should be Your_package_name.Your_procedure_name@Your_db_link

  • How to schedule job to execute after 5 seconds gap using the program

    Hi ALL,
    How to schedule the program to run after 5 seconds to execute using JOB_OPEN,JOB_CLOSE,SUB_SUBMIT function modules in which parameter I should give this 5 secnods?
    Regards
    mahesh

    Hi,
    You can use the import parameters of function module JOB_CLOSE
    SDLSTRTDT & SDLSTRTTM
    to pass the required start date and time (respectively) of your background job. That is, if you want the job to be scheduled and start at a fixed time (as in your case 5 seconds in the future), you can determine the start date and time as 5 seconds ahead of sy-uzeit and pass the resultant values to the mentioned importing parameters.
    Cheers,
    Aditya

  • How can I use the call's list?

    Dear friends,
    I have some problems with a call I received and with my boss.
    On my Iphone 4S I can see the list of the last calls. Let's say that I have a 45minutes incoming call from my friend. Looking the detail by the arrow, on the right, I can see also other information, like the complete number and the lenght of the call (45 min, in this case).
    Now the point: someone heard me during the call and said I got that phone call form someone else!
    I replied that is not possible: you can modify the name of the contact, in this case it seems that I got the call from the new name, but I also showed that if you modify the number too (yes, it's possible) the call disappears from the call list!
    Now I have the complete call list and I can show that the "trick" is not possible, but they don't believe me and, since the question is quite important, I'm risking to loose my job.
    Can someone give me the confirmation that is not possible to do this? I mean, I want to be sure of my theory that no one can change name and number of the call and keep the call amongst all the other calls...
    Many thanks in advance for your help!
    Mark

    You cannot use your iPhone as a normal storage system. The only way to get documents and other stuff on it is to sync via iTunes (unless you use an app like evernote, which has its own sync).

  • How to Execute a Web Template Without Using the Cache?

    Hi All,
    I am trying to execute a webt emplate to determine performance and optimisation. The trick is that the web template starts using the cache. Is there any way to turn off the cache for the web template? Maybe using a URL parameter or something?
    Thanks in advance for any assistance provided.

    Hi,
    You can do it thru RSRT, choosing HTML, the query and the template, then in the menu you have to check the box dont use cache, aggragates and BIA.
    Regards, Federico

  • Executing procedures with OUT parameters using Named notation

    I have a procedure with two out parameters (p_errortext and p_returncode) and i want to execute this proc in SQL*plus using named notation(using association operator ' => '). For position based execution i usually declare variables to hold the OUT parameter's value. But how can i do this while executing using named notation (using => )
    begin
         packagename.generate_ref_record(p_userid  => 'THELMA',
                                      p_ref_code       => '9A',
                                      p_item_id    => '9990000011163',
                                      p_shipno     => '0PH',
                                      p_errortext  =>  ??
                                      p_returncode =>  ??);
    end;

    SQL>variable x varchar2(30);
    SQL>variable y varchar2(30);
    SQL>exec packagename.generate_ref_record(p_userid  => 'THELMA',     
                                          p_ref_code       => '9A',       
                                          p_item_id    => '9990000011163',     
                                          p_shipno     => '0PH',     
                                          p_errortext  =>  :x        
                                          p_returncode =>  :y);

  • I cannot use the call feature with my contacts i always have to input each number manually anyone have a resolution

    hi there guys i have an iphone and have an issue i hope someone can help me with.
    If someone calls me and i store their number in contacts,when i go into the contact and press dial it comes back the number cannot be recognised,but if i dial the exact same number then i have no problems.
    I have switched off my siri incase this is an issue but it still causes me problems.
    Bit of a downer having to manually dial each number.
    Cheers for any info supplied

    * If the menu bar is hidden then press and hold the Alt key down, that should make the Menu bar appear (Firefox 3.6 on Windows) (see [[Menu bar is missing]]).
    * Make sure that you have the ''Navigation Toolbar'' and other toolbars visible: View > Toolbars .
    * If items are missing then see if you can find them in the View > Toolbars > Customize window.
    * If you see the item in the Customize window then drag it back from the Customize window to the Navigation toolbar.
    * If you do not see that item then click the Restore Default Set button in the View > Toolbars > Customize window.
    See also [[Back and forward or other toolbar buttons are missing]] and [[Navigation Toolbar items]]
    See http://kb.mozillazine.org/Toolbar_customization

  • Calling a procedure from a package or another procedure

    Hi all,
    I am trying to call a couple of procedures defined in a package using the 'call' method without any success.
    i tried to create a third procedure and call the other two procedures from there, still without success. Can some one tell me the right method? also i've been trying to research a lot, but havent found any helpful documentation. where would i look for good help material on PL/SQL?
    Purvi.

    All Oracle's documentation is available online at http://tahiti.oracle.com. In particular, the PL/SQL User's Guide would probably be the most helpful to you.
    "call" is something that is generally used on client applications (ODBC and JDBC based). It is not used when calling stored procedures in PL/SQL. If you have procedures proc1 and proc2, you can call them from a third stored procedure proc3 like this
    CREATE OR REPLACE PROCEDURE proc1
    AS
    BEGIN
      dbms_output.put_line( 'proc1' );
    END;
    CREATE OR REPLACE PROCEDURE proc2
    AS
    BEGIN
      dbms_output.put_line( 'proc2' );
    END;
    CREATE OR REPLACE PROCEDURE proc3
    AS
    BEGIN
      proc1();
      proc2();
    END;If both proc1 and proc2 were in a package called myPkg, and proc3 was a standalone procedure, you would need to modify it to reference the package name
    CREATE OR REPLACE PROCEDURE proc3
    AS
    BEGIN
      myPkg.proc1();
      myPkg.proc2();
    END;Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Use OCIDescribeAny to describe Procedure in a package?

    I used the following code retrieve the parameter information for
    procedures:
    OCIDescribeAny(svchp, errhp, objptr, objp_len, OCI_OTYPE_NAME,0,
              OCI_PTYPE_PROC, deschp);
    if (OCIAttrGet(deschp, OCI_HTYPE_DESCRIBE, &parmh, 0,
    OCI_ATTR_PARAM, errhp))
              return ;
         if (OCIAttrGet(parmh, OCI_DTYPE_PARAM, &arglst, 0,
    OCI_ATTR_LIST_ARGUMENTS, errhp))
              return ;
         if (OCIAttrGet(arglst,OCI_DTYPE_PARAM, &numargs, 0,
    OCI_ATTR_NUM_PARAMS, errhp))
              return ;
    If I pass a procedure which exists in a package, I will get a
    object does not exist error. How can I describe a procedure in a
    package using OCIDescribeAny ? Thanks.

    I tested it in the SQL Worksheet (rather than the PL/SQL editor), but I see the same behaviour as you when I try with your example in the PL/SQL editor. A little testing suggests that the problem is that the completion insight doesn't understand the context of where it is in the PL/SQL and so doesn't know what options to list.
    If I try adding the end for the new procedure and then going back to after the "(":procedure Proc_test_call
    is
    begin
    pkg_test2.proc_test2(
    end proc_test_call;I just get begin and declare as options - ie completion insight thinks I am no longer in scope of the package (as other package components not listed) and starting a new block.
    If I try adding an assignment before the procedure call (not logical, I know, but I had been testing with a function in my schema):procedure Proc_test_call
    is
    begin
      result := pkg_test2.proc_test2(I get what we should (parameters for proc_test2 and local scope items).
    Your workaround of adding the closing backet for the procedure call helps the completion insight understand the context of where it is and so it can give the right options.
    I have previously avoided parameter completion insight as earlier versions had big performance problems when connected to a schema with a large number of PL/SQL objects (our main schema has 5.5 million records in all_arguments), but the performance has certainly been fixed. However, the PL/SQL editor still seems pretty hit and miss as to whether the parameter completion insight works, which seems largely to be because it doesn't always the context of where it is in the PL/SQL.
    theFurryOne

  • How to execute a cvs command using System Call?

    hi all,
    how to execute a cvs login command using system call ?
    thanks,
    dam

    To anyone that reached this post and still dont have a hint, try this small sample - it logs on CVS using installed CVSNT and execute a fake update:
    package testeCVS;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.io.PrintWriter;
    public class execCMD
        String password="yourPassword";
        String directory="C:\\CVS\\yourPathToProject";
        //send commands to CVS and shows the resulting screen
        public int sendCMD(String[] command) throws IOException, InterruptedException
            ProcessBuilder pb = new ProcessBuilder(command);
            pb.directory(new File(directory));
            pb.redirectErrorStream(true); // merge stdout and stderr
            Process p = pb.start();
            InputStreamReader isr = new  InputStreamReader(p.getInputStream());
            BufferedReader br = new BufferedReader(isr);
            String lineRead;
            StringBuilder buffer=new StringBuilder();
            System.out.println("Return of shell:");
            while ((lineRead = br.readLine()) != null)
                buffer.append(lineRead + "\n");
            System.out.println(buffer.toString());
            return p.waitFor();
        //send commands to CVS, send the password after the prompt and show the resulting screen
        public int sendDialogCMD(String[] command) throws IOException, InterruptedException
            ProcessBuilder pb = new ProcessBuilder(command);
            pb.directory(new File(directory));
            pb.redirectErrorStream(true); // merge stdout and stderr
            Process p = pb.start();
            PrintWriter writer = new PrintWriter( new OutputStreamWriter( p.getOutputStream() ));
            writer.println( password );
            writer.flush();
            InputStreamReader isr = new  InputStreamReader(p.getInputStream());
            BufferedReader br = new BufferedReader(isr);
            String lineRead;
            StringBuilder buffer=new StringBuilder();
            System.out.println("Return of shell:");
            while ((lineRead = br.readLine()) != null)
                buffer.append(lineRead + "\n");
            System.out.println(buffer.toString());
            return  p.waitFor();
        public static void main(String a[]) throws IOException, InterruptedException
            execCMD e=new execCMD();
            String[] command = new String[5];
            command[0] = "cvs";
            command[1] = "-q";
            command[2] = "-d";
            command[3] = ":pserver:yourUserID@localhost:2402/path/of/yourProject"; //in this case using CVS port 2402
            command[4] = "login";
            System.out.println("exit value=" + e.sendDialogCMD(command));
            command = new String[8];
            command[0] = "cvs";
            command[1] = "-q";
            command[2] = "-d";
            command[3] = ":pserver:yourUserID@localhost:2402/path/of/yourProject";
            command[4] = "-n";
            command[5] = "-q";
            command[6] = "update";
            command[7] = "-dA";
            System.out.println("exit value=" + e.sendCMD(command));
    }It is possible to send the password on the same command, but I had problems when the password had the character '@' because CVSNT took it as the separator between the username and server name. In that case the command is: ":pserver:yourUserID:yourPassword@localhost:2402/path/of/yourProject"

  • To access a package, the calling class must reside in the root/parent direc

    My goal was to be able to access my package from anywhere within the
    high level root folder (d:\zJava). But it seems the invoking class MUST
    RESIDE IN THE TOP LEVEL PARENT DIRECTORY of the package. Was Java
    designed to behave this way?
    D:\zJava\zsamples\com\zswingpackage1>     <-- packages successfully compiled here
         swing_optgrp_eg1.{class/java}
              package com.zswingpackage1;
              public class swing_optgrp_eg1 extends JFrame implements ItemListener {
    D:\zJava\zsamples\com> <-- classes residing here could NOT successfully                    access the package 'com.zswingpackage1'. The third                    level subfolder is 'com'.
         package_test4.java
              /* Following import stmt. causing RUN-TIME error "Exception in thread     "main" java.lang.NoClassDefFoundError: com/zswingpackage1/swing_optgrp_eg1". */
              import com.zswingpackage1;
         Package_Test4.class          
         /* Unsuccessful remedies:
         i) D:\zJava\zsamples\com>java Package_Test4
                   -classpath .;d:\zJava\zsamples\com\zswingpackage1
                   -classpath .;d:\zJava\zsamples\com
                   -classpath .;d:\zJava\zsamples (also used in compile)
                   -classpath .;d:\zJava
         ii) ran from the root/parent directory of the package d:\zJava\zsamples),with and without classpath i.e.
              D:\zJava\zsamples>java com\Package_Test4 [-classpath .;d:\zJava\zsamples]
         iii) ran from the top level directory (d:\zJava), with and without classpath i.e.
              D:\zJava>java zsamples\com\Package_Test4 [-classpath .;d:\zJava\zsamples]
         Possible causes:
              - maybe the above behaviours are by design i.e. the calling class/program CANNOT be stored within the package hierarchy?
    D:\zJava\zsamples\net> <-- classes residing here could NOT successfully access the package 'com.zswingpackage1'. The third level subfolder is 'net'.
         package-test6.java
              /* Following import stmt. causing RUN-TIME error "Exception in thread "main" java.lang.NoClassDefFoundError: com/zswingpackage1/swing_optgrp_eg1". */
              import com.zswingpackage1;
         Package_Test6.class
         /* Unsuccessful remedies:
         i) D:\zJava\zsamples\net>java Package_Test6
                   -classpath .;d:\zJava\zsamples\com\zswingpackage1
                   -classpath .;d:\zJava\zsamples\com
                   -classpath .;d:\zJava\zsamples (also used in compile)
                   -classpath .;d:\zJava
         ii) ran from the root/parent directory of the package (d:\zJava\zsamples), with and without classpath i.e.
              D:\zJava\zsamples>java net\Package_Test6 [-classpath .;d:\zJava\zsamples]
         iii) ran from the top level directory (d:\zJava), with and without classpath i.e.
              D:\zJava>java zsamples\net\Package_Test6 [-classpath .;d:\zJava\zsamples]
         Possible causes:
              - maybe the above behaviours are by design i.e. the calling class/program MUST be stored in the parent folder of the package hierarchy?
    **D:\zJava\zsamples>     <-- classes residing here SUCCESSFULLY accessed package 'com.zswingpackage1'. NO -classpath parms. were necessary!
    D:\zJava\ <-- classes residing here could NOT successfully access the package 'com.zswingpackage1'. Similar scenarios as above.
    D:\zJavaB\ <-- classes residing here could NOT successfully access the package 'com.zswingpackage1'. I purposely created another folder with the 'B' suffix. Similar scenarios as above.
    My PC configuration:
         java version "1.4.0_01"
         Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03)
         Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode)
         JRun 4 (Build 47304)
         WinNT 4.0 SP5
         IE 5.50
         CLASSPATH=.;D:\jakarta-tomcat-3.3.1\lib\common\servlet.jar;
              C:\JRun4\servers\default\default-ear\default-war\WEB-INF\classes
         JAVA_HOME=C:\j2sdk1.4.0_01
         Path=C:\j2sdk1.4.0_01\bin;C:\WINNT\system32;C:\WINNT;
              C:\Program Files\Network Associates\PGPNT;C:\Program Files\MTS;d:\MSSQL7\BINN
    Thank you so much for your expertise.

    Hello,
    I think that you use the import-declarations incorrectly.
    Your code says:
    import com.zswingpackage1;
    ... The meaning of the above declaration is the following: Import the class "zswingpackage1" from the package "com". The compiler cannot find that class, but it is probably never asked to find it in your code, so it won't report an error.
    If you want to import the whole package use the following declaration instead:
    import com.zswingpackage1.*;
    ... That means: import all classes from from the package "com.zswingpackage1".
    You can also import just the classes needed, e.g.:
    import com.zswingpackage1.swing_optgrp_eg1;
    ... I hope that does the job.
    S&oslash;ren

Maybe you are looking for

  • Search results showing the source before the document title

    Hello, I have created a BI Catalog in Sharepoint 2010, which consists mainly of libraries with rdl items and I have also set a content source in Search Service to search into these libraries. Search results were fine, but after the last crawl I have

  • Why does the text look blurry sometimes in Firefox 4?

    Whenever I use Firefox 4 on my Toshiba Windows 7 64 bit, it doesn't happen but using it on a Lenovo with 7 64 bit, this problem happens. It doesn't happen everytime I use it and happens on sites that I have visited before that were previously unblurr

  • Closed Caption Subtitles on Netflix via Apple TV

    The Netflix website says that the show Dexter has subtitles. I have enabled the subtitles / closed caption options on my 2010 Apple TV. Yet they don't show up. Is it me? Did I missed something? Did I enable closed captions the wrong way? Is the Netfl

  • Address book "List" no longer sends .. have screenshot to show error

    I have been using "Lists" in my address book to send multiple emails. There must have been an update recently since I can no longer get the lists to work (any of them) and I get an error I have never seen before, nor understand what I can change to u

  • Acrobat Pro Extended

    I've been wondering for several years about why the Extended version is NOT offered for the Mac platform. Does anyone know the reason?