Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Oracle APEX Best Practices

You're reading from   Oracle APEX Best Practices Make the most of Oracle Apex with this guide to best practices. It will help you look at the bigger picture when building applications and take more elements into account such as security and performance.

Arrow left icon
Product type Paperback
Published in Nov 2012
Publisher Packt
ISBN-13 9781849684002
Length 298 pages
Edition 1st Edition
Arrow right icon
Toc

Table of Contents (14) Chapters Close

Oracle APEX Best Practices
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1. Prepare and Build 2. Leveraging the Database FREE CHAPTER 3. Printing 4. Security 5. Debugging and Troubleshooting 6. Deploy and Maintain Database Cloud Service and APEX 4.2 Index

Installing APEX


In this section, we will discuss some additional considerations to take care of while installing APEX. The best source for the installation process is the Installation Guide of APEX.

Runtime or full development environment

On a production database, the runtime environment of APEX should be installed. This installation lacks the Application Builder and the SQL Workshop. Users can run applications, but the applications cannot be modified. The runtime environment of APEX can be administered using SQL*Plus and SQL Developer. The (web interface) options for importing an application, which are only available in a full development environment, can be used manually with the APEX_INSTANCE_ADMIN API. See the reference guide for details. Using a runtime environment for production is recommended for security purposes, so that we can be certain that installed applications cannot be modified by anyone.

On a development environment the full development environment can be installed with all the features available to the developers.

Build status

Besides the environment of APEX itself, the applications can also be installed in a similar way. When importing or exporting an application the Run Application Only or Run and Build Application options can be selected.

Changing an application to Run Application Only can be done in the Application Builder by choosing Edit Application Properties. Changing the Build Status to Run and Build Application can only be done as the admin user of the workspace internal. In the APEX Administration Services, choose Manage Workspaces and then select Manage Applications | Build Status. Also refer to Chapter 6, Deploy and Maintain.

Another setting related to the Runtime Only option could be used in the APEX Administration Services at instance level. Select Manage Instance and then select Security. Setting the property Disable Workspace Login to yes, acts as setting a Runtime Only environment, while still allowing instance administrators to log in to the APEX Administration Services.

Tablespaces

Following the install guide for the full development environment, at a certain moment, we have to run the following command, when logged in as SYS with the SYSDBA role, on the command line:

@apexins tablespace_apex tablespace_files tablespace_temp images

The command is explained as follows:

  • tablespace_apex is the name of the tablespace that contains all the objects for the APEX application user.

  • tablespace_files is the name of the tablespace that contains all the objects for the APEX files user.

  • tablespace_temp is the name of the temporary tablespace of the database.

  • images will be the virtual directory for APEX images. Oracle recommends using /i/ to support the future APEX upgrades.

For the runtime environment, the command is as follows:

@apxrtins tablespace_apex tablespace_files tablespace_temp images

In the documentation, SYSAUX is given as an example for both tablespace_apex and tablespace_files. There are several reasons for not using SYSAUX for these tablespaces, but to use our own instead:

  • SYSAUX is an important tablespace of the database itself

  • We have more control over sizing and growth

  • It is easier for a DBA to manage tablespace placement

  • Contention in the SYSAUX tablespace is less occurring

  • It's easier to clean-up older versions of APEX

  • And last but not least, it's only an example

Converting runtime environment into a full development environment and vice versa

It's always possible to switch from a runtime to a production environment and vice versa. If you want to convert a runtime to a full development environment log in as SYS with the SYSDBA role and on the command line type @apxdvins.sql. For converting a full development to a runtime environment, type @apxdevrm—but export websheet applications first. For more details see the installation guide.

Another way to restrict user access can be accomplished by logging in to the APEX Administration Services, where we can (among others) manage the APEX instance settings and all the workspaces. We can do that in two ways:

  • http://server:port/apex/apex_admin: Log in with the administrator credentials

  • http://server:port/apex/: Log in to the workspace internal, with the administrator credentials

After logging in, perform the following steps:

  1. Go to Manage Instance.

  2. Select Security.

  3. Select the appropriate settings for Disable Administrator Login and Disable Workspace Login. These settings can also be set manually with the APEX_INSTANCE_ADMIN API. See the reference guide for details.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image