Oracle的几个常用命令


++创建用户hillary,密码为window的用户,默认的表空间是users,临时表空间是temp
create user hillary identified by window default tablespace users temporary tablespace temp;

++删除用户
drop user user_name [cascade]; #如果被删除的用户拥有对象,则需要使用cascade关键字

++修改口令
alter user user_name identified by new_password;
password; #仅能修改当前用户的口令

++锁定/解锁用户
alter user user_name account [lock|unlock];

++修改默认表空间
alter user user_name default tablespace new_def_tablespace [temporary tablespace new_temp_tablespace];

++给用户相应权限
grant system_prifvilege[,system_privilege] to user_name [with admin option]; #with admin option表示将要授予系统权限的用户
grant create session to hillary; #授予create session privilege

++查看当前系统用户信息
select username,password from dba_users;

++查看用户的系统权限
connect user/password;
select * from user_sys_privs;
  • 1
  • 2
  • 下一页
【内容导航】
第1页:Oracle的几个常用命令 第2页:Oracle的几个常用命令

相关内容