Wednesday, 25 December 2024

Oracle APEX

Oracle Apex 24.1.0 Installation Guideline:-----

==============================================


---Install JDK 11/17 and above and set the Env. Variable


Step - 1

========= 

Command for check Oracle Apex Older Version


SQL> alter session set container=STAND;


Session altered.


SQL> select version_no from apex_release;     #Apex Version Check


Command for View Apex Users:-

==============================

select username,account_status  from dba_users where username like 'APEX%'

=========================================================

Step - 2

==========

Notes:- (Before Submit This Path Carefully Check In This Path Same to With Your Installation    Directory Path).


Command for Install Oracle Apex New Version:-


Copy Apex New Version and Past to Your Apex Installation Path Like "C:\Oracle\app"


Run cmd write Apex Installation Directory Path Like  "cd C:\Oracle\app\apex"  (Press Enter)

              

c:   (Press Enter)


sqlplus   (Press Enter)


Write Your SYS Username:   sys@orcldb as sysdba      (Press Enter)

Write Your SYS Password :         (Press Enter)



show parameter create


CREATE TABLESPACE apex_orcl DATAFILE '/path/to/datafiles/apex01.dbf' SIZE 100M AUTOEXTEND ON NEXT 1M;



@apexins.sql apex_orcl apex_orcl temp /i/         (This command for copy image)   (Press Enter)


@apxchpwd.sql       (Press Enter)


User Name Auto come:- ADMIN

Write Your Email:-                                            (Press Enter)

Write Your Password :-                                   (Press Enter)

Password: Apex_123


@apex_rest_config.sql      (Passwords for all Normal Users:-  (Apex_123))


======================================================

(Must be Unlock Under This (APEX%) Users):-

======================================================

alter user APEX_240100 account unlock identified by Apex_123;

alter user APEX_PUBLIC_USER account unlock identified by Apex_123;

alter user ANONYMOUS account unlock identified by Apex_123;

alter user APEX_LISTENER account unlock identified by Apex_123;

alter user APEX_REST_PUBLIC_USER account unlock identified by Apex_123;

alter user APEX_PUBLIC_ROUTER account unlock identifed by Apex_123;


alter user APEX_INSTANCE_ADMIN_USER account unlock identified by Apex_123;


=========================================================

Help US By Like ,Share, Comment and Subscribe This Video for Make More Tutorials for You. Thanks !

=========================================================

#oracleapex #downloadoracleapex #installoracleapex #oracleapex20.2 #ittechbd

=========================================================


SELECT DBMS_XDB.gethttpport FROM DUAL;

EXEC DBMS_XDB.sethttpport(8080);


Note: This port set for access apex access via ords, if standalone then fine.

But on the same host running 2+ databases including apex and ord so make sure using different port otherwise conflict happen.

 


#######################################################################################################################################


ORDS-24.1 Installation Guide:---------

=======================================

Instructions:

=============

Oracle APEX on two different databases (e.g., one for production and one for non-production) on a single host. This setup involves the following steps:


Setup Overview

Install Oracle APEX on Both Databases: Ensure both databases have Oracle APEX installed.

Configure Separate ORDS Instances: Use Oracle REST Data Services (ORDS) to create separate configurations for each database.

Deploy ORDS Configurations to Separate Web Servers or Ports: Each database will have its own ORDS instance, serving as a separate APEX console.

Access via Separate URLs: Each configuration will provide unique URLs for accessing the APEX consoles.


Steps to Configure APEX for Two Databases


Step 1: Install APEX on Both Databases

Download and install Oracle APEX in each database (if not already installed).

Run the apxins.sql script for each database to configure APEX. As mentioned above.



Step - 1

========

Command for View ORDS Users:-

==============================

select username,account_status  from dba_users where username like 'ORDS%';

=========================================================

Step - 2

========

Notes:- (Before Submit This Path Carefully Check In This Path Same to With Your Installation    Directory Path).


Provide Ords Directory path and hit "Enter" button. "cd E:\app\oracle\base\oradata\ords"


mkdir -p E:\app\oracle\base\oradata\ords\config\stand\config

mkdir -p E:\app\oracle\base\oradata\ords\config\orcl\config



Note: copy image directory from Apex to ords config in my case i have done under below

E:\app\oracle\base\oradata\ords\config\orcl

E:\app\oracle\base\oradata\ords\config\stand

=====================================================

Now run this command "java -jar ords.war install"



--Note: This Option execute only when 2+ database running on same host with mutiple apex so ords should be mutiple instance dependent.

