Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Disable certain users from login to database while applying Human

Re: Disable certain users from login to database while applying Human

From: Abul Fazal <angmokios_at_yahoo.com>
Date: Wed, 20 Feb 2002 02:13:24 -0800
Message-ID: <F001.00413F8A.20020220021324@fatcity.com>


Probably this might help u to arrive at a solution rather than giving the actual solution

In certain situations, you may want to log in to another schema to operate on that user's objects like granting privileges, but you don't know the password for that schema and you can't wait until that user is available to assist you. Consider this situation. A typical database has the following users:

SYSTEM
SYS
MATERIALS
ACCOUNTS Assume you don't know the password for both MATERIALS and ACCOUNTS, but you want to grant privileges on MATERIALS's objects to the ACCOUNTS schema immediately. You can't achieve this objective by logging into SYS or SYSTEM schema. You should have to log in to that schema for granting privileges to others. That is, you should have to be the owner to grant privileges on the objects. At the same time, you should not disturb the existing password of the MATERIALS schema. You can perform both the objectives using the following steps:
1. Connect as SYSTEM or SYS schema and issue the following sql command:
SQL> select 'alter user '||username||' identified by values '''||password||''''

              from dba_users 
              where username='MATERIALS';

This will return a statement like the one below

alter user MATERIALS identified by values 'D0DCC7D6877E8507'; Preserve this statement, as it will help you reset the original (existing) password after finishing the work.

2. Set the new password for the MATERIALS schema by giving the following sql command:

SQL> alter user materials identified by password;

Here you can set any password temporarily to complete the objectives.

3. Log in to the MATERIALS schema, grant the privilege on certain objects to the ACCOUNTS schema and whatever jobs you want to complete in that schema.

4. Connect as the SYS or SYSTEM schema and execute the preserved statement.

SQL> alter user MATERIALS identified by values 'D0DCC7D6877E8507'; This will reset the password to the previous one, and the user's work won't be affected.

Cheers
Fazal


Abul Fazal
Production Support Services - Quantum Leap Standard Charted Bank
Singapore
HP : 65-94887900

Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Abul Fazal
  INET: angmokios_at_yahoo.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Feb 20 2002 - 04:13:24 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US