0% found this document useful (0 votes)
141 views32 pages

Oracle APEX Learner Guide

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
141 views32 pages

Oracle APEX Learner Guide

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Oracle Academy Oracle APEX Learner Guide

Contents Page
Using Oracle Academy Cloud Program Oracle APEX on Autonomous Database .......................... 2
1. Logging in to Oracle APEX – on an Autonomous Database (Cloud only) ................................. 2
2. First Time Logging in to Oracle APEX – on an Autonomous Database ..................................... 2
3. Changing your Oracle APEX Cloud Password.................................................................................. 8
4. Unlocking/Locking your Oracle APEX Cloud Account ............................................................... 10
5. Adding an Instructor Account to your Workspace ...................................................................... 13

Using Oracle Academy APEX ...........................................................................................................16


1. Logging in to Oracle Academy APEX .............................................................................................. 16

Content for all APEX environments: ...............................................................................................16


1. Oracle APEX Components ................................................................................................................. 16
2. How to add tables and data to APEX accounts............................................................................. 17
3. Using SQL Commands from the SQL Workshop Component ....................................................... 20
4. General Overview SQL Commands Window ................................................................................. 21
5. Saving a SQL or PL/SQL Statement ................................................................................................ 24
6. Accessing a Saved SQL or PL/SQL Statement ............................................................................. 24
7. Using the History Option ................................................................................................................... 26
8. Using the Explain Option ................................................................................................................... 27
9. Using the Object Browser tool from the SQL Workshop Component .................................... 27
10. Using SQL Scripts tool from the SQL Workshop Component ..................................................... 28
11. Creating Scripts .................................................................................................................................... 28
12. Viewing Scripts ..................................................................................................................................... 29
13. Running Scripts .................................................................................................................................... 30
14. Upload Scripts ....................................................................................................................................... 31

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
1
Introduction
This document will help Oracle Academy learners and instructors become familiar with how to use
Oracle APEX and each of its components from an end user’s perspective. If you would like to learn
more about the instructor’s capabilities of Oracle APEX, please refer to the Oracle APEX Instructor
Guide.

Using Oracle Academy Cloud Program Oracle APEX on Autonomous Database


1. Logging in to Oracle APEX – on an Autonomous Database (Cloud only)
Note: It is recommended that learners keep all passwords associated with their Cloud, Autonomous
DB, and APEX accounts the same.

1. Look for Cloud account setup email – set up account – document password.
2. Follow instructor’s instructions for setting up Autonomous Database.
3. Complete the following instructions for creating your APEX workspace.
4. Email your instructor the link to your APEX workspace.

2. First Time Logging in to Oracle APEX – on an Autonomous Database


Creating APEX Cloud Workspace:

1. Sign into your Oracle Cloud Account.


Click the Navigation menu (top left), select Autonomous Database.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
2
2. Click <Your Database> from the list.

Note: If your database is stopped (no activity for a period of 7 consecutive days) see the
Autonomous Database Startup guide for instructions on restarting your Autonomous
Database.

3. Click Database actions > View all database actions.

4. Select APEX under the Development section.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
3
5. Sign into Administration Services using the password supplied for administrator credentials
when creating your Autonomous Database instance, click Sign In to Administration.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
4
6. Given this is your first-time entering APEX, click Create Workspace.

7. Select New Schema.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
5
8. For Workspace Name, enter an appropriate name. This will be the same for the Workspace
Username. Then, enter a password to be used for APEX. Follow Oracle password guidelines
shown here.

Note: It is recommended this remain the same as your Admin password.

9. Click Create Workspace.

10. Click on the link within the success message.

Note: If you miss the above link then to switch, click your admin account at the top right and
select Log Out.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
6
11. Sign into your new Workspace using credentials established in step 8.

12. You will see your workspace at the top right. Begin using APEX!

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
7
3. Changing your Oracle APEX Cloud Password
1. Sign in to your Oracle Cloud Account, click <Your Database> from the list, click the Database
actions dropdown and select SQL.

2. If not already, sign in with Username: ADMIN and your Admin password established when
first creating your APEX account.

Note: If you need to reset your Admin password, see the Autonomous Database Startup
Guide.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
8
3. Once in SQL Developer – enter the following command to reset your password:
alter user <APEX user name> identified by <new password>
(follow Oracle password guidelines shown here)

4. Click the Run button – you will see a message that password has been altered.

5. You can now log into APEX using the new password.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
9
4. Unlocking/Locking your Oracle APEX Cloud Account

1. Sign in to your Oracle Cloud Account, click <Your Database> from the list.\

2. Click Database actions, View all database actions.

3. Select APEX under the Development section.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
10
4. Sign into Administration Services using the password supplied for administrator credentials
when creating your Autonomous Database instance, click Sign In to Administration.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
11
5. Click on Manage Workspaces and then Manage Developers and Users

