Oracle Created (Default) Database Users

Oracle Created (Default) Database Users

by Jeff Hunter, Sr. Database Administrator

Overview

 

During database creation, Oracle creates several default database users or schemas. This article attempts to provide some insight and explain each of these default database users/schemas.

Oracle User Account Details

<!-- ***************************************************** --><!-- *************** DEFAULT USERS ********************* --><!-- ***************************************************** -->

Default Users
UsernameDefault PasswordAccount Description
SYSchange_on_installAll of the base tables and views for the database's data dictionary are stored in the schema SYS. These base tables and views are critical for the operation of Oracle. To maintain the integrity of the data dictionary, tables in the SYS schema are manipulated only by Oracle; they should never be modified by any user or database administrator, and no one should create any tables in the schema of the user SYS.

The DBA should change the password for SYS immediately after database creation!!!

SYSTEMmanagerThe SYSTEM username creates additional tables and views that display administrative information, and internal tables and views used by Oracle tools. Never create in the SYSTEM schema tables of interest to individual users.

SYSTEM is a little bit "weaker" user than SYS, for example, it has no access to so called X$ tables (the very internal structure tables of Oracle).

Although in real life you may be in a situation when some product or whatever you want to create objects in above mentioned user's schemas. Be flexible, don't sacriface a product only because it will create some objects in SYS or SYSTEM schema

The DBA should change the password for SYSTEM immediately after database creation!!!

DBSNMPdbsnmpSupports Oracle SNMP (Simple Network Management Protocol).

The Oracle Intelligent Agent requires a database logon for each SID that it manages. By default this account is called "DBSNMP" and the password is "DBSNMP". The account name and/or password SHOULD be changed from the default but you will need to make a few additional modifications. In the examples below, you will need to replace any information with brackets < > with the information from your system.

 

  1. Remove all Jobs and Events currently registered against this database.

     

  2. Stop the Intelligent Agent

    Oracle7 - Oracle8i
    % lsnrctl dbsnmp_stop

    Oracle9i
    % agentctl stop

     

  3. Edit the $ORACLE_HOME/network/admin/snmp_rw.ora file. Add the following parameter:

    SNMP.CONNECT.<connect_string>.NAME=<username>
    SNMP.CONNECT.<connect_string>.PASSWORD=<password>

    The variable <connect_string> is the exact listing of the database name as it appears in the snmp_ro.ora file.

    If <username> is the default (DBSNMP), there is no need to specify the user here. Only the password is required.

    On UNIX, set the following permission on the "SNMP_RW.ORA" file:

    % chmod 600 snmp_rw.ora

     

  4. Change the DBSNMP password on the database. You can use either Security Manager, Sqlplus, or Server Manager. If you use SQLPlus or Server Manager, you can issue the following command:

    SQL> alter user "dbsnmp" identified by "<newpassword>";

     

  5. Stop and restart the Intelligent Agent.
OUTLNoutlnOracle8i adds the OUTLN user schema to support Plan Stability. The OUTLN user acts as a place to centrally manage metadata associated with stored outlines.

This user has DBA role. It is used for plan stability ie. to keep the same execution plans for the same queries even if your system configuration or statistics changes. Execution plans will be the same in different Oracle releases with different optimizers.

The DBA should either lock the user account or change the password for the OUTLN user immediately after database creation!!!

MDSYSmdsysSupports Oracle Spatial. Oracle Spatial is an integrated set of functions and procedures that enables spatial data to be stored, accessed, and analyzed quickly and efficiently in an Oracle8i database.

[..] The spatial attribute of a spatial feature is the geometric representation of its shape in some coordinate space. This is referred to as its geometry.

The DBA should either lock the user account or change the password for the MDSYS user immediately after database creation!!!

ORDSYSordsysSupports Oracle8i Time Series. Oracle8i Time Series (in previous releases called the Oracle8 Time Series Cartridge) is an extension to Oracle8i that provides storage and retrieval of timestamped data through object types. Oracle8i Time Series is a building block for applications rather than being an end-user application in itself. It consists of data types along with related functions for managing and processing time series data.

The DBA should either lock the user account or change the password for the ORDSYS user immediately after database creation!!!

ORDPLUGINSordpluginsSupports Oracle interMedia. Oracle interMedia is a single product that enables Oracle8i to store, manage, and retrieve text, documents, geographic location information, images, audio, and video in an integrated fashion with other enterprise information. Oracle interMedia extends Oracle8i reliability, availability, and data management to text and multimedia content in Internet, electronic commerce, and media-rich applications as well as online Internet-based geocoding services for locator applications.

