How to determine the owner of the current package?

Leave a package (which is defined with the appellant's rights: AUTHID CURRENT_USER) I want to determine the owner of this package. (We intend to deploy the same code in multiple schemas).

A solution would be to analyze the results of the DBMS_UTILITY.format_call_stack... to other ideas?

Thank you
Mike

Here's some code which proves padders suggestion

create or replace function WhoAreYou return VARCHAR2 as
begin
  RETURN SYS_CONTEXT ('USERENV', 'CURRENT_USER');
end;

create or replace procedure WhoAmI
AUTHID CURRENT_USER as
begin
    DBMS_OUTPUT.PUT_LINE('I am [' || SYS_CONTEXT ('USERENV', 'CURRENT_USER') || '].');
    DBMS_OUTPUT.PUT_LINE('You are [' || WhoAreYou() || '].');
end;

grant execute on WhoAmI to scott

exec bm.WhoAmI()

I am [SCOTT].
You are [BM].

With this approach, it does not matter if we use a synonym or someother 'usurpation' method. The 'Stunt' tell you who he is.

-Edited to complete the sentence
I suggest you avoide trying to determine synonym against the table and all these complications.

Published by: rp0428 on March 2, 2012 14:54

Tags: Database

Similar Questions

  • How to query the current setting of an element .css?

    I have an element on the stage that I'm changing when running.

    I need to know the current height of the element to be used in a calculation.

    I know how to reset the height, but is it possible, using the script, to determine the current height setting?

    TIA,

    Carolyn

    Any CSS property are accessible as mentioned seano. I would just add sym at the front, since you're on board animate. Just use the correct scope. Then you can use the variable as needed.

    var theHeight = sym.$("element1").height ();

  • How to detect the current .cfm.

    When the user is "index.cfm", how can I write a cfif tag to detect this?

    Basically I want my navigation menu to look different depending on the location of the user course I could simply change the CSS of the menu for each page, but I use cfinclude to place the menu around the site, so there is only 1 version of the menu.

    Thank you!

    Without knowing the bigger picture of your web app, here are some places/ways to determine the current page:

    If you use Application.cfc, the current page is passed as a parameter to the onRequestStart method. The setting is called "targetPage" by default (but I imagine you could change this) and it contains the path of the web root access to the page that is called. If the called page is www.mydomain.com/index.cfm, the value of this parameter would be "index.cfm".

    Example:

    You can also use CGI variables on any CML page in your application to get the name of the page. Many variables in the CGI scope, script_name is probably the best to use.

    Example:

    I hope that the above will get you started. Good luck and have fun!

  • How to find the current or next role

    In an automatic activity, how to write the code PBL to find the current role and the next activity role.

    role of role;
    role = role.find (name: "");

    Sincerely

    Hey you,.

    There is a predefined variable that you can use to retrieve the current activity, if you're inside an automatic activity. You can use it to determine the current role also.

    // use this logic to retrieve the name of the activity and role inside an Automatic activity
    logMessage activity.name + " is in the role " + activity.role.name using severity = DEBUG
    

    Inside a screenflow, you must do this in a slightly different way. You would rather 'activity' instead of 'activity' to retrieve the name of the role current, as shown below:

    // use this logic to retrieve the name of the activity and role
    //  inside a Screenflow, a Global or a Gloal Creation
    logMessage Activity.name + " is in the role " + Activity.role.name using severity = DEBUG
    

    If you want to recover the role of another activity and all you know is the id of the activity (mouse click, activity-> click on 'Properties'-> name in the field of reading only "activity id" on the right), you will use this logic:

    // use this logic to retrieve the name of the activity and role
    //  when all you know is the activity id of the activity
    act as Activity = Activity("TheActivityIdHere")
    logMessage act.name + " is in the role " + act.role.name using severity = DEBUG
    

    It will fail if you run this by using the name of the activity inside the quotation marks instead of its id.

    Hope this helps,
    Dan

  • Unable to determine the current location by this time El Capitan

    Hello.

    Recently, I have this problem with my Macbook pro. I turn on location services, as you can see...

    ... but my computer is unable to determine the current location in the date and time. Cards and find my mac are not also work more.

    Currently I have version 10.11.5 of El Capitan. It happened from one day to another, I don't update the software or anything like that.

    Thank you

    Edgar Lopes

    Turn on Wi - Fi for the information about the location.

  • How to determine the amount of memory shipped on the PXI-5114

    How to determine the amount of memory onboard, I have on my PXI-5114?

    Thanks in advance.

    Hello

    I'm sorry I didn't know you already had the map.  There is a property for NO-Scope node to determine the total amount of available memory that we can then divide down to get the memory available per channel.  Please see the vi and help below:

    This gives a shot, just drop it in a VI that you use and if it should return your memory cards.  If you don't have a LabVIEW I can probably retrieve the purchased version by querying your serial number.

    Kind regards

    Kyle S

  • How to determine the amount of memory was my pci-6115?

    How to determine the amount of memory was my pci-6115?

    I see two beaches of memory OR max.

    My PCI-6115 there 32 or 64 MB memory?

    Range of memory between 1: FE9F7000-FE9F7FFF

    Range of memory between 2: FE9F7800-FE9F8FFF

    It's an old part number for the Board 32 MB.

    -Christina

  • How to determine the number of highlight ' to write ' for DAQmx generate analog output?

    On the configuration of the stage for DAQmx generate analog output, there is a field "value to write.  I can't find any explanation for what it is, how it determines the value to enter, nor what he writes.  I am trying to go through the tutorials and it cling.

    Someone would give an explanation?

    Hello

    To write value specifies the value to write in the channels, lines or ports selected in string parameters. In other words, this value will be the value of your DC output (for example if you enter 5, your output will be 5V). To get information on different fields in SignalExpress, access help"context-sensitive help. A pane will appear in your work environment that displays the coordinates of the field when you place your pointer over them.

    For new users of SignalExpress:

    Generation of DC signals with NI DAQmx devices: step in the DAQmx build, select 1 sample (on request) in the generation Mode dropdown. You can select a programmatic input to generate, or you can remove the check mark from the check box use programmatic input and specify a value for generating in the field of value to write . NOR-DAQmx help also provides additional information about the data generation.

    Best regards

    M Ali

    Technical sales engineer

    National Instruments

  • How to determine the index of an item in a cluster?

    I have a small program that I put in place, as I'm just trying to get up to speed on Labview.  I have a boolean cluster buttons and for some reason the top button of the page is coming through as Index 3.  There are four buttons in the cluster, but for some reason, there has been a change.  The top must be Index 0.  How to do the things fixed?  I do not see how to determine the index of each button through properties.

    Thank you

    The order of items in a cluster is the same as the order that you added them. To change the order, just right click and select "rearrange controls in the group. If you use Unbundle by name, you don't care the order.

  • How to determine the amount of ink in the cartridge of 920 ink

    I'm operating a HP OfficeJet 6500 has more with HP 920 cartridges. The operating system is Windows XP. How to determine the amount of ink in the cartridges. I get a "low ink" memo of the printer, even if it's too late.

    Hello

    In the menu, press the right arrow once, then you should see an icon 'meter ink' it will show you an estimated ink level.

  • Lost admin password, how to retrieve the current password to change it?

    I forgot my Admin password, I connect on my laptop using the scanner print finger all the time and when I try to change the password for Admin it ask the password which I do not remember. How to retrieve the current password and change it in Windows 7 Home premium?

    It's a laptop Acer 5738 G

    You can change your current password as follows:

    1. click on start.
    2. type the three letters cmd in the search box.
    3. press on Ctrl + Shift + Enter
    4. click on "run as Administrator".
    5. type the following command and press ENTER after each:
    NET user "user %%nom" 123456

    Now the password is 123456. While dealing with accounts and passwords: having a single admin account on a PC is about the same as having a unique key for your car. What happens if you lose? He lost? Break it? A robust Windows Setup requires at least the following:

    • Two admin accounts fully tested, with their passwords to record on paper.
    • A password key file. Click Start / Help, then search for help on "password". Follow the instructions to create a key on your USB flash drive file so that you'll never find yourself in this uncomfortable situation.
  • How to determine the operator of mobile telephony with Blackberry?

    Is it possible (and how) to determine the mobile operator uses the user on his Blackberry in my own applications?

    RadioInfo.getCurrentNetworkName)

    Oops... just realized it's webworks... Well, the above, that's how you do it in Java-_ -.

  • How to get the current timestamp in C++ to the BB10 project

    Please help me how to get the current timestamp in C++. Thanks for your help!

    Following your suggestion,

    QTime is only for a day.  http://developer.BlackBerry.com/Cascades/reference/QTime.html#details

    I found "QDateTime" of references of the API: http://developer.blackberry.com/cascades/reference/qdatetime.html#toTime_t

    QDateTime = now QDateTime::currentDateTime();
    timestamp long = now.toTime_t ();

    But I got an error. I searched but no results are clear:

    -variable 'QDateTime now' initializer has but
    incomplete type
    -type incomplete "QDateTime" used in the nested name
    specifier of

    I am a newbie. So thank you for your help

  • How to get the current wording of the BlackBerry device with the BlackBerry App?

    Hello!

    I'm new to BlackBerry,

    Can u tell me pls, how to get the current language of the device using the program...

    PLS, suggest me...

    Locale.getDefaultForSystem () will give you the regional settings currently selected.

  • How to set the current date in the datetimepicker in qml?

    Hello

    Can I know how to set the current date in the DateTimePicker in QML?

     DateTimePicker {
                        id: datePicker
                        mode: DateTimePickerMode.Date
                        title: "Date"
                        value: "2013-11-20"
                        maximum: "2013-11-20"
                    }
    
    Container {
        DateTimePicker {
            id: picker5
            title: "DateTimeQml"
            mode: DateTimePickerMode.DateTime
            value: { new Date(); }
        }
    }
    
  • How to determine the size of the file and the pixel of an image?

    How to determine the size of the file and the pixel of an image?

    1 MB is 2 ^ 20 bytes. It is easy to represent long:

    final long MegaByte = 1048576L; //1048576 is 2^20 and L denotes that this is a long
    if(fileConn.fileSize() > MegaByte)
    {
    do something here
    }
    

