ITPub博客

首页 > 数据库 > Oracle > oracle grant 语句的GRANT privilige TO user IDENTIFIED BY password 语法

oracle grant 语句的GRANT privilige TO user IDENTIFIED BY password 语法

原创 Oracle 作者:msdnchina 时间:2011-10-08 22:09:44 0 删除 编辑

在D:oracleproduct10.2.0db_1RDBMSADMINutlsampl.sql下,有如下的语句:
DROP USER SCOTT CASCADE;
DROP USER ADAMS CASCADE;
DROP USER JONES CASCADE;
DROP USER CLARK CASCADE;
DROP USER BLAKE CASCADE;
GRANT CONNECT,RESOURCE,UNLIMITED TABLESPACE TO SCOTT IDENTIFIED BY TIGER;
DROP PUBLIC SYNONYM PARTS;

CONNECT SCOTT/TIGER

CREATE TABLE DEPT
(DEPTNO NUMBER(2) CONSTRAINT PK_DEPT PRIMARY KEY,
DNAME VARCHAR2(14) ,
LOC VARCHAR2(13) ) ;

这个GRANT privilige TO user IDENTIFIED BY password 语法,其实是会创建user用户并且设置其密码为password,请参考oracle官方的sql reference:

IDENTIFIED BY Clause

Use the IDENTIFIED BY clause to specifically identify an existing user by password or to create a nonexistent user. This clause is not valid if the grantee is a role or PUBLIC. If the user specified in the grantee_clause does not exist, then the database creates the user with the password and with the privileges and roles specified in this clause.

[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/161195/viewspace-1055512/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-07-30

  • 博文量
    498
  • 访问量
    1542058