Put your tips and tricks online - Share your knowledge! Login | Register
 
 
  Search     Advanced search
 

Home | Ask Question | Add tip | My tips | Recent tips & tricks | Suggest a category | FAQ | Forums

 
 
 
 Category : Home > Databases > Oracle > exp     

Generate a script to create users from exp dump file


I usually run full export with ROWS=N on a development database before refreshing it from
production, that way I can always re-create the users and schema objects from that exp dump
file.

$ grep -i 'create role' [dump_file] > create_users.sql
$ grep -i 'create user' [dump_file] >> create_users.sql
$ grep -i '^grant' [dump_file] >> create_users.sql

Once database has been refreshed just run the script against the new database in sqlplus.

SQL> set echo on
SQL> spool create_users.log
SQL> @create_users.sql
SQL> spool off


  Options
 
   del.icio.us  |  newsvine  |  digg  |  furl  |  google  |  yahoo  |  Ma.gnolia  |  vigillar  |  reddit  |  technorati  |  icerocket  |  pubsub

     (Average: 5 / Votes: 4)   Rate this tip:    

Start discussion or add comment to this tip

  Details
Tip reference : #131
views : 6171
Added on : 10/26/06
Submited by : h8dk97
 
Send a message Send a message Printer friendly output Printer friendly output
Display this member's tips Display this member's tips (219)
 
 
<< Previous Next >>
 Most viewed tips 
  Databases > Oracle > Security : How to unlock Oracle user account  
  Databases > Oracle > Performance Tuning : How to enable trace in Oracle  
  Databases > Oracle > DR : Adding new datafiles to standby database  
  Operating Systems > Unix : How to kill Unix user session  
   
  All categories
Databases | Programming | Hardware | Operating Systems | Networking | Internet | ERP / CRM | Games & Multimedia | Graphics & Design | Miscellaneous | Mobile Phones / Tablets | Office Software
 
 

Home |  FAQ |  Terms of Use |  Privacy Policy

© 2005 tiplib.com