通过查询资料,百度,自己总结一下,方便以后使用。
-- 命令行以dba身份登录
sqlplus sys/orcl as sysdba
-- 创建表空间create tablespace myspace datafile 'e:/myspace .dbf' size 100M autoextend on next 100M maxsize unlimited;
-- 创建用户并添加密码
create user oa identified by 123456;
-- 设置表空间给用户alter user oa default tablespace myspace;
-- 授予dba权限grant dba to oa
-- 提交commit;
exit-- 命令行导入
imp oa/123456 full=y file=d:/db.dmp log=f:/82.log
-- 导出
exp oa/123456@orcl file=D:\db.dmp owner=oa
-- 删除用户
drop user oa cascade;
-- 删除表空间
drop tablespace oa;
-- 修改用户密码
alter user oa identified by 123456;