Sunday, July 15, 2012

Script to Generate Grant in Database

Sometime when you want to create test environment you need to sure it will Identical and make sure grant are the same .


the below scripts include all grants made by user.
P.S :
  • For non-Windows platforms, change the second-last line, "host notepad", to call your favorite text editor instead. 
  • You will need to input a list of users.
  • If you don't know the passwords of some of the users, wait until they're not logged on, copy their encrypted passwords from dba_users, reset their passwords to a temporary value, run the generated script, and then reset their passwords to their original values using alter user ... identified by values '...'
  • Before you run the generated script, you need to know the passwords of all the users who will be making grants. Search the generated script for "connect" to figure out who this is. 

I upload the scripts as grant.sql


Enjoy

Osama Mustafa

No comments:

Post a Comment