ora-01940 但是session中没有
发布网友
发布时间:2022-06-26 11:44
我来回答
共1个回答
热心网友
时间:2024-11-16 07:56
create session就是允许使用这个用户在服务器上创建session。通俗的说,就是允许这个用户登录。
例子:
SQL> conn / as sysdba
Connected.
// 建立一个新用户
SQL> create user testcreate identified by oracle;
User created.
//尝试登录,报错,没有 CREATE SESSION 权限
SQL> conn testcreate/oracle;
ERROR:
ORA-01045: user TESTCREATE lacks CREATE SESSION privilege; logon denied
Warning: You are no longer connected to ORACLE.
http://www.dngsos.com/dngswin7/1734.html
//授予create session权限
SQL> conn / as sysdba
Connected.
SQL> grant create session to testcreate;
Grant succeeded.
//再次登录,成功
SQL> conn testcreate/oracle;
Connected.