重庆思庄Oracle、Redhat认证学习论坛
标题:
如何区分哪些用户是ORACLE系统提供的?
[打印本页]
作者:
郑全
时间:
2021-1-6 12:33
标题:
如何区分哪些用户是ORACLE系统提供的?
有些时候,我们要清理数据库时,想把数据库中所有非系统自带的用户全部删除,在12C以前,我们只能通过人肉的方式,从12C 开始,多了一个字段: ORACLE_MAINTAINED
如果时系统自带的,该值为Y,否则为N
就很好办了,直接使用以下语句就可以找出系统自带的用户了。
select username,account_status,
ORACLE_MAINTAINED from dba_users where ORACLE_MAINTAINED='Y';
SQL> r
1* SELECT username,account_status from dba_users where ORACLE_MAINTAINED='Y'
USERNAME ACCOUNT_STATUS
------------------------------ --------------------------------
SYS OPEN
SYSTEM OPEN
XS$NULL EXPIRED & LOCKED
OJVMSYS LOCKED
LBACSYS LOCKED
OUTLN LOCKED
SYS$UMF LOCKED
DBSNMP LOCKED
APPQOSSYS LOCKED
DBSFWUSER LOCKED
GGSYS LOCKED
ANONYMOUS EXPIRED & LOCKED
CTXSYS EXPIRED & LOCKED
DVF LOCKED
DVSYS LOCKED
GSMADMIN_INTERNAL LOCKED
MDSYS LOCKED
OLAPSYS LOCKED
XDB LOCKED
WMSYS LOCKED
GSMCATUSER LOCKED
MDDATA LOCKED
REMOTE_SCHEDULER_AGENT LOCKED
SYSBACKUP LOCKED
GSMUSER LOCKED
GSMROOTUSER LOCKED
SYSRAC LOCKED
SI_INFORMTN_SCHEMA LOCKED
AUDSYS LOCKED
DIP LOCKED
ORDPLUGINS LOCKED
ORDDATA LOCKED
SYSKM LOCKED
ORACLE_OCM LOCKED
ORDSYS LOCKED
SYSDG LOCKED
36 rows selected.
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/)
Powered by Discuz! X3.2