Run procedure as another user
Hi all,
how do I run procedure as another user?
Just connect as that 'another user' and run the procedure?
If that isn't what you're looking for then explain in more details (database version, etc) please.
See:
{message:id=9360002}
edit
In addition to the other mentioned options:
You might want to check out CURRENT_SCHEMA.
"The CURRENT_SCHEMA parameter changes the current schema of the session to the specified schema. Subsequent unqualified references to schema objects during the session will resolve to objects in the specified schema. The setting persists for the duration of the session or until you issue another ALTER SESSION SET CURRENT_SCHEMA statement.
This setting offers a convenient way to perform operations on objects in a schema other than that of the current user without having to qualify the objects with the schema name."
http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_2013.htm#SQLRF53050
Edited by: Hoek on Mar 4, 2013 1:44 PM
Similar Messages
-
Question re: JDS/gnome/X and running smc as another user
Running Solaris 10 on Sun VirtualBox, have one user account in 'Staff' where I want to administer some aspects of my system for the time being as part of best practice for administration. I login to my user account, open a terminal, su - root and then run smc&. I get an error in the terminal window about DISPLAY environtment variable not being set. echo $DISPLAY reveals that it is null, so I export DISPLAY=hostname:0 and then try to run again and I still get the message. I am able to execute smc& from the shell prompt if I am logged into the root session. The only change I have made to the system operations at this point was to move /export/home to a different disk/slice and that mounts fine so and should not have caused an error anyway. If I execute xauth as root and list I get something like this:
hostname:0 {encryption type} {RANDOM}
hostname/unix:0 {encryption standard} {RANDOM}This is to say it would appear to be that this is set correctly. [This example|http://docsun.cites.uiuc.edu/sun_docs/C/solaris_9/SUNWabe/ADVOSUG/p33.html#NETWORKAPP-88347] leads me to believe that a null DISPLAY should still allow programs to process by the Xserver/gnome .
My question then is:
- How can I run smc from another users session or must I log into a session as root?
- If DISPLAY is incorrectly set, how can I configure my system to create accounts with the correct settings?
I should note that *xhost +*, while it disables the access control, has no affect on the outcome of executing smc&.Running Solaris 10 on Sun VirtualBox, have one user account in 'Staff' where I want to administer some aspects of my system for the time being as part of best practice for administration. I login to my user account, open a terminal, su - root and then run smc&. I get an error in the terminal window about DISPLAY environtment variable not being set. echo $DISPLAY reveals that it is null, so I export DISPLAY=hostname:0 and then try to run again and I still get the message. I am able to execute smc& from the shell prompt if I am logged into the root session. The only change I have made to the system operations at this point was to move /export/home to a different disk/slice and that mounts fine so and should not have caused an error anyway. If I execute xauth as root and list I get something like this:
hostname:0 {encryption type} {RANDOM}
hostname/unix:0 {encryption standard} {RANDOM}This is to say it would appear to be that this is set correctly. [This example|http://docsun.cites.uiuc.edu/sun_docs/C/solaris_9/SUNWabe/ADVOSUG/p33.html#NETWORKAPP-88347] leads me to believe that a null DISPLAY should still allow programs to process by the Xserver/gnome .
My question then is:
- How can I run smc from another users session or must I log into a session as root?
- If DISPLAY is incorrectly set, how can I configure my system to create accounts with the correct settings?
I should note that *xhost +*, while it disables the access control, has no affect on the outcome of executing smc&. -
Grant to let user just see a procedure from another user!
Hi,
Is there a GRANT to let a user see a procedure from another user but not compile it?
Tks,
Paulo.The problem is that is not just one procedure, but more then 30 and a lot of developments want this privilege.
Tks,
Paulo
ps: can you help me on my other post "ALTER TABLESPACE tbs READ ONLY" --hang -
Hi, first of all, sorry for my pour english.
I'm system in a db, and i need to run a job from another user. I don't have the password. Theres a way to run this job?
It's a oracle db 10g enterprise.
Thanks in advice.I have the permissions, and I can't change the user password or application may stop. There's a way, but I just can't remember:
PRIVILEGE
ANALYZE ANY
UNLIMITED TABLESPACE
CREATE TABLE
ALTER TABLESPACE
ALTER DATABASE
GLOBAL QUERY REWRITE
CREATE MATERIALIZED VIEW
SELECT ANY TABLE
8 linhas selecionadas.
Decorrido: 00:00:00.21
PRIVILEGE
FLASHBACK
DEBUG
QUERY REWRITE
ON COMMIT REFRESH
REFERENCES
UPDATE
SELECT
INSERT
INDEX
DELETE
ALTER
FLASHBACK
DEBUG
QUERY REWRITE
ON COMMIT REFRESH
REFERENCES
UPDATE
SELECT
INSERT
INDEX
DELETE
ALTER
FLASHBACK
DEBUG
QUERY REWRITE
ON COMMIT REFRESH
REFERENCES
UPDATE
SELECT
INSERT
INDEX
DELETE
ALTER
SELECT
SELECT
SELECT
SELECT
SELECT
SELECT
SELECT
SELECT
SELECT
SELECT
SELECT
SELECT
EXECUTE
EXECUTE
EXECUTE
EXECUTE
EXECUTE
EXECUTE
EXECUTE
EXECUTE
EXECUTE
EXECUTE
EXECUTE
EXECUTE
EXECUTE
SELECT
SELECT
EXECUTE
EXECUTE
EXECUTE
WRITE
READ
WRITE
READ
WRITE
READ
69 linhas selecionadas.
Decorrido: 00:00:00.48
GRANTEE GRANTED_ROLE ADM DEF
SYSTEM MGMT_USER NO YES
SYSTEM TRIPOA_READ YES YES
SYSTEM DBA YES YES
SYSTEM TRIPOA_WRITE YES YES
SYSTEM AQ_ADMINISTRATOR_ROLE YES YES
SYSTEM TRIPOA_EXEC YES YES
SYSTEM PRIV_DML_STUDENTSLOG YES YES
SYSTEM PRIVILEGE_ALL_TRIPOA YES YES
8 linhas selecionadas. -
Hello all,
Can i run opmnctl command with another user that have the same groups of the oracle user?
Thanks for attention.Depending on what command you are running it might work (e.g. status) but you will run into issues (known and unknown) for most of the commands (start/stop) unless you know and tweak all directories/files permissions.
As an example, OPMN maintains a file under directory called "states" (under $OH/opmn/logs directory) that gets auto generated/updated every time either OPMN or managed process(es) is started or stopped. The default permissions on this directory is 700 which means can only be operated on by owner (the user that installed the product).
Along with directories/files permissions there is process ownership issue too. When a component is started its corresponding process(es) is owned by the user who owns the OPMN server process. If a different user (different than who actually started OPMN server) starts one of the managed process it might collide and might lead into some unknown issues.
So to be safe and being in "supported" mode it is always recommended to use the same OS user that was used to install the product.
Thanks
Shail -
Running iTunes as another user - iTunes window keeps popping up
My missus and I have one iPod and want to just use one library on iTunes (hers). Therefore when I want to use iTunes, I run it under her user credentials ("Run as" option in Windows XP).
This loads her library & settings no problem, but the iTunes window pops to the front every 30 seconds, even when minimised to the system tray. Obviously this totally interrupts what I am doing on the PC.
I believe this has only started happening since iTunes was updated to 9.0.2.25. Note - this symptom doesn't happen if I run iTunes under my own credentials, or if the missus is logged on it doesn't happen to her. Both PC accounts are full administrators.
Any advice welcome. Thanks.If you're using Windows Live Messenger or have it running in the background - uncheck the option to show your current song as your personal message.
-
EA 2.1. Can't edit another users store procedures.
I can't edit store procedures of another users in 2.1 ea version but i can compile it.
In 1.5.5 i can edit the same store procedure.
DB version 10g
thanks.I tried the following:
create user attest2 identified by xxxxxx;
grant connect to attest2;
grant create procedure to attest2;
grant alter any procedure to attest2;
grant create any procedure to attest2;
grant execute any procedure to attest2;
Now using SQL Developer 2.1 RC1 i can log in with attest2, i can see other users and all their packages, i can open the package and body, the cursor is in the editor but i can't type a thing. The compile button is active and working, but editing is blocked. Creating a procedure under attest2 schema and editing it there works fine.. Using a user with dba privileges also works fine.
No problem in editing other users' procedure with SQL Developer 1.5.4.
I have pretty much the same configuration as the original poster - XP SP3. Database 10.2.0.4
Andres -
Running jobs as different users
The job I am creating in the Job Scheduler needs to run SQL as several different users. I have heard that 11g will allow this. However I am wondering whether there is any way to do it in 10gR2. I have tried to embed a CONNECT user/password within the PL/SQL block as EXECUTE IMMEDIATE and stand alone. Nothing seems to work. Does anyone have any suggestions on a way to do this before 11g?
Hi,
The Scheduler can run stored procedures and pl/sql blocks but it runs all PL/SQL as the job owner. The limitation of not being able to run different SQL as different users is a PL/SQL limitation.
There is a workaround however. For each SQL that needs to run as a particular user create a PL/SQL stored procedure in that user's schema . By default (do not use the authid current_user clause) these stored procedures run with the privileges of their owner. Then grant execute on these stored procedures to the job owner. Now the job owner can call any of these procedures when he needs to run SQL as another user.
One thing to watch out for is that stored procedures do not use role privileges , so do not rely on role privileges in your SQL statements.
This should do what you need.
Hope this helps,
Ravi. -
Running jobs as severent users
The job I am creating in the Job Scheduler needs to run SQL as several different users. I have heard that 11g will allow this. However I am wondering whether there is any way to do it in 10gR2. I have tried to embed a CONNECT user/password within the PL/SQL block as EXECUTE IMMEDIATE and stand alone. Nothing seems to work. Does anyone have any suggestions on a way to do this before 11g?
Hi,
The Scheduler can run stored procedures and pl/sql blocks but it runs all PL/SQL as the job owner. The limitation of not being able to run different SQL as different users is a PL/SQL limitation.
There is a workaround however. For each SQL that needs to run as a particular user create a PL/SQL stored procedure in that user's schema . By default (do not use the authid current_user clause) these stored procedures run with the privileges of their owner. Then grant execute on these stored procedures to the job owner. Now the job owner can call any of these procedures when he needs to run SQL as another user.
One thing to watch out for is that stored procedures do not use role privileges , so do not rely on role privileges in your SQL statements.
This should do what you need.
Hope this helps,
Ravi. -
ITunes keeps restarting by itself on another user account
Problem began since I started using a new computer running Vista Ultimate, 64 bit. Even though a second account on the computer that WAS using iTunes closes it, when I go to MY account WITHOUT EVEN TRYING TO OPEN iTunes, window upon window opens telling me I can't run iTunes because another user is running it.
Then, when I go to the other account, I see iTunes OPEN! I'll close it, go to my account, and the windows keep opening again, telling me I can't run iTunes, even though I don't want to!
I wind up going to the Task Manager and closing iTunes helper and anything else I see with iTunes as the name.I am running Windows XP and I've been experiencing this problem for a little while, not sure exactly when it started happening. Everyone once in awhile when I try to launch iTunes on my main user account, it won't run because it is running on another account (which I never want it to run on). I was just coming here to see if I can stop that from happening, I only ever want to run it on my main account.
I do notice that iTunesHelper is running on both user accounts, and that is probably directly related to my issue. I just plugged in my iPod and got the message than iTunes is running on another account - my guess is, with that iTunesHelper running on both accounts, it is luck which account sees it first and launches iTunes. However I have also received this message when I manually run iTunes as opposed to just plugging it in with the auto-detection.
That iTunesHelper is pretty inconsistent - I have seen it running on one account only, both accounts, and no accounts if I look in the task list. I think that is the main problem but I don't know how to prevent it from running on secondary user accounts.
In any event this problem is not isolated to Vista, and that is the main reason why I am posting in this thread. -
I am running 10.6.6 on my mac and 10.5.8 on my server and I can not add new people to Ical on my mac but if another user on a 10.5 version of mac can. What is the issue?
Set up iCloud
Set up iCloud (2) -
Can't install Safari 4 - 'Another user is running Safari'
I was running the Beta and loved it and want the 4.0 but I'm stuck.
After running the installer I get a continual alert that says words to the affect of 'Safari is being run by another user. Quit all running Safari applications to continue' which won't go away till I shutdown and restart. The installer just stalls and won't go any further. If I force quit every application the Alert keeps popping up till restart.
Any ideas, some old Safari Beta 4 file somewhere I can trash. Unfortuantly I don't have the uninstaller that came with it any longer.Hello Paul:
I did not run the BETA Safari 4 (I NEVER use BETA software). I would suggest uninstalling the BETA Safari (that will put you back to Safari 3) and then downloading (again) Safari 4.
Barry -
Hi,
My Mac info:
Machine Name: Power Mac G5
Machine Model: PowerMac7,3
CPU Type: PowerPC G5 (3.0)
Mail Version 2.1.3 (753.1)
My mail application can send out message but can't receive new e-mail now ? please see attached before my capture screen
and some software(adobe illustrator cs) and applications(terminal) can't run ? please see attached
but in another user account, terminal and illustrator can run.
Please kindly help to check with these problems. Thanks.Verify and Repair disk “Data”
Checking HFS Plus volume.
Checking Extents Overflow file.
Checking Catalog file.
Checking multi-linked files.
Checking Catalog hierarchy.
Checking Extended Attributes file.
Checking volume bitmap.
Checking volume information.
Volume Header needs minor repair
Repairing volume.
Rechecking volume.
Checking HFS Plus volume.
Checking Extents Overflow file.
Checking Catalog file.
Checking multi-linked files.
Checking Catalog hierarchy.
Checking Extended Attributes file.
Checking volume bitmap.
Checking volume information.
The volume Data was repaired successfully.
Mounting Disk
1 HFS volume checked
Repair attempted on 1 volume
1 HFS volume repaired -
Running a Report like another user
Hi there!
I'm would like a user to be able to run an "account index report" on a subset of resources.
I see that only users that have "Top" as scope of control may be able to run this report. The question is... is it possible to define the report task to be executed as another user (ie: configurator)? How? Using the <RunAsUser> directive?
thanks to everybody !!
giovanniI think it has to be "Top", because the Account objects (the accounts in the account index) are in Top. Unless there's a way to move them to a different organization the controlled org has to be Top.
One workaround is to use the "include" and "exclude" objects of the Admin Role. They let you fine-grain exactly which objects to be included or excluded.
Hope this helps. -
I can't run my free trial download because another user had a different trial that's expired. How do I fix this?
Without any details to explain the situation, the only thing I can offer is that once a trial has been used on a machine it can not be used again as a trial on that machine. To fix it you would have get a new machine or wipe out the current one and make it appear new.
Maybe you are looking for
-
I tend to ramble when it comes to asking questions so I'll just sum it up briefly before I add any further details: I am looking to have my macbook pro (I believe late 2011 version-out of warranty) cleaned inside out: dust removed, keyboard cleaned a
-
Laptop will not boot up without the windows xp disc...which i don't have
i've got a toshiba satellite m115-s1064. when i turn the laptop on it boots up and says 'insert cd labeled windows xp professional cd-rom' i don't have this disc and no disc came with the laptop...what are my options here. i've thought about wiping t
-
F110 Payment Proposal multiple payment lines for same vendor
Hello, Question for the FI community regarding single payments for multiple invoices for the same vendor. Is there any other place that would dictate the grouping (or non grouping) of multiple payment proposal lines for same vendor payment? I underst
-
Clicking on a weblink in an Outlook email fails to open the website in Firefox even when the browser is already open. Firefox is set as default browser. There was no problem with this before the latest Firefox update a few days ago. I have tried chan
-
Why does my iMac now ask for a password when trying to create a folder in Finder?
Hi guys My iMac has started to ask me for my login password when I try and create a new folder using Finder. I concert folders on the desktop and drag to the correct location in Finder and I can also create folders in the tree view of Adobe Bridge bo