How do I export / import the user?
Thanks
Main Topics
Browse All TopicsHow do I check the user's permissions and roles?
How do I drop and recreate the user with the same permission / roles / etc.
(Sorry for the newbie question)
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Do you want to re-import the user's objects (tables, etc.) ?
If so, say you want simply to export bob, then drop him, then re-import. The method below requires you to recreate the user before import. If you wanted to also export / import all the user's system privileges and roles you have to do a full export / import, which I don't recommend.
exp system/admin owner=bob file=bob.dmp
SQL> drop user bobcascade;
SQL> CREATE USER bob IDENTIFIED BY pass DEFAULT TABLESPACE whatever;
SQL> GRANT CONNECT TO bob;
SQL> GRANT UNLIMITED TABLESPACE TO bob;
SQL> ... grant any other SYSTEM / TABLESPACE privileges or roles before the import
imp system/admin fromuser=bob touser=bob file=bob.dmp
Remember, though, this method does NOT export / import the system level roles and grants for the user. That only happens in a full export, because those are in the data dictionary.
If you really want to get all the SQL for the user, including grant statements, there is a way by using the import "SHOW" option, which will dump the SQL instead of performing the actions. Again, not sure what you want to do here, so clarify if you want more info.
Business Accounts
Answer for Membership
by: mrjoltcolaPosted on 2009-03-28 at 11:21:25ID: 24009531
Start with:
DBA_ROLE_PRIVS
DBA_SYS_PRIVS
DBA_TAB_PRIVS
DBA_COL_PRIVS
If you haven't granted any specific table or system privs to the user, then DBA_ROLE_PRIVS will have about all you need, but you should check all.
Why do you want to drop and recreate, just curious?
DROP USER bob CASCADE;
CREATE USER bob IDENTIFIED BY pass;
GRANT CONNECT TO bob;
-- do other grants
You can also do this with export / import. Exporting just the specific user, dropping the user, then importing it again. Not sure what you are trying to accomplish, though.