1。用超级管理员账号登录
先删除指定用户:
drop user ×× cascade ;会删除此用户名下的所有表和视图。
2.创建用户账号
CREATE USER "username" PROFILE "DEFAULT"
IDENTIFIED BY "passwd" DEFAULT TABLESPACE "userspacetables"
TEMPORARY TABLESPACE "TEMP"
ACCOUNT UNLOCK;
GRANT UNLIMITED TABLESPACE TO "username"
GRANT "CONNECT" TO "username";
GRANT "DBA" TO "username";
GRANT "EXP_FULL_DATABASE" TO "username";
GRANT "IMP_FULL_DATABASE" TO "username";
GRANT "RESOURCE" TO "username";
3.导入备份好的新数据库
imp username/passwd@databaseurl file=database.dmp full=y
4.完成。