Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2006
    Location
    Mumbai, India
    Posts
    26

    Question Unanswered: Tricky Question!!! Enjoy.

    You have user "AAA" in one database with some password and You want to create same user in other database with same password.
    Then how can you create it?

    Note:
    1. You do not know password of user "AAA".
    2. You can not change password of user ""AAA" because many applications are using that user with the password.
    *********************************************
    God Bless You.

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Export / Import.

  3. #3
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    You can also use IDENTIFIED BY VALUES.
    Code:
    SQL>
    SQL> create user a identified by a;
    
    User created.
    
    SQL>
    SQL> grant create session to a;
    
    Grant succeeded.
    
    SQL>
    SQL> connect a/a
    Connected.
    SQL>
    SQL> conn / as sysdba
    Connected.
    SQL>
    SQL> select password from dba_users where username = 'A';
    
    PASSWORD
    ------------------------------
    AFCC9478DFBF9029
    
    SQL> drop user a;
    
    User dropped.
    
    SQL> create user a identified by values 'AFCC9478DFBF9029';
    
    User created.
    
    SQL> grant create session to a;
    
    Grant succeeded.
    
    SQL>
    SQL> conn a/a
    Connected.
    SQL>

  4. #4
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Lovely

    Only, I'd rather user ALTER USER (than drop and create it) as all those "applications" mentioned in the OP's post would get into a trouble. But never mind that, I know you did that just because you needed a working example.

  5. #5
    Join Date
    Aug 2006
    Location
    Mumbai, India
    Posts
    26
    Thank You.
    *********************************************
    God Bless You.

  6. #6
    Join Date
    Feb 2007
    Posts
    71
    Quote Originally Posted by Littlefoot
    Export / Import.
    is there a particular table in Oracle to be exported and imported?

  7. #7
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    What kind of a particular table do you have in mind? I'm not sure I understood the question ... TABLES option is available, of course, but you'd omit all other objects.

    In this case, I'd perform export logged in as a privileged user (such as SYS) and, on the second database, perform FROMUSER ... TOUSER import.

  8. #8
    Join Date
    Feb 2007
    Posts
    71
    oh Im sorry, let me rephrase

    Am not sure if I got myself mixed up, coz in Sybase ASE, we used to do a BCP out on our sysusers table (this table contains log ins of users). I wonder if the same goes with oracle.

  9. #9
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Well, there is a DBA_USERS table (owned by SYS) which contains all usernames (see JMartinez's example). But no - you don't have to do anything with it here; it is out of scope regarding this problem (at least in my opinion).

Posting Permissions

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