Connecting to Oracle AI Database as User HR
To complete the tutorials and examples in this document, you must install the hr sample schema and connect to Oracle AI Database as the user HR.
The user HR owns the hr sample schema that the examples and tutorials in this document use.
See Also:
- Installing the Sample Schemas in Database Sample Schemas for information about how to install the
hrschema
Unlocking the HR Account
You must unlock the HR account and reset its password before you can connect to the database as the user HR.
By default, when the HR schema is installed, the HR account is locked and its password is expired.
Note: For the following procedure, you need the name and password of a user who has the ALTER USERsystem privilege.
To unlock the HR account and reset its password:
-
Using SQL*Plus, connect to the database as a user with the ALTER USER system privilege.
-
At the
SQL>prompt, unlock the HR account and reset its password:Caution: Choose a secure password. For guidelines for secure passwords, see Oracle AI Database Security Guide.
ALTER USER HR ACCOUNT UNLOCK IDENTIFIED BY password;The system responds:
User altered.The
HRaccount is unlocked and its password is password.
You can now connect to the database as user HR with the password password.
See Also:
- Oracle SQL Developer User’s Guide for information about accessing SQL*Plus within SQL Developer
Connecting to Oracle AI Database as User HR from SQL*Plus
You can use SQL*Plus to connect to Oracle AI Database as the HR user.
Note: If the HR account is locked, see “Unlocking the HR Account” and then return to this section.
Complete the following steps to connect to Oracle AI Database as user HR from SQL*Plus:
Note: For this task, you need the password for the HR account.
-
If you are connected to the database, close your current connection.
-
Follow the directions in “Connecting to Oracle AI Database from SQL*Plus”, entering the user name HR at step 3 and the password for the HR account at step 4.
You are now connected to Oracle AI Database as the user HR.
See Also: SQLPlus User’s Guide and Reference* for an example of using SQL*Plus to create an HR connection
Connecting to Oracle AI Database as User HR from SQL Developer
You can use SQL Developer to connect to Oracle AI Database as the HR user.
Note: If the HR account is locked, see “Unlocking the HR Account” and then return to this section.
Complete the following steps to connect to Oracle AI Database as user HR from SQL Developer:
Note: For this task, you need the password for the HR account.
Follow the directions in “Connecting to Oracle AI Database from SQL Developer”, entering the following values at step 3:
-
For Connection Name, enter hr_conn.
(You can enter a different name, but the tutorials in this document assume that you named the connection hr_conn.)
-
For Username, enter HR.
-
For Password, enter the password for the HR account.
You are now connected to the database as the user HR.