日期:2014-05-16 浏览次数:20382 次
Oracle基础总结
?????????????????????????????????????????????????????
???数据库连接
???Sqlplus?用户名/密码?as?sysdba;
???Sqlplus?"/?as?sysdba";
???Sqlplus?/nolog;
???后面两个是忘记密码的情况下登录数据库
???--connect?/?as?sysdba;
???一般用户第一次连接可以更改密码。
???创建用户
???--create?user?用户名?identified?by?密码;
???给用户设置密码
???--alter?user?sys?id?identified?by?password;
???--alter?user?system?identified?by?password;
???授权
???--grant?dba?to?scott;
???--grant?select?on?dba_users?to?scott;
???--grant?select,delete?on?scott?emp?to?test;
?????回收授权
???--revoke?select?on?dba_users?from?scott;
???--revoke?select,delete?on?scott?emp?from?test;
???--conn?/?as?sysdba;
???锁定用户
???--alter?user?用户名account?lock;
???为用户解锁
???--alter?user?用户名?account?unlock;
???强行关闭
???--shutdown?abort;
???启动
???--startup;
???查看当前用户
???--show?user;
???查看scott拥有那些表
(查看当前连接用户有那些表)
???--select?table_name?from?user_tables;