Maybe you are looking for

  • Commandos battle pack

    I bought Commandos: battle pack (which has 2 and 3 commandos) on the DVD for my Mac.  But when the disc starts there is a 'go' circle on the Commanods 2 and Commandos 3 install buttons.  The explanation is that Power PC is not configured to install t

  • M127fn LaserJet MFP Pro: Hp Laserjet help

  • Satellite 5105 and 5205 video output bad piece (US)

    The video output is good on the 5105. The image on the LCD will not give a complete picture. Thirdly, the bottom is either hidden or replica the upper third of the image. Most likely, I see a drooping white or gray. This occurred when starting, too.

  • Satellite Pro 405CS back to the stages of condition shipping factory & help

    After weeks of searching US/Canada/Europe Toshiba sites, I've updated the Bios, & when I failed to get Toshiba Card Manager v1 or v3 (or Phoenix Card Manager "pcmplus3") to co-exsist w/WFWG 3.11 and give me access to an assortment of cards PCMCIA (PC

  • HP 15 laptop: hp 15 screen problem r blue

    HI, I JUST BOUGHT hp 15 product number r: LOE96A #ABV AND its been 3 months and each time each time I doo a few navigation heavy or some work as software development. the laptop display a blue screen with an error in driver_IRAQL_NOT_LESS_OREQUAL (rt