Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2008
    Posts
    464

    Unanswered: creating a new user in oracle 9i

    Hi guys

    Is is possible to tell from an existing database which contains a number of users (schemas), how they were created. i.e., reverse engineer the SQL statement from an existing user(schema)?

    Regards

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Dbms_metadata.get_ddl
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Aug 2008
    Posts
    464
    Thanks.

    Will this work in Toad too?

    Tried for a table and it worked fine, however could not use the same for a 'user'. Even tried 'schema'.

    Used:

    Code:
    SQL> set pagesize 0
    SQL>set long 90000
    
    SQL>select Dbms_metadata.get_ddl ('USER','ERICSSON_BSS') from dual
    
    SQL>select Dbms_metadata.get_ddl ('SCHEMA','ERICSSON_BSS') from dual
    Last edited by shajju; 12-19-09 at 10:06.

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    solution may be Version dependent.

    Code:
    SQL> /
    DBMS_METADATA.GET_DDL('USER','DBADMIN')
    --------------------------------------------------------------------------------
    
       CREATE USER "DBADMIN" IDENTIFIED BY VALUES 'BD4152FEB721AFB5'
          DEFAULT
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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