The DBA should either lock the user account or change the password for the ORDPLUGINS user immediately after database creation!!!

CTXSYSctxsysSupports Oracle ConText Cartridge. Oracle8 ConText Cartridge provides powerful search, retrieval, and viewing capabilities for text stored in an Oracle8 database. In addition, ConText provides advanced linguistic processing of English-language text.

The DBA should either lock the user account or change the password for the CTXSYS user immediately after database creation!!!

DSSYSdssysDynamic Services Secured Web Service. Dynamic Services Engine (DS Engine) allows creation, aggregation and deployment of services from a variety of content sources. At the moment, Dynamic Services supports content access from databases (SQL/PLSQL) as well as Internet applications (HTTP/HTTPS). DS Engine can interpret XML and HTML content along with the result sets returned from database access. DS Engine is integrated with Oracle Portal via a Web Provider mechanism. This integration allows all the services registered with DS Engine to be accessible as portlets.

The DBA should either lock the user account or change the password for the DSSYS user immediately after database creation!!!

PERFSTATperfstatOracle Statistics Package (STATSPACK) user that supersedes UTLBSTAT/UTLESTAT. The PERFSTAT user will hold all of the tables and packages for the performance diagnostic tool STATSPACK.

Created By: $ORACLE_HOME/rdbms/admin/spcusr.sql

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.

Created By: $ORACLE_HOME/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.

This support account is assigned the following privileges in Oracle9i:

 

  • CONNECT
  • RESOURCE
  • DBA
  • ALL PRIVILEGES
  • CTXAPP
  • CREATE PUBLIC SYNONYM
  • DROP PUBLIC SYNONYM
  • CREATE ANY VIEW
  • DROP ANY VIEW
  • CREATE ANY TABLE
  • DROP ANY TABLE
  • CREATE ANY INDEX
  • DROP ANY INDEX
  • CREATE ANY SEQUENCE
  • DROP ANY SEQUENCE
  • CREATE ANY TRIGGER
  • DROP ANY TRIGGER
  • JAVAUSERPRIV
  • JAVASYSPRIV
  • SELECT ON SYS.USER$
  • SELECT ON SYS.V_$PARAMETER
  • SELECT ON SYS.GV_$INSTANCE
  • SELECT ON SYS.V_$DATABASE
  • SELECT ON SYS.DBA_CONSTRAINTS
  • SELECT ON SYS.DBA_JOBS
  • SELECT ON SYS.DBA_DB_LINKS
  • SELECT ON SYS.DBA_ROLE_PRIVS
  • SELECT ON SYS.DBA_LOCK
  • SELECT ON SYS.DBMS_LOCK_ALLOCATED
  • SELECT ON SYS.PROCEDURE$
  • SELECT ON SYS.DBA_TABLES
  • SELECT ON SYS.DBA_VIEWS
  • SELECT ON SYS.DBA_TAB_COLUMNS
  • EXECUTE ON SYS.DBMS_LOCK
  • EXECUTE ON SYS.DBMS_PIPE
  • EXECUTE ON SYS.DBMS_REGISTRY

The default tablespace for this user will be "DRSYS" while its temporary tablespace will be "TEMP".

Created By: $ORACLE_HOME/ultrasearch/admin/wk0install.sql

WMSYSwmsysUsed to store all the metadata information for Oracle Workspace Manager. This user was introduced in Oracle9i and (like most Oracle9i supporting accounts) is locked by default. The user account is locked because we want the password to be public but restrict access to the account to the SYS schema. So, to unlock the account, DBA privileges are required.

Created By: $ORACLE_HOME/rdbms/admin/owmctab.plb

XDBchange_on_installUsed to support SQL XML management: XML DB. This user is granted two roles: "RESOURCE" and "JAVAUSERPRIV". Oracle recommends changing the password for this user after creation. This user is configured with a default tablespace of "XDB" and a temporary tablespace of "TEMP".

Created By: $ORACLE_HOME/rdbms/admin/catqm.sql

ANONYMOUS...IDENTIFIED BY VALUES 'anonymous'Used to support SQL XML management: XML DB. Allows HTTP access to Oracle XML DB. This user should only be used for HTTP logins. The account is locked near the end of the catqm.sql script.

Created By: $ORACLE_HOME/rdbms/admin/catqm.sql

ODModmUsed to support Oracle Data Mining. In Oracle9i, this user is granted the roles: "SELECT_CATALOG_ROLE", "HS_ADMIN_ROLE", "AQ_USER_ROLE". Oracle recommends changing the default password as the account IS NOT locked after creation. The default tablespace for this user is "ODM" with temporary tablespace "TEMP". The "ODM" tablespace is populated with segments from users ODM and ODM_MTR.