6. Select a user and the Create/Edit User page appears then scroll down to Account Privileges.

7. Using the Account Availability dropdown, select the Unlocked option to make the account
available, or Locked to make the account unavailable.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
12
5. Adding an Instructor Account to your Workspace
To allow your instructor to view your work you must add them as a user to your workspace. Your
instructor will then be able to login to your workspace and view saved queries and procedures,
scripts and database objects.

1. Logon to APEX and select Manage Users and Groups from the Administration drop down.

2. Click Create User.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
13
3. Supply a Username, Email Address, make the account a workspace administrator and
provide a password.

Note: It is suggested that for ease of use that the learner use the standard username of
teacher_1 and password of “Teacher12345”.

4. The instructor account now appears in the learner’s list of Users.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
14
5. You must now provide your instructor with a link to their APEX account.
a. Go back to the Autonomous Database details page and click Database actions, View
all database actions.

b. Right click the APEX box and select “copy link address”. Provide this address to your
instructor.

Note: The link will look something like this:


https://s999999999-oadb.adb.us-city-1.oraclecloudapps.com/ords/apex

6. Your instructor can now use this link to access your Autonomous Database APEX instance.

Provide your instructor with your workspace name as well as the instructor account
username and password you created for them. They will then be able to log on to your
workspace to view saved queries and procedures, scripts and database objects.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
15
Using Oracle Academy APEX
1. Logging in to Oracle Academy APEX
Please check with your instructor for APEX logon instructions and account information.

Content for all APEX environments:


1. Oracle APEX Components
Once you log into Oracle APEX you will see the Oracle APEX home page. This page displays all of
the components of Oracle APEX: Application Builder, SQL Workshop, Team Development and
Gallery.

• App Builder: Allows you to create, view or monitor applications.


• SQL Workshop: You can create, manage, and view the database objects from a Web browser
using SQL Workshop.
• Team Development: facilitates the management of the application development process.
• Gallery: a suite of business productivity applications.

SQL Workshop is the main component that is used with the Database Programming with SQL and
PL/SQL course curriculum. Note that the tabs at the top of the page provide quick access to these
components.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
16
2. How to add tables and data to APEX accounts
In order to have access to the tables and data used throughout the course a Script file, that can be
accessed in the member hub, must be run in the instructor account and all learner accounts.

The instructor should do this as a “run-through” with the class following the instructions below. This
method ensures that learners understand and can download and run the scripts in their own
schemas.

1. To obtain the script file consult your instructor. Save the file on your computer.

2. Open APEX in your browser and login.

3. Select SQL Workshop.

4. Select SQL Scripts.

5. Click Upload.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
17
6. Click Choose File and navigate to the file you obtained in Step 1.

7. Add a Script Name - SQL Add All Tables or PLSQL Add All Tables, leave File Character Set
as default (Unicode UTF-8), and click Upload.

8. You will now see the Script listed. Click the Run icon.

9. Click Run Now.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
18
10. You can view the results, however, your first attempt to run the script will generate errors on
the DROP statements due to the tables not already existing in the schema.

11. Click the SQL Workshop tab.

12. Click Object Browser.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
19
13. You should now see the tables listed on the left of the Object Browser page. These are the
tables (and data) that will be used in the curriculum for your course(s).

NOTE: The Script can be run again at a later date to revert the schema to its original state in
the event of accidently modifying or deleting data.

3. Using SQL Commands from the SQL Workshop Component


Click on the SQL Workshop icon. On the SQL Workshop home page you will see the five tools
available from SQL Workshop:

• Object Browser
• SQL Commands
• SQL Scripts
• Utilities
• RESTful Services

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
20
The SQL Commands icon will link to where you will enter and practice SQL and PL/SQL coding in
the Database Programming with SQL or PL/SQL course. You can use the SQL Commands tool to
run SQL or PL/SQL statements on any Oracle database schema to which you have access privileges.

4. General Overview SQL Commands Window


Refer to the graphics below for information about the SQL Commands window:

1. Schema: The drop down menu only displays the schemas to which you have been granted
access.

2. Statement window: Type SQL or PL/SQL commands in this window.

3. Run button: Click this button to execute the SQL or PL/SQL statement.

4. Save button: You have the ability to run your SQL or PL/SQL statement or save it for future
use. To limit the number of times you enter a common SQL or PL/SQL statement, save the
statement by clicking the Save button.

1
4
2
3

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
21
5. After a SQL or PL/SQL statement is executed, the results are displayed in the Results
window. An error message displays if there is a problem with the SQL or PL/SQL command.

6. Rows: The Rows drop down menu lets you select the number of rows you would wish to
display.

7. Gallery: The Gallery can quickly take you back to any of the 4 main components of the Oracle
Application Express.

8. Saved SQL: Click on this tab to display your list of saved SQL and PL/SQL commands.

