一般授予connect权限用户就能够连接数据了,授予resource权限用户就可以建表、索引、视图、存储过程了,其他权限根据具体需求来建,具体示例如下:
登录数据库服务器,运行sqlplus,
connect / as sysdba
create user test identified by test1234 tablespace test_data;(需要事先建好test_data表空间)
grant connect to test;
grant resource to test;
如果该用户需要查询数据库中所有数据:grant select any table to test;
如果该用户需要读取数据字典、使用OEM工具等:grant select dictionary to test;
如果该用户需要操作其他用户的表(如对scott用户下的emp表进行增删改操作):
grant insert,update,delete on scott.emp to test;