Course recordings on DaDesktop for Training platform
Visit NobleProg websites for related course
Visit outline: ORACLE PL/SQL Fundamentals (Course code: oplsqlfun)
Categories: Oracle PL/SQL · PL/SQL
Summary
Overview
This is a hands-on technical course session focused on configuring Oracle SQL Developer, establishing database connections, and modifying table structures using SQL commands. The instructor guides participants through troubleshooting connection issues, editing configuration files (e.g., listener.ora), restarting services, and altering the employees table by adding first_name and salary columns. The session emphasizes practical execution, real-time debugging, and use of SQL*Plus and SQL Developer interfaces.
Topic (Timeline)
1. SQL Developer Setup and Connection Troubleshooting [00:00:00 - 00:01:56]
- Instructor guides participants to open SQL Developer and navigate to the “Local” connection folder.
- Participant (Sir Ray) encounters connection failure due to incorrect hostname in configuration.
- Instructor directs Sir Ray to open command prompt/terminal and run
hostnameto verify system hostname. - Participant is instructed to edit the
listener.orafile (line 19) to match the correct hostname (ray-f3lz). - Participants are advised to reference Google Docs for correct configuration values.
- Instructor confirms file edits and instructs restart of computer to apply changes.
2. Database Debugging and Table Inspection Using SQL*Plus [00:01:56 - 00:03:17]
- Instructor shifts focus to debugging using SQL*Plus to inspect the
employeestable. - Participants attempt to query the table and receive an error indicating missing
first_namecolumn. - Instructor demonstrates use of
DESCRIBE employeesto inspect table structure. - Confirms that
employeestable lacksfirst_nameandsalarycolumns. - Instructor advises removing prior test code to avoid interference and prepares for table modification.
3. Altering the Employees Table: Adding Columns [00:03:17 - 00:05:03]
- Instructor demonstrates filtering tables in SQL Developer by typing “employees” in the filter box for quick access.
- Introduces SQL
ALTER TABLEsyntax to add two new columns:first_name(VARCHAR) andsalary(DECIMAL). - Code example is provided via Google Docs; participants instructed to execute in SQL Developer or terminal.
- Multiple participants (Sir Joseph, Sir Miguel) attempt the command but encounter syntax errors.
- Instructor identifies common error: incorrect column name (
first employeesinstead offirst_name) and misplaced commas.
4. Correcting Syntax and Verifying Table Alteration [00:05:03 - 00:06:19]
- Instructor corrects syntax: instructs Sir Jerry to place
ADDon a new line and remove trailing comma. - Participants re-run:
ALTER TABLE employees ADD first_name VARCHAR2(50), ADD salary DECIMAL; - Confirmed successful execution via
DESCRIBE employees— now showsfirst_nameandsalarycolumns. - Instructor emphasizes need to select/refresh view to see updated structure.
- Participants are instructed to remove prior test code to prepare for next step (SELECT queries).
5. System Restart and Final Validation [00:06:19 - 00:06:53]
- Instructor notes that Sir Ray and Mame Christine are restarting their systems to ensure configuration persistence.
- Instructor checks Sir Joseph’s screen to confirm successful table alteration.
- Final check: participants confirm no errors after restart and refresh.
- Session ends with instructor preparing to proceed to next step (SELECT queries), though not fully executed in transcript.
Appendix
Key SQL Commands
DESCRIBE employees— inspect table structureALTER TABLE employees ADD first_name VARCHAR2(50), ADD salary DECIMAL;— add columns (correct syntax)hostname— verify system hostname for connection configuration
Tools Used
- Oracle SQL Developer
- SQL*Plus
- Command Prompt / Terminal
- Text editor (e.g., Code) for editing
listener.ora
Common Pitfalls
- Incorrect hostname in
listener.ora→ connection failure - Syntax errors in
ALTER TABLE: usingfirst employeesinstead offirst_name, or trailing commas - Not restarting system after config changes → changes not applied
- Not refreshing table list in SQL Developer after alteration → column not visible
Action Items for Learners
- Verify hostname matches
listener.oraconfiguration - Always use
DESCRIBEto confirm table structure after DDL changes - Restart services or system after modifying Oracle network config files
- Use Google Docs as reference for correct SQL syntax and file paths