Difference between revisions of "(Re)create user/schema using DataPump"
From dbawiki
(Created page with "If the user does not yet exist on the destination database, just import it using the procedure outlined here. If however, the user already exists and the grants are differen...") |
|||
| Line 1: | Line 1: | ||
| − | If the user does not yet exist on the destination database, just import it using the procedure outlined [[here]]. | + | If the user does not yet exist on the destination database, just import it using the procedure outlined [[DataPump|here]]. |
If however, the user already exists and the grants are different on the destination database than they were on the source database, then they should be retained to be reapplied after the import. | If however, the user already exists and the grants are different on the destination database than they were on the source database, then they should be retained to be reapplied after the import. | ||
Revision as of 20:02, 30 November 2011
If the user does not yet exist on the destination database, just import it using the procedure outlined here.
If however, the user already exists and the grants are different on the destination database than they were on the source database, then they should be retained to be reapplied after the import.
create grants script
drop user <schema name> cascade;
The schema should ideally be checked beforehand that it does not own objects like 'type's that may exist elsewhere...
After the import, reapply the original grants:
run create grants script
Finally, recompile all invalid objects:
exec utl_recomp...