暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Oracle 12c新特性:ORACLE自动维护的Schema或默认创建的USER

原创 Anbob 2017-07-20
1523
ORACLE 12c有些小特性非常的实用,如Oracle 12c New Feature: Last Login Time for Non-Sys Users,可以列出非SYS用户的最后登录时间,该数据可以做为清理用户里的依据,同时前段时间应对安全检查, 数据库中扫出了一些弱口令,需要清理一部分长期不登录的用户或找到对应的责任人才可以修改密码,以评估修改修改对系统的影响。 如果找出哪些用户是ORACLE 系统用户在12C之前还是相对麻烦一些,因为我们可能知道像sys, system这些系统默认创建的用户,其它如果安装时选用较多的DB option时,往往不容易查找自动在创建数据库里脚本中创建的哪些用户。
在12c 中dba_user 字典视图引入了ORACLE_MAINTAINED 字段, 当数据库安装options时,oracle自己创建的用户会赋值为"Y",我们自己创建的用户默认为"N", 所以像之前的需求在12c中就变的简单,即可以使用LAST_LOGIN判断数据库的最后一次登录,又可以使用ORACLE_MAINTAINED ='N' 查找我们创建的用户。
同时也可以查出这些schema是否可以exp,expdp,logical standby... , 下面是在我的12.2 CDB测试环境中查询结果
  SQL> SELECT created,
username,
oracle_maintained,
common,
no_exp,
no_expdp,
no_sby,
default_password,
sysaux,
occupant_desc
FROM dba_users
LEFT OUTER JOIN (SELECT DISTINCT name username, 'Y' no_expdp
FROM sys.ku_noexp_tab
WHERE obj_type = 'SCHEMA')
USING (username)
LEFT OUTER JOIN
(SELECT DISTINCT name username, 'Y' no_exp FROM sys.exu8usr)
USING (username)
LEFT OUTER JOIN (SELECT DISTINCT name username, 'Y' no_sby
FROM SYSTEM.logstdby$skip_support
WHERE action IN (0, -1))
USING (username)
LEFT OUTER JOIN
(SELECT DISTINCT user_name username, 'Y' default_password
FROM sys.default_pwd$)
USING (username)
LEFT OUTER JOIN
( SELECT schema_name username,
'Y' sysaux,
DECODE (COUNT (*), 1, MIN (occupant_desc)) occupant_desc
FROM v$sysaux_occupants
GROUP BY schema_name)
USING (username)
ORDER BY created, username;
复制












































































































































































































































































































































































































































































CREATEDUSERORACLE
MAINTAINED
COM-
MON
NO
EXP
NO
EXPDP
NO
SBY
DEF
PWD
SYS
AUX
occupant_desc
2016-12-09 20:43:28SYSYYESYYYYY
2016-12-09 20:43:29AUDSYSYYESYYYYYAUDSYS schema objects
2016-12-09 20:43:29SYSBACKUPYYESYYY
2016-12-09 20:43:29SYSDGYYESYYY
2016-12-09 20:43:29SYSKMYYESYYY
2016-12-09 20:43:29SYSRACYYESYYY
2016-12-09 20:43:29SYSTEMYYESYYYY
2016-12-09 20:43:37OUTLNYYESYYY
2016-12-09 20:52:01GSMADMIN_INTERNALYYESYYY
2016-12-09 20:52:02GSMUSERYYESYYY
2016-12-09 20:52:34DIPYYESYYY
2016-12-09 20:53:38XS$NULLYYESYYY
2016-12-09 20:53:57REMOTE_SCHEDULER_AGENTYYESYYYY
2016-12-09 20:53:58DBSFWUSERYYESYYYY
2016-12-09 20:55:20ORACLE_OCMYYESYYY
2016-12-09 21:00:10SYS$UMFYYESYYYY
2016-12-09 21:04:32DBSNMPYYESYYYYEnterprise Manager Monitoring User
2016-12-09 21:04:34APPQOSSYSYYESYYY
2016-12-09 21:05:25GSMCATUSERYYESYYY
2016-12-09 21:05:30GGSYSYYESYYY
2016-12-09 21:08:03ANONYMOUSYYESYYY
2016-12-09 21:08:03XDBYYESYYYYXDB
2016-12-09 21:24:12WMSYSYYESYYYYWorkspace Manager
2016-12-09 21:26:42OJVMSYSYYESYYY
2016-12-09 21:30:28CTXSYSYYESYYYYOracle Text
2016-12-09 21:31:47ORDSYSYYESYYYYOracle Multimedia ORDSYS Components
2016-12-09 21:31:48MDSYSYYESYYYYOracle Spatial
2016-12-09 21:31:48ORDDATAYYESYYYYOracle Multimedia ORDDATA Components
2016-12-09 21:31:48ORDPLUGINSYYESYYYYOracle Multimedia ORDPLUGINS Components
2016-12-09 21:31:48SI_INFORMTN_SCHEMAYYESYYYYOracle Multimedia SI_INFORMTN_SCHEMA Components
2016-12-09 21:44:53OLAPSYSYYESYYYYOLAP Catalog
2016-12-09 21:45:32MDDATAYYESYYY
2016-12-09 21:48:26SPATIAL_CSW_ADMIN_USRYYESYYY
2016-12-09 21:55:40LBACSYSYYESYYY
2016-12-09 21:55:59DVFYYESYYY
2016-12-09 21:55:59DVSYSYYESYYY
2017-04-11 17:07:21C##ANBOBNYESY

