1 Reply Latest reply: Jan 17, 2013 2:25 PM by DanceRat RSS

    expdp users, roles, grants (privs)

    DanceRat
      (sorry for the cross-posting - I'm not sure how to delete or move threads and I posted this in the general questions forum thinking I was in this forum)


      So, I think this works - still in the process of testing - but what I want to do is the following:

      1) Export ONLY users, passwords, and privs from TEST
      2) Clone PROD --> TEST
      3) Drop all users in TEST excluding system users.
      4) Import original users file from Step 1.

      I think I've got it with the following. Am I missing anything? I'm testing, but if someone else has done this, I would be happy to hear from something I may be missing.

      JOB_NAME=EXPDP_USERS
      DIRECTORY=DTPUMP
      REUSE_DUMPFILES=Y
      FULL=Y
      DUMPFILE=users_test.dmp
      LOGFILE=users_test_expdp.log
      INCLUDE=SCHEMA:"IN (SELECT USERNAME FROM dba_users where default_tablespace NOT in('SYSAUX','SYSTEM'))",ROLE,USER,SYSTEM_GRANT,ROLE_GRANT,DEFAULT_ROLE,TABLESPACE_QUOTA