Created By: $ORACLE_HOME/dm/admin/dmcrt.sql

ODM_MTRmtrpwUsed to support Oracle Data Mining. In Oracle9i, this user is granted "SELECT_CATALOG_ROLE" and "HS_ADMIN_ROLE". Oracle recommends changing the default password as the account IS NOT locked after creation. The default tablespace for this user is "ODM" with temporary tablespace "TEMP". The "ODM" tablespace is populated with segments from users ODM and ODM_MTR.

Created By: $ORACLE_HOME/dm/admin/dmcrt.sql

OLAPSYSmtrpwThis user is create if OLAP option is installed and is used to create OLAP metadata structures. In Oracle9i, this user is granted "SELECT_CATALOG_ROLE" and "HS_ADMIN_ROLE". Oracle recommends changing the default password. The default tablespace for this user is "ODM" with temporary tablespace "TEMP". The "ODM" tablespace is populated with segments from users ODM and ODM_MTR.

Created By: $ORACLE_HOME/dm/admin/dmcrt.sql

TRACESVRtraceOracle Trace server. Supports Oracle Trace for OEM in Oracle7. Oracle Trace is used to collect a wide variety of data, such as performance statistics, diagnostic data, system resource usage, and business transaction details.

This user was last used in Oracle7 and can be dropped from databases using Oracle8 and higher.

REPADMINManaged by DBA when user is created.Replication user. This user is manually created by the DBA using CREATE USER... This user is also created in the scripts: $ORACLE_HOME/ldap/admin/oidrsrms.sql and $ORACLE_HOME/ldap/admin/oidrsms.sql. Oracle recommends changing the default password if automatically created.

<!-- ***************************************************** --><!-- *************** JSERV Accounts ******************** --><!-- ***************************************************** -->

JSERV Accounts
The three JSERV accounts (AURORA$JIS$UTILITY$, AURORA$ORB$UNAUTHENTICATED and OSE$HTTP$ADMIN) are used internally by Enterprise Java Beans and CORBA Tools and created with randomly-generated passwords 'INVALID_ENCRYPTED_PASSWORD'.

These 3 scripts are launched by init_jis.sql script to install the Oracle Servlet Engine (OSE).

Changing their passwords would prevent the ORB from working. This is supposed to change in a future version so that you can change their password.

UsernameDefault PasswordAccount Description
AURORA$ORB$UNAUTHENTICATED<Random>Description: Create the public user for the Aurora/ORB. This is the identity any non-validated ORB client will run as. This is the user for users who don't authenticate in the Aurora/ORB

Created By: jisorb.sql

AURORA$JIS$UTILITY$<Random>Description: Create the public user for the Aurora/ORB. This is the identity any non-validated ORB client will run as. This is the user for users who don't authenticate in the Aurora/ORB

Created By: jisbgn.sql

OSE$HTTP$ADMIN<Random>Description: Create the public user for the Aurora/ORB. This is the identity any non-validated ORB client will run as. This is the user for users who don't authenticate in the Aurora/ORB

Created By: jishausr.sql

<!-- ***************************************************** --><!-- *************** Sample Schemas ******************** --><!-- ***************************************************** -->

Sample Schemas
UsernameDefault PasswordAccount Description
SCOTTtigerWell known and often referenced sample schema. Everyone should know about the magical emp and dept tables. VERY MANY examples in Oracle docs and not only are based on this schema so You should know it!

The user should be dropped in all production databases.

ADAMS  
JONES  
CLARK  
BLAKE  

<!-- ***************************************************** --><!-- *********** Oracle9i Sample Schemas *************** --><!-- ***************************************************** -->

Oracle9i Sample Schemas
The Oracle9i Sample Schemas provides installed schemas meant to be used for demonstration purposes only.
UsernameDefault PasswordAccount Details
HRhr Human Resources schema. The Human Resources division tracks information on the company's employees and facilities.
OEoe Order Entry schema requires "Oracle Spatial" option. The Order Entry division tracks product inventories and sales of the company's products through various channels.
PMpm Product Media schema requires "Oracle JVM" and "Oracle Intermedia" options. The Product Media division maintains descriptions and detailed information on each product sold by the company.
SHsh Sales History schema requires "Oracle OLAP Services" set up. The Sales History division tracks business statistics to facilitate business decisions.
QSqs Queued Shipping schema The Shipping division manages the shipping of products to customer. The sample company has decided to test the use of messaging to manage its proposed B2B applications.
QS_ESqs_es (Eastern Shipping)
QS_WSqs_ws (Western Shipping)
QS_OSqs_os (Overseas Shipping)
QS_CBqs_cb (Customer Billing)
QS_CSqs_cs (Customer Service)
QS_ADMqs_adm (Administration)
QS_CBADMqs_cbadm (Customer Billing Administration)