java -jar ords.war --config E:\app\oracle\base\oradata\ords\config\stand\config install


        at oracle.dbtools.launcher.executable.jar.ExecutableJarEntrypoint.invoke(ExecutableJarEntrypoint.java:59)

        at oracle.dbtools.launcher.executable.jar.ExecutableJarEntrypoint.main(ExecutableJarEntrypoint.java:84)

  Enter a number to select the database connection type to use

    [1] Basic (host name, port, service name)

    [2] TNS (TNS alias, TNS directory)

    [3] Custom database URL

  Choose [1]: 1

  Enter the database host name [localhost]:

  Enter the database listen port [1521]:

  Enter the database service name [orcl]: stand

  Provide database user name with administrator privileges.

    Enter the administrator username: sys

  Enter the database password for SYS AS SYSDBA:


Retrieving information.

ORDS is not installed in the database. ORDS installation is required.



----> Update the Values  according to option.


  Enter a number to update the value or select option A to Accept and Continue

    [1] Connection Type: Basic

    [2] Basic Connection: HOST=localhost PORT=1521 SERVICE_NAME=stand

           Administrator User: SYS AS SYSDBA

    [3] Database password for ORDS runtime user (ORDS_PUBLIC_USER): <specified password>

    [4] ORDS runtime user and schema tablespaces:  Default: APEX Temporary TEMP

    [5] Additional Feature: Database Actions

    [6] Configure and start ORDS in Standalone Mode: Yes

    [7]    Protocol: HTTP

    [8]       HTTP Port: 8080

    [9]   APEX static resources location: E:\app\oracle\base\oradata\ords\config\stand\images

    [A] Accept and Continue - Create configuration and Install ORDS in the database

    [Q] Quit - Do not proceed. No changes

  Choose [A]:

..

..

..

db.username=ORDS_PUBLIC_USER

standalone.http.port=8080

standalone.static.path=E:\app\oracle\base\oradata\ords\config\stand\images

restEnabledSql.active=true

resource.templates.enabled=false

plsql.gateway.mode=proxied

db.port=1521

feature.sdw=true

config.required=true

db.connectionType=basic

standalone.doc.root=E:\app\oracle\base\oradata\ords\config\stand\config\global\doc_root


2024-12-02T20:26:17.777Z WARNING     *** jdbc.MaxLimit in configuration |default|lo| is using a value of 10, this setting may not be sized adequately for a production environment ***

2024-12-02T20:26:17.796Z WARNING     *** jdbc.InitialLimit in configuration |default|lo| is using a value of 10, this setting may not be sized adequately for a production environment ***

2024-12-02T20:26:21.391Z INFO


Mapped local pools from E:\app\oracle\base\oradata\ords\config\stand\config\databases:

  /ords/                              => default                        => VALID



2024-12-02T20:26:22.344Z INFO        Oracle REST Data Services initialized

Oracle REST Data Services version : 24.3.1.r3061450

Oracle REST Data Services server info: jetty/10.0.21

Oracle REST Data Services java info: Java HotSpot(TM) 64-Bit Server VM 17.0.13+10-LTS-268

..

..

..


=========================================================

Step - 3

=========

Login Info:-

http://localhost:8080/ords

http://localhost:8080/ords/apex_admin

=========================================================

Help US By Like, Share, Comment and Subscribe This Video for Make More Tutorials for You. Thanks !

=========================================================

#ords #downloadords #installords #oracleapex20.1 #oracleapex20.2

=========================================================


========================================2ND ORDs Setup For Prod on same host=========================================================

create directory E:\app\oracle\base\oradata\ords\config\orcl\config


cmd>


E:


cd E:\app\oracle\base\oradata\ords\config\orcl\


java -jar ords.war --config E:\app\oracle\base\oradata\ords\config\orcl\config install

..

..

..

  Enter a number to update the value or select option A to Accept and Continue

    [1] Connection Type: Basic

    [2] Basic Connection: HOST=localhost PORT=1521 SERVICE_NAME=ORCL

           Administrator User: SYS AS SYSDBA

    [3] Database password for ORDS runtime user (ORDS_PUBLIC_USER): <generate>

    [4] ORDS runtime user and schema tablespaces:  Default: APEX_ORCL Temporary TEMP

    [5] Additional Feature: Database Actions

    [6] Configure and start ORDS in Standalone Mode: Yes

    [7]    Protocol: HTTP

    [8]       HTTP Port: 8091

    [9]   APEX static resources location: E:\app\oracle\base\oradata\ords\config\orcl\images

    [A] Accept and Continue - Create configuration and Install ORDS in the database

    [Q] Quit - Do not proceed. No changes

  Choose [A]: A



Login Info:-

http://localhost:8091/ords

http://localhost:8091/ords/apex_admin


  

#####################################################################################################################################


How to Auto Runs (ORDS 24.1) from Windows Services In Apex 24.3 Using (NSSM) - the Non-Sucking Service Manager.

=================================================================================================================

Step - 1

========

Notes:- (Before Submit This Path Carefully Check In This Path Same to With Your Installation    Directory Path).


Command for Auto Run Ords:-

@echo on

cd E:\app\oracle\base\oradata\ords\config\orcl\bin

