Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2016
    Posts
    2

    Unanswered: export oracle "password column" to postgres

    Hello,

    how to export oracle users table with password column to PostgreSQL ?

    Thanks

  2. #2
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Short answer: you can't

    While you can export the contents of the users table into a CSV file, there is no way you can get the password in plain text.

    But having the users as a CSV file won't help you anyway, because you need to run the appropriate CREATE USER statement in Postgres in order to create a user.

    What you could do is to run a SQL statement in Oracle that generates the CREATE USER statement - but this is only possible without the password.

    Something like:
    Code:
    select 'create user '||username||' with password ''supersecret'';'
    from dba_users
    Spool the output of that statement into a file, then run that SQL script in Postgres.

    You will have to change the password for each user manually after that (or let each user do that by her/himself)
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags: http://www.dbforums.com/misc.php?do=bbcode#code

    Tips for good questions:

    http://tkyte.blogspot.de/2005/06/how...questions.html
    http://wiki.postgresql.org/wiki/SlowQueryQuestions
    http://catb.org/esr/faqs/smart-questions.html

  3. #3
    Join Date
    Mar 2016
    Posts
    2
    yes that's what I thought also

    Thanks for your reply

Posting Permissions

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