①:查询该用户下的对象
②:导出xining 用户下的所有对象(包括数据)
③:新建用户(xining/xining)
在新库上新建用户:(要用有dba权限的用户登陆)
④:授权
⑤:导入
⑥:重启服务(OS:windows)
⑦:删除该用户的所用对象
以非该用户且有管理员角色的用户登陆,然后再执行下列sql语句:
注:[color=red]该语句慎用[/color]
[quote]
[url=http://orajc.blog.51cto.com/458434/112301]不错的资料[/url]
[/quote]
select OBJECT_TYPE,COUNT(*) from all_objects where OWNER='用户名'
GROUP BY OBJECT_TYPE;
[color=red]用户名处大写[/color]②:导出xining 用户下的所有对象(包括数据)
C:\>exp xining/xining@ylx file=e:\data_xn.dmp log=e:\log_xn.log owner=xining
③:新建用户(xining/xining)
在新库上新建用户:(要用有dba权限的用户登陆)
create user xining
identified by xining
default tablespace USERS
temporary tablespace TEMP;
④:授权
grant dba to xining with admin option;
grant connect to xining with admin option;
grant resource to xining with admin option;
alter user xining default role dba,connect,resource;
⑤:导入
C:\>imp xining/xining@orcl file=e:\data_xn.dmp log=e:\log_xn.log fromuser=xining touser=xining
⑥:重启服务(OS:windows)
c:\>lsnrctl stop/start --停止/启动 监听器
c:\>net stop/start oracleserivce"库名" --停止/启动 服务
⑦:删除该用户的所用对象
以非该用户且有管理员角色的用户登陆,然后再执行下列sql语句:
注:[color=red]该语句慎用[/color]
drop user xining cascade;
[quote]
[url=http://orajc.blog.51cto.com/458434/112301]不错的资料[/url]
[/quote]