DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: easy way/script to copy user ?

  1. #1
    Join Date
    Mar 2001
    Location
    Cologne, Germany
    Posts
    24
    Hi there !

    I want to create a user2 which can do everything with all objects of user1. Is there a command or procedure which I can use ?
    (I know how to grant privileges and to create synonyms, but I think there must be a more efficient way than entering more than 100 commands...)

    Commit;
    6502

    P.S.: Please excuse stupid questions, I'm no dba

  2. #2
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    Use DBA Studio to create new user like any other user.

  3. #3
    Join Date
    Sep 2000
    Posts
    47
    One way to prevent the problem in the future is to grant privileges to roles, then grant roles to the users. One way around the current problem would be to generate a script to grant the privileges to the new user. Something like:

    set heading off feedback off [etc.]
    spool grant_newuser.sql

    select 'grant '||privilege||' to user_two;'
    from dba_sys_privs
    where grantee = 'user_one';

    spool off
    @grant_newuser.sql


    Tim

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width