Home » RDBMS Server » Server Administration » User Creation Script /Thiru
User Creation Script /Thiru [message #59176] Sun, 02 November 2003 21:57 Go to next message
Daljit Singh
Messages: 290
Registered: October 2003
Location: Texas
Senior Member
Hi Thiru,

Can u tell me how to extract user creation script from the database as u mentioned?
Re: User Creation Script /Thiru [message #59184 is a reply to message #59176] Mon, 03 November 2003 05:12 Go to previous messageGo to next message
Daljit Singh
Messages: 290
Registered: October 2003
Location: Texas
Senior Member
Hi,

I found it myself and also placed in the board for others.
Re: User Creation Script /Thiru [message #59185 is a reply to message #59176] Mon, 03 November 2003 05:25 Go to previous message
Thiru
Messages: 1089
Registered: May 2002
Senior Member
I generally use some tools for reverse engineering anything..like Toad etc...

Something like this can be used :

set heading off verify off feedback off echo off term off linesize 200 wrap on

spool Recreate_Users.sql

SELECT 'create user ' || username ||
' identified ' ||
DECODE(password, NULL, 'EXTERNALLY', ' by values ' || '''' || password || '''') ||
' default tablespace ' || default_tablespace ||
' temporary tablespace ' || temporary_tablespace ||
' profile ' || profile || ';'
FROM dba_users
ORDER BY username;

spool off

This will just create the users with the same password .You will then need to take care of roles,grants etc..(scripts again )

-Thiru
Previous Topic: User Creation script for Navneet
Next Topic: migrating users form one Databas to another
Goto Forum:
  


Current Time: Fri Sep 20 08:33:02 CDT 2024