View video tutorial
ORACLE 26ai & HR Schema
ORACLE
Oracle HR Schema is a sample database created for learning purposes only.
Oracle database 26ai & HR Schema (21c - 26ai)
➔ Oracle HR Schema is a sample relational database for human resource management, primarily intended for new users for learning and demonstration purposes.
Connecting Oracle Database 26ai with HR schema step by step.
01 Download HR schema database from github. or human_resources .zip file, and extract the .zip file.
02 Extract the downloaded zip file.
03 Login as sysdba
04 Alter session
05 Install HR schema.
Login to database as user or connect to user (user database) as sysdba
--Sysdba can connect to hr user by following command:
sqlplus / as sysdba
SHOW PDBS;
ALTER PLUGGABLE DATABASE FREEPDB1 OPEN;
ALTER SESSION SET CONTAINER = FREEPDB1;
CONNECT hr/hr@//localhost:1521/FREEPDB1;
SELECT table_name FROM user_tables;
SHOW user;
CONNECT / AS SYSDBA;
SHOW user;
--hr user can login to FREEPDB1 database by following command:
-- Both sqlplus hr/hr@//localhost:1521/FREEPDB1 OR sqlplus hr/hr@localhost:1521/FREEPDB1 are valid command
sqlplus hr/hr@//localhost:1521/FREEPDB1
SELECT table_name FROM user_tables;
06 Connect to hr user.
07 Troubleshoot connection (as Administrator)