Schema-Only Accounts

You can create schema-only accounts, that is, the schema user has no password.

About Schema-Only Accounts

A schema-only account cannot log in to the database but can proxy in a single session proxy.

This type of account, designed for some Oracle-provided schemas along with some user-created schemas, can be created without the specification of a password or an authentication type. It cannot be authenticated unless an authentication method is assigned by using the ALTER USER statement. A schema-only account does not contain an entry in the DBA_USERS_WITH_DEFPWD data dictionary view.

By default, most of the predefined schema user accounts that are available with Oracle Database, such as the sample schema user accounts (for example, HR), are schema-only accounts. You can assign these accounts passwords if you want to, but for better security, Oracle recommends that you set them back to being schema-only afterwards. To check if a schema user account is schema only, query the AUTHENTICATION_TYPE column of the DBA_USERS data dictionary view. NONE indicates that the account is schema only.

Note the following rules about using schema only accounts:

Creating a Schema-Only Account

The CREATE USER SQL statement creates schema-only accounts.

You can run the CREATE USER statement with the NO AUTHENTICATION clause only on a database instance. You cannot run it on an Oracle Automatic Storage Management (ASM) instance.

CREATE USER psmith NO AUTHENTICATION;

Altering a Schema-Only Account

The ALTER USER SQL statement can be used to modify schema-only accounts.

  1. Check if the schema user has administrative privileges.

    You can query the V$PWFILE_USERS to find if the schema user has administrative privileges.

  2. If the schema user has administrative privileges, then use the REVOKE statement to revoke these privileges.

  3. Use the ALTER USER SQL statement with the NO AUTHENTICATION clause to modify the schema account to have no authentication.

    For example:

ALTER USER psmith NO AUTHENTICATION;

You can use ALTER USER to enable authentication for a schema-only account.