Thanks very much,
I also want to login as other user , how can I do,
I don't know passwd, don't want change the user 's
passwd, is there a command in ORACLE , like
in Unix -- su - "regular user", to connect as
a regular user of oracle ?
But you can fake it by creating public synonyms for all the user's objects (you can do this with a spool script using: SELECT * FROM user.user_objects, etc), this saves you a) from prepending the username prior to the objects and b) will allow you to run packages, triggers, etc as though you were the user themselves. You can tidy up behind you by dropping the synonyms again.
In my experience the only legitimate reason to log in using someone else's id is to do maintenance on database links. I once had drop and recreate a db link that was private to an id for which I didn't know the password. It's possible to do this without asking the user to divulge the password. The technique is to temporarily alter the password to something else, log in using the temporary password, do the maintenance, and then alter the password back to the original value. To accomplish this, do the following:
select username,password from dba_users
where username='XYZ';
That command will give you an encrypted password for user XYZ. Let's say it's A1F68170B272BEF7. Be sure to save it! You will need it later to restore the original password.
Alter user XYZ identified by temp_password;
connect XYZ/temp_password
{do required maintenance}
Alter user XYZ identified by values 'A1F68170B272BEF7';
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.