别外也整理了一些在12c之前的版本中可能会创建的SCHEMA及用途, 如下:






















































































































































































































































































































UserPasswordPurposeCreated by
SYSCHANGE_ON_INSTALL or INTERNALOracle Data Dictionary/ Catalog ?/rdbms/admin/sql.bsq and various cat*.sql scripts
SYSTEMMANAGERThe default DBA user name (please do not use SYS) ?/rdbms/admin/sql.bsq
OUTLNOUTLNStored outlines for optimizer plan stability ?/rdbms/admin/sql.bsq
SCOTTTIGERTraining/ demonstration users containing the popular EMP and DEPT tables ?/rdbms/admin/utlsampl.sql
ADAMSWOOD
JONESSTEEL
CLARKCLOTH
BLAKEPAPER
HR (Human Resources)HRTraining/ demonstration users containing the popular EMPLOYEES and DEPARTMENTS tables ?/demo/schema/mksample.sql
OE (Order Entry)OE
SH (Sales History)SH
DEMODEMOUser for Oracle Data Browser Demonstration (last version 9.2) ?/rdbms/admin/demo.sql
ANONYMOUSinvalid passwordUsed by the PL/SQL gateway that enables a Web browser to invoke a PL/SQL stored procedure through an HTTP listener. ?/rdbms/admin/catqm.sql
AURORA$ORB$UNAUTHENTICATEDINVALIDUsed for users who do not authenticate in Aurora/ORB ?/javavm/install/init_orb.sql called from ?/javavm/install/initjvm.sql
AWR_STAGEAWR_STAGEUsed to load data into the AWR from a dump file ?/rdbms/admin/awrload.sql
CSMIGUser for Database Character Set Migration Utility ?/rdbms/admin/csminst.sql
CTXSYSCTXSYSOracle interMedia (ConText Cartridge) administrator user ?/ctx/admin/dr0csys.sql
DBSNMPDBSNMPOracle Intelligent agent ?/rdbms/admin/catsnmp.sql, called from catalog.sql
DIPDIPGeneric user account DIP for processing events propagated by DIP. This account would be used by all applications using the DIP provisioning service when connecting to the database ?/rdbms/admin/catdip.sql, called from catproc.sql
DMSYSDMSYSData Mining user ?/rdbms/admin/odmcrt.sql, called from dminst.sql
DSSYSDSSYSOracle Dynamic Services and Syndication Server ?/ds/sql/dssys_init.sql
EXFSYSUser to hold the dictionary, APIs for the Expression Filter ?/rdbms/admin/exfsys.sql, called from catexf.sql from catrul.sql from catproc.sql
LBACSYSLBACSYSLabel Based Access Control owner when Oracle Label Security (OLS) option is used ?/rdbms/admin/catlbacs.sql, called from catols.sql
MDSYSMDSYSOracle Spatial administrator user ?/ord/admin/ordinst.sql
ORACLE_OCMORACLE_OCMOwner of packages used by Oracle Configuration Manager ?/rdbms/admin/catocm.sql, called from dbmsocm.sql, called from catproc.sql
ORDPLUGINSORDPLUGINSObject Relational Data (ORD) User used by Time Series, etc. ?/ord/admin/ordinst.sql
ORDSYSORDSYSObject Relational Data (ORD) User used by Time Series, etc. ?/ord/admin/ordinst.sql
SI_INFORMTN_SCHEMAThe account that stores the information views for the SQL/MM Still Image Standard. See also ORDPLUGINS and ORDSYS.?/ord/admin/ordinst.sql
PERFSTATPERFSTATOracle Statistics Package (STATSPACK) that supersedes UTLBSTAT/UTLESTAT ?/rdbms/admin/statscre.sql
TRACESVRTRACEOracle Trace server ?/rdbms/admin/otrcsvr.sql
TSMSYSTSMSYSUser for Transparent Session Migration (TSM) a Grid feature ?/rdbms/admin/cattsm.sql, called from catproc.sql
XDBOwner of objects for XDB system ?/rdbms/admin/catqm.sql
APEX_030200Part of the Oracle Application Express Suite - (Oracle APEX, previously named Oracle HTML DB) which is a freeware software development environment. It allows a fast development cycle to be achieved to create web based applications. The account owns the Application Expressschema and metadata. See also APEX_PUBLIC_USER andFLOW_FILES.?/apex/apexins.sql
APEX_PUBLIC_USER
FLOW_FILES
APPQOSSYSUsed for storing/managing all data and metadata required by Oracle Quality of Service Management.?/rdbms/admin/catqos.sql
BIThe account that owns the Business Intelligence schema included in the Oracle Sample Schemas. See also HR, OE, SH, IX and PM.?/demo/schema/bus_intelligence/bi_main.sql
IX
PM
MDDATAThe schema used by Oracle Spatial for storing Geocoder and router data. See also SPATIAL_CSW_ADMIN_USR , SPATIAL_WFS_ADMIN_USR and MDSYS.?/md/admin/catmd.sql
MGMT_VIEWAn account used by Oracle Enterprise Manager Database Control. Password is randomly generated at installation or database creation time. Users do not need to know this password.?/sysman/admin/emdrep/bin/RepManager
OLAPSYSThe account that owns the OLAP Catalog (CWMLite). This account has been deprecated, but is retained for backward compatibility.?/olap/admin/amdsys.sql
ORDDATAThis account contains the Oracle Multimedia DICOM data model.?/ord/admin/ordisysc.sql
OWBSYSThe account for administrating the Oracle Warehouse Builder repository. Access this account during the installation process to define the base language of the repository and to define Warehouse Builder workspaces and users. A data warehouse is a relational or multidimensional database that is designed for query and analysis. See also OWBSYS_AUDIT.?/owb/UnifiedRepos/cat_owb.sql
OWBSYS_AUDITThis account is used by the Warehouse Builder Control Center Agent to access the heterogeneous execution audit tables in the OWBSYS schema.?/owb/UnifiedRepos/cat_owb.sql
SPATIAL_CSW_ADMIN_USRThe Catalog Services for the Web (CSW) account. It is used by the Oracle Spatial CSW cache manager to load all record type metadata, and record instances from the database into the main memory for the record types that are cached. See also SPATIAL_WFS_ADMIN_USR, MDDATA and MDSYS.?/md/admin/sdocswpv.sql
SPATIAL_WFS_ADMIN_USRThe Web Feature Service (WFS) account. It is used by the Oracle Spatial WFS cache manager to load all feature type metadata, and feature instances from the database into main memory for the feature types that are cached. See also SPATIAL_CSW_ADMIN_USR , MDDATA and MDSYS.?/md/admin/sdowfspv.sql
SYSMANThe account used to perform Oracle Enterprise Manager database administration tasks. The SYS and SYSTEM accounts can also perform these tasks. Password is created at installation or database creation time.Created as part of the dbconsole or Enterprise Manager build.
WMSYSThe account used to store the metadata information for Oracle Workspace Manager.?/rdbms/admin/owmctab.plb
WKPROXYchange_on_installUsed to support Oracle's Ultrasearch option. This feature (and user) was introduced in Oracle9i. The user account IS NOT locked by default is only assigned the "CREATE SESSION" privilege. None the less, this account is not locked by default and Oracle highly recommends that this default password be changed.?/ultrasearch/admin/wk0csys.sql
WKSYSchange_on_installUsed to support Oracle's Ultrasearch option. This feature (and user) was introduced in Oracle9i. The user account IS NOT locked by default and as you can see below, is granted the highly privileged role of DBA. Given that this user is granted the DBA role and is not locked by default, Oracle highly recommends that this default password be changed.?/ultrasearch/admin/wk0install.sql
X$NULLAn internal account that represents the absence of a user in a session. Because XS$NULL is not a user, this account can only be accessed by the Oracle Database instance. XS$NULL has no privileges and no one can authenticate as XS$NULL, nor can authentication credentials ever be assigned to XS$NULL.?/rdbms/admin/sql.bsq

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论