Oracle惯用操作命令

Oracle常用操作命令


连接在orcl上密码为tiger的用户scott:

sqlplus scott/tiger@orcl


退出连接:

exit


导出在orcl上密码为tiger的用户scott数据库表到e:\oracle,保存文件为test.dmp

exp scott/tiger@orcl file=e:\oracle\test.dmp


导入在orcl上密码为tiger的用户scott数据库表从e:\oracle,文件为test.dmp

imp scott/tiger@orcl file=e:\oracle\test.dmp 



删除用户(未删除表空间)

drop user username cascade;


登录超级管理员

sqlplus sys/oracle@orcl as sysdba;


创建用户

create user username identified by pwd default tablespace users Temporary TABLESPACE Temp;


用户授权

grant connect,resource,dba to username; 


提交

commit;