oracle 赋予权限 转发 评论 02 月21 日 13:00 最基础的 sqlplus username/password@[sid] 连接数据库 sqlplus username/password as sysdba 以管理员连接数据库 管理员连接后 创建用户 sqlplus system/manager@demo as sysdba create user abc identified by abc ; 创建用户abc 密码为abc grant all privileges to abc; 给abc 用户赋予所有的权限 给自己留个备份 以备不时之需 oracle grant 授权语句--select * from dba_users; 查询数据库中的所有用户 --alter user USERNAME account lock; 锁住用户 --alter user USERNAME account unlock; 给用户解锁 --create user USERNAME identified by USERPASS; 建立用户 一般创建用户后需要授予链接数据库权限 grant connect,resource to USERNAME; --grant create tablespace to USERNAME; 授权创建表空间 --grant SELECT on TABLENAME to USERNAME; 授权查询 授权其他动作格式相同 如果要把所有表的查询权限分配给用户可以用这样的 grant select any table to USERNAME; --grant execute on procedure1 to xujin 授权存储过程 --grant UPDATE on TABLENAME to USERNAME with grant option; 授