Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
G:\Users\Admin>sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on 星期三 11月 16 15:29:13 2016
Copyright (c) 1982, 2010, Oracle. All rights reserved.
请输入用户名: 数据库dba用户名 as sysdba
输入口令:
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create user test identified by 123456
2
SQL> grant dba to test
2
SQL> conn test/123456 as sysdba
已连接。
SQL>
test为创建的用户名,123456为test用户的密码
删除用户方法如下:
SQL> conn sys/123456 as sysdba
已连接。
SQL> drop user test
2
SQL>
建议使用plsql创建更方便
赋权限:
GRANT CREATE SESSION TO UserName;--这样确保该用户可以登录数据库
GRANT CREATE TABLE TO UserName;--这样该用户可以创建表
grant connect to UserName;
grant exp_full_database to UserName;
grant imp_full_database to UserName;
grant resource to UserName;
grant create procedure to UserName;
grant create trigger to UserName;
grant execute any procedure to UserName;
grant grant any privilege to UserName;
grant restricted session to UserName;
grant select any table to UserName;
grant unlimited tablespace to UserName;
grant create any view to UserName;