9. History: Displays a list of the recently executed SQL and PL/SQL commands.

8 9
5

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
22
Additional features to note about the Results window (see graphic below):

1. If you want to create a file of the output results:

a. Click on the Download link.

b. A Pop-up window will appear. Select from Open or Save this file.

c. If you select Open then it will open the results in a Microsoft Excel spreadsheet. From
Microsoft Excel you can then do a Save As to save the file in this format.

d. If you select Save then it will save it as a .csv (comma separated value) file. A pop-up
will allow you to select the saved filename and location.

2. Click on the Clear Command button to clear the Statement Window.

3. Click on the Find Tables button to see a list of table names.

2 3

1
Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
23
5. Saving a SQL or PL/SQL Statement
To limit the number of times you enter a common SQL or PL/SQL statement, save the statement by
clicking the Save button. To save the SQL commands:

1. Click on the Save button in the SQL command window.

2. A pop-up window will appear where you can enter the name (mandatory) and description
(optional) of the file.

3. Click the Save button when done.

6. Accessing a Saved SQL or PL/SQL Statement


The saved SQL or PL/SQL commands can be accessed, executed, modified and deleted (see
graphic below).

1. To display the list of saved SQL or PL/SQL commands: click on the Saved SQL tab.

2. To execute a saved SQL or PL/SQL command: click on the Name of the saved SQL or
PL/SQL command. You will see it displayed in the statement window. You can now click on
the Run button to execute these commands.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
24
3. To edit a saved SQL or PL/SQL command: click on the Name of the saved SQL or PL/SQL
command. You will see it displayed in the statement window. Edit the command, as needed
then click on the Save button. The pop-up window will contain the original information. You
can either keep it or edit the information or save to a new filename.

4. To delete a saved SQL or PL/SQL command:


a. Click on the box in front of the name of the saved command you wish to delete.

b. Click on the Delete Checked button.

5. To search for a SQL or PL/SQL command: enter a key word in the Find box, then click on the
Go Button.

1
5 4b
4a

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
25
7. Using the History Option
A list of the latest run SQL or PL/SQL commands are kept in History. By default they are listed the
most recently run commands. There are different options to note in the History window.

1. Click on the History tab.

2. To search for a previously used command: Enter a key search word in the Find box then click
on the Go button.

3. To re-execute the SQL or PL/SQL command: Click on the SQL or PL/SQL you wish to
execute. You will see it displayed in the Statement Window. Click on the Run button to
execute the SQL commands.

1
2

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
26
8. Using the Explain Option
Either type in a SQL or PL/SQL command in the Statement window or select a command from
History or Saved SQL, then click on the Explain tab to see a graphic explanation of SQL or PL/SQL
command in the Results window.

9. Using the Object Browser tool from the SQL Workshop Component
The Object Browser can be used to create or browse objects (Objects and Data) in your schema.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
27
10. Using SQL Scripts tool from the SQL Workshop Component
The SQL Scripts tool can be used to view, create or upload SQL or PL/SQL scripts. A SQL or PL/SQL
script is one or more SQL or PL/SQL statements that are executed sequentially. Each statement
must have a semi-colon at the end of the statement.

1. To access the SQL Scripts page, click SQL Workshop.

2. Click SQL Scripts.

11. Creating Scripts


To access the script editor window you click the Create button from the SQL Scripts page.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
28
To create a new script:

1. Give your script a name.

2. Enter in the SQL or PL/SQL commands.

3. Click the Create button to save your script or click the Run button to execute your script.

1
3 4
2

12. Viewing Scripts


1. To view scripts loaded into the SQL Script tool, select SQL Workshop, SQL Scripts and click
on the Edit icon (pencil) next to the script to be viewed.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
29
2. The contents of the script are displayed in the Script Editor window.

13. Running Scripts


1. To run a script, click the Run icon next to the script you wish to execute.

2. Click the Run Now button.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
30
3. The following is a sample of the type of detailed results information you might see.

14. Upload Scripts


Before you upload a script into the Script Repository, you must first create it in a text editor on your
desktop. When saving your script, make sure to save it as a .sql file. Sometimes programs will add
an extension to your .sql and cause problems. For example, cre_dept.sql may sometimes be
saved as cre_dept.sql.doc. If this is a problem, place double quotes around the title of the script
when saving – “cre_dept.sql”.

1. You can access the upload window by selecting Upload from the SQL Scripts page.

2. Click Choose File and navigate to the file on your PC.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
31
3. Add a Script Name, leave File Character Set as default (Unicode UTF-8), and click Upload.

4. You will see the uploaded Script listed on the SQL Scripts page in addition to any Scripts that
you created in APEX using the Script Editor.

Copyright © 2024, Oracle and/or its affiliates. Oracle®, Java, MySQL and NetSuite are registered trademarks of Oracle and/or its affiliates. Other
names may be trademarks of their respective owners.
32

You might also like