Re: Transferring Users between databases - help wanted.

From: Doug Harris <ah513_at_Freenet.carleton.ca>
Date: Wed, 1 Dec 1993 23:32:00 GMT
Message-ID: <CHDqpD.ECD_at_freenet.carleton.ca>


In a previous article, kjw1_at_stirling.ac.uk (Dr Kevin J Woolley) asks:

> ... is there any way of creating user accounts on
>the second *with the same passwords* so that the transfer can be as
>transparent to the users as possible?

   What you are looking for is a little "undocumented feature" which is used by the import utility to restore accounts with the same password:

   GRANT CONNECT TO username IDENTIFIED BY VALUES 'encrypted password';

   I would suggest that you run a query such as this on the "source" database:

SELECT 'grant connect to ' || USERNAME ||

       ' identified by values ''' || PASSWORD || ''';'    FROM DBA_USERS;    Spool the output to a file and you have the beginnings of an SQL script to run on the "destination database". The same idea can be used on DBA_TS_QUOTAS to move tablespace quotas and everything else.

   Note: When you move to Oracle7 there is an equivalent:

   CREATE USER username IDENTIFIED BY VALUES 'encrypted password';

-- 
   - Doug Harris
     Database Administrator,
     System Development Division,
     Statistics Canada             ### Standard Disclaimer Applies ###
Received on Thu Dec 02 1993 - 00:32:00 CET

Original text of this message