转载自:http://www.idevelopment.info/data/Oracle/DBA_tips/Database_Administration/DBA_26.shtml
<think> 首先,用户的问题是关于Oracle数据库的:"我想查询 oracle dba_users 所在的数据库 请问oracle dba_users 所在的数据库"。用户想查询dba_users视图所在的数据库。 从上下文看,用户提供了几个引用: - 引用[1]: 讨论了oracle的user_users, dba_users, all_users,并提到ALL_USERS来自oracle doc。 - 引用[2]: 是关于oracle 18c中的DBA_USERS视图,提供了一个链接到官方文档。 - 引用[3]: 解释了ALL_USERS视图列出数据库中对当前用户可见的所有用户。 - 引用[4]: 涉及dba_users字典和用户管理,列出了一些列名如USERNAME、USER_ID等。 用户的问题焦点是dba_users视图所在的数据库。这听起来有点混淆,因为dba_users是一个数据字典视图,它本身存储在Oracle数据库的系统表中,具体来说,它是数据字典的一部分。 关键点: - dba_usersOracle数据库中的一个视图,用于显示数据库中所有用户的信息。 - 这个视图存在于Oracle数据库实例中。当你安装Oracle数据库时,这些系统视图(如dba_users)被创建在SYS模式中。 所以,用户可能在问dba_users视图物理存储的位置?或者用户可能误以为dba_users是一个数据库,而它实际上是一个视图。 解析问题:"oracle dba_users 所在的数据库"。可能的意思是: - 哪个数据库包含dba_users视图? - 或者,如何查询dba_users视图以获取数据库用户信息? 基于引用和上下文,用户引用了dba_users,所以很可能用户想了解dba_users视图本身。 从引用[2]:有一个链接到Oracle官方文档关于DBA_USERS: https://docs.oracle.com/en/database/oracle/oracle-database/18/refrn/DBA_USERS.html 引用[3]说:ALL_USERS lists all users of the database visible to the current user. 引用[4]显示:USERNAME, USER_ID等列。 所以,回答应该澄清dba_users是什么。 dba_users视图在Oracle数据库的数据字典中,它存储了关于数据库用户的信息。要访问它,你需要连接到Oracle数据库实例。 因此,dba_users "所在的数据库" 就是它被查询的那个Oracle数据库实例本身。 在回答中,我需要: 1. 用中文回答。 2. 结构清晰,帮助用户逐步解决问题。 3. 引用末尾添加引用标识。 4. 生成相关问题。 首先,解释dba_users: - dba_usersOracle数据字典视图之一,用于显示数据库中所有用户的详细信息,如用户名、用户ID、账户状态等。 - 这个视图存在于每个Oracle数据库中,而不是一个单独的数据库。当你说"查询dba_users",你是在查询当前的Oracle数据库实例。 所以,用户可能想查询某个特定的Oracle数据库以获取用户信息。 回答结构: - 步骤1: 解释什么是dba_users。 - 步骤2: 如何查询dba_users?需要连接到目标Oracle数据库。 - 步骤3: 提供示例SQL查询。 - 步骤4: 引用相关部分添加标识。 - 最后,生成相关问题。 系统指令要求: - 行内数学表达式用$...$,但这里可能不涉及数学。 - 独立公式用$$...$$,但这里可能不需要。 - LaTeX语法正确。 - 使用中文回答。 - 生成相关问题。 - 回答中引用的段落末尾添加引用标识。 从引用中: - 引用[1]说ALL_USERS来自oracle doc。 - 引用[2]链接到DBA_USERS文档。 - 引用[3]解释ALL_USERS。 - 引用[4]显示列名。 在回答中,我可以引用这些来支持。 核心回答: - dba_users视图存储在Oracle数据库的系统字典中。要查询它,你需要连接到目标Oracle数据库实例并使用SQL。 例如:SELECT * FROM DBA_USERS; 但用户可能想知道物理位置?数据字典视图存储在SYSTEM表空间中,由SYS用户拥有。 但通常,用户关心如何查询它。 基于用户的问题:"所在的数据库",可能用户想找到哪个数据库有这个视图,答案是它存在于每个Oracle数据库中。 如果用户想查询远程数据库,我需要解释如何连接。 假设用户有一个Oracle数据库实例,并想查询dba_users。 回答步骤: 1. **澄清dba_users的性质**:dba_usersOracle数据字典视图,用于管理数据库用户。它存在于每个Oracle数据库实例中[^2][^3]。 2. **如何访问**:要查询dba_users,你需要连接到目标Oracle数据库实例,使用具有DBA权限的用户(如SYS或SYSTEM),然后执行SQL查询。 3. **示例查询**:提供简单的SQL示例。 4. **引用**:在相关部分添加引用标识。 最后,生成相关问题。 生成相关问题: 1. 如何连接到Oracle数据库以查询dba_users? 2. dba_users视图包含哪些列? 3. ALL_USERS和DBA_USERS有什么区别?[^1][^3] 4. 如何在Oracle中管理用户账户? 确保回答真实可靠。 </think>### 回答:Oracle dba_users 视图所在的数据库 您的查询是关于 Oracle 数据库中 `dba_users` 视图的“所在数据库”。首先,我需要澄清一个关键点:`dba_users` 是 Oracle 数据字典中的一个视图(view),而不是一个独立的数据库。它用于存储和显示数据库用户的信息(如用户名、用户ID、账户状态等)。这个视图**存在于每个 Oracle 数据库实例中**,具体存储在系统的数据字典中,由 SYS 用户拥有,且位于 SYSTEM 表空间内[^2][^3]。简单来说,当您安装并运行一个 Oracle 数据库时,`dba_users` 视图会自动在该实例中创建,因此“所在的数据库”就是您当前连接的那个 Oracle 数据库实例本身。 要查询 `dba_users`,您需要连接到目标 Oracle 数据库实例(例如您管理的公司数据库或本地测试数据库),并使用具有 DBA 权限的用户(如 SYS、SYSTEM 或其他被授予 SELECT_CATALOG_ROLE 的用户)执行 SQL 查询。以下是逐步指南: #### 步骤 1: 确认数据库连接 - 确保您已连接到目标 Oracle 数据库实例。这可以通过 SQL*Plus、SQL Developer 或其他客户端工具完成。例如: ```sql CONNECT SYS/password AS SYSDBA; -- 使用 SYS 用户连接(需要 SYSDBA 权限) ``` 或者使用普通 DBA 用户: ```sql CONNECT system/password; -- SYSTEM 用户通常有基本 DBA 权限 ``` #### 步骤 2: 执行查询 dba_users - 一旦连接成功,您可以直接查询 `dba_users` 视图来获取用户信息。基本查询示例: ```sql SELECT USERNAME, USER_ID, ACCOUNT_STATUS, CREATED, DEFAULT_TABLESPACE FROM DBA_USERS; -- 查询关键列,如用户名、用户ID等[^4] ``` - **USERNAME**: 用户名 - **USER_ID**: 用户唯一 ID - **ACCOUNT_STATUS**: 账户状态(如 OPEN、LOCKED) - **CREATED**: 用户创建日期 - **DEFAULT_TABLESPACE**: 默认表空间 这个查询会返回当前数据库中所有用户的列表[^2][^4]。 #### 步骤 3: 理解视图的存储位置 - `dba_users` 视图的定义存储在数据字典基表中(如 `SYS.USER$`),这些基表物理上位于 Oracle 数据库的 **SYSTEM 表空间**中[^2][^3]。它不是独立数据库,而是数据库系统的一部分。如果您想确认视图是否存在,可以查询数据字典视图: ```sql SELECT OWNER, TABLE_NAME FROM ALL_OBJECTS WHERE OBJECT_NAME = 'DBA_USERS' AND OBJECT_TYPE = 'VIEW'; -- 返回视图的拥有者(通常为 SYS)[^3] ``` #### 注意事项 - **权限问题**:如果查询时遇到权限错误(如 "ORA-00942: table or view does not exist"),确保您的用户拥有 `SELECT ANY DICTIONARY` 或 `SELECT_CATALOG_ROLE` 权限[^2]。您可以使用以下命令授权: ```sql GRANT SELECT ON DBA_USERS TO your_user; -- 授权给特定用户 ``` - **与 ALL_USERS 的区别**:`dba_users` 显示所有用户(需要 DBA 权限),而 `all_users` 仅显示对当前用户可见的用户(不需要高权限)[^1][^3]。如果您不需要详细信息,可以使用 `all_users` 简化查询。 - **官方文档参考**:更多细节(如列定义和版本差异)请参阅 Oracle 官方文档:[DBA_USERS in Oracle Database 18c](https://docs.oracle.com/en/database/oracle/oracle-database/18/refrn/DBA_USERS.html)[^2]。 总之,`dba_users` 不是独立的数据库,而是您查询的 Oracle 数据库实例内部的视图。要访问它,只需连接到该数据库并运行 SQL 查询。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值