oracle判断当前用户是不是dba


SELECT * FROM session_privs
这个在sqlplus里可以查看当前用户所有权限,

查看是否是dba
select userenv('isdba') from dual;

查看当前schema和user:

select sys_context('userenv','current_user')
as current_user
from dual;

select sys_context('userenv','current_schema')
as current_schema
from dual;

------------------------------------------
oracle版本:

Oracle9i Enterprise Edition Release 9.2.0.1.0-
Production With the Partitioning,OLAP and Oracle Data Mining Options
JServer Release 9.2.0.1.0

你可能感兴趣的:(oracle)