ords --config E:\app\oracle\base\oradata\ords\config\orcl\config serve

pause


Service Name:- AutoRunOrds.bat

=========================================================

Step - 2

========

Command for Delete Ords Services:-

sc delete "AutoRunOrds"


#####################################################################################################################################

=========================================================

ORDS-20.3 Remove or Uninstall Guide:---------


Select User 'ORDS%' by Under Command 

=========================================================

select username,account_status  from dba_users where username like 'ORDS%'


Provide Ords Directory path and hit "Enter" button. "cd C:\Oracle\app\ords "

=========================================================

Now run this command "java -jar ords.war uninstall"

=========================================================

Service_Name = Write Your Database Name.

=========================================================


#######################################################################################################################################


Apex Version Check:

===================

select version_no from apex_release;     #Apex Version Check


ORDS Version Check:

===================

E:\app\oracle\base\oradata\ords\config\orcl\bin>ords.exe --version

ORDS: Release 24.3 Production on Fri Dec 06 03:50:43 2024

Copyright (c) 2010, 2024, Oracle.


Configuration:

  E:\app\oracle\base\oradata\ords\config\orcl\bin


Oracle REST Data Services 24.3.1.r3061450



#######################################################################################################################################


APX Security Patch download :

==============================

https://www.oracle.com/tools/downloads/apex-downloads/


Patch Apply Steps for Oracle APEX (Patch Set: p36695709_2410_GENERIC.zip)

===========================================================================

1. Download the Patch

Download the patch set archive p36695709_2410_GENERIC.zip from Oracle Support (My Oracle Support).


2. Unzip the Patch Files

For Windows: Double-click the p36695709_2410_GENERIC.zip file to extract it.

For Linux/UNIX: Use the following command to unzip the patch:

unzip p36695709_2410_GENERIC.zip


3. Prevent Access to Oracle APEX

Ensure no developers or end users are accessing Oracle APEX during the patch process.

Stop Oracle REST Data Services (ORDS):

Follow the instructions in the Oracle REST Data Services Installation and Configuration Guide to stop the server.


Example command to stop ORDS on Linux:

cd $ORDS_HOME

./ords stop


4. Set the Current Directory

Change your working directory to the folder where the patch files were extracted:

cd /path/to/36695709


5. Set the NLS_LANG Environment Variable

Ensure that the NLS_LANG environment variable is set to AL32UTF8 to avoid character set issues.


For UNIX/Linux (Bourne or Korn shell):

export NLS_LANG=American_America.AL32UTF8


For UNIX/Linux (C shell):

setenv NLS_LANG American_America.AL32UTF8


For Windows:

set NLS_LANG=American_America.AL32UTF8



6. Run the Patch Scripts

For Oracle Database 19c and newer, run the appropriate patch script from SQL*Plus:

sqlplus sys as sysdba @catpatch.sql           -- For non-CDB or PDB



sqlplus sys as sysdba @catpatch_con.sql       -- For CDB where APEX is in the root

sqlplus sys as sysdba @catpatch_appcon.sql    -- For Application Container



7. Install the Patch Set Exception’s Changes (Images Directory)

Copy the images directory from the patch to the APEX installation directory:


On Windows:

xcopy /E /I c:\temp\images ORACLE_APEX_HOME\apex\images


On UNIX/Linux:

cp -rf /tmp/images ORACLE_APEX_HOME/apex

Note: Replace ORACLE_APEX_HOME with the actual path of your APEX installation directory.


8. Start Oracle APEX Services

Start Oracle REST Data Services (ORDS):

Follow the instructions in the Oracle REST Data Services Installation and Configuration Guide to restart ORDS.


Example command to start ORDS on Linux:

cd $ORDS_HOME

./ords start


Important Notes

Backups: Always back up your database and APEX installation before applying any patches.

Patch Version: Ensure that the patch set you are applying is compatible with your current version of Oracle Database and APEX.

Post-apply testing: After applying the patch, verify that Oracle APEX is functioning correctly by accessing the APEX interface and checking for errors in the logs.


select patch_version, installed_on from apex_patches where patch_number = 36695709;


select * from apex_release;


you can view in apex page also.


#######################################################################################################################################


==============================

ORDS Security Patch download:

==============================

No patch just replace the bainaries if needed otherwise no need.


#######################################################################################################################################


ISSUE:

=======


1.

While Installing ORDS getting below message

"Error the ORDS_PUBLIC_USER already exists and the ORDS_METADATA schema does not exist. Reason: This may be caused by a previous unsuccessful ORDS install, uninstall or the ORDS_METADATA schema was dropped manually. Action: Reinstall ORDS (uninstall and install ORDS)."

java -jar ords.war uninstall #First and try to install again. 


2.

ORDS: WARNING     *** jdbc.MaxLimit in configuration |default|lo| is using a value of 10, this setting may not be sized adequately for a production environment ***


No comments: