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

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle create duplicate user account

Re: Oracle create duplicate user account

From: joel garry <joel-garry_at_home.com>
Date: 9 Mar 2007 14:26:34 -0800
Message-ID: <1173479193.966077.118850@h3g2000cwc.googlegroups.com>


On Mar 9, 1:29 pm, trp..._at_gmail.com wrote:
> Thanks for your response, I visited the URL provided and found the
> article on "How to copy all the privileges from one user to another".
> What would be the steps outside of a script for creating a user from
> scratch to be just like another user? I was able to pick out from the
> script that there were 3 table containing the privledge information
> (dba_sys_privs, dba_tab_privs, dba_col_privs). However for the sake of
> understanding I would like to see how this is done systematically from
> scratch at the beginning from creating the user through assigning
> permissions. So how would I step by step create a new user and then
> find out all that is necessary to make that user look just like
> another user. Thanks!

If you have access to metalink, there are example scripts that do what you want. For example, see Note:90449.1 for the create user statement (you can grab the one it generates and change the username and use a proper password rather than identified by values). Search metalink for "Database Scripts Library Index" but keep in mind, some of them are old and may contain old wives tails.

Note there are also docs available at tahiti.oracle.com for the complete syntax. There are probably scripts floating about on the web, of various quality.

If you have a system with the strings and grep commands a gander at a full export file (with rows=n, even) can be quite enlightening. Just grep for a known username and imagine there are semicolons at the end of the commands.

We can't just give you a standard set of commands, since grants, synonyms and privileges are site-specific, hopefully controlled by a decent DBA. In many cases, packaged applications require things to be just plain weird.

jg

--
@home.com is bogus.
http://www.folloder.com/pix/clips/smokingmonkey.swf
Received on Fri Mar 09 2007 - 16:26:34 CST

Original text of this message

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