oracle sql/plus命令

sys登陆:sqlplus / as sysdba

查询当前用户:show user

创建用户
SQL> CREATE USER test_user PROFILE "DEFAULT"
  2      IDENTIFIED BY "qwert"
  3      ACCOUNT UNLOCK;
User created.

注意:
实际运用时,需要指定默认表空间等信息。


对用户分配角色
SQL> GRANT CONNECT TO test_user;
Grant succeeded.

SQL> GRANT DBA TO test_user;
Grant succeeded.

开始--运行---
cmd  ---
sqlplus /nolog
conn / as sysdba;

CREATE USER "AAA"  PROFILE "DEFAULT" 
    IDENTIFIED BY "AAA" DEFAULT TABLESPACE "USER" 
    TEMPORARY TABLESPACE "TEMP" 
    QUOTA UNLIMITED 
    ON "USER" 
    ACCOUNT UNLOCK;
GRANT "CONNECT" TO "AAA";
GRANT "RESOURCE" TO "AAA";
GRANT "DBA" TO "AAA";
[提问者认可] | 赞同1 | 评论
2011-08-12 14:35 xml啊 | 当前分类:4
在配置和移植选项中选中Database Configuration Assistant,按照向导就可创建一个数据库了,然后以一个比较高的权限的身份进sqlpius,找到user,右键新建就可以了。

 

你可能感兴趣的:(oracle sql/plus命令)