Monday, March 29, 2021

Removing the existing APEX


Removing the existing APEX 

 

SQL> @apxremov.sql

 

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

...Removing Application Express

...set_appun.sql

Session altered.

PL/SQL procedure successfully completed.

...set_ufrom_and_upgrade.sql

PL/SQL procedure successfully completed.

Session altered.

PL/SQL procedure successfully completed.

...set_appun.sql

Session altered.

PL/SQL procedure successfully completed.

...set_ufrom_and_upgrade.sql

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

...set_appun.sql

Session altered.

PL/SQL procedure successfully completed.

...set_ufrom_and_upgrade.sql

PL/SQL procedure successfully completed.

User dropped.

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

Package dropped.

PL/SQL procedure successfully completed.

...Application Express Removed

 

********************************************************************

** You must exit this SQL*Plus session before running apexins.sql **

********************************************************************


set the apex lisneter port to 0

Sunday, March 28, 2021

APEX INSTALLATION 18.1

 

 

APEX INSTALLATION 18

 

Download the software

 [oracle@localhost ~]$ wget -O apex_18.1.zip https://download.oracle.com/otn/java/appexpress/apex_18.1.zip?AuthParam=1616946282_d2dd2313684dbf4274c4b77f5ad0434c

--2021-03-28 11:43:03--  https://download.oracle.com/otn/java/appexpress/apex_18.1.zip?AuthParam=1616946282_d2dd2313684dbf4274c4b77f5ad0434c

Resolving download.oracle.com (download.oracle.com)... 2.22.72.113

Connecting to download.oracle.com (download.oracle.com)|2.22.72.113|:443... connected.

HTTP request sent, awaiting response... 200 OK

Length: 149875516 (143M) [application/zip]

Saving to: ‘apex_18.1.zip’

 100%[====================================================================================================>] 149,875,516 3.81MB/s   in 40s

 2021-03-28 11:43:45 (3.56 MB/s) - ‘apex_18.1.zip’ saved [149875516/149875516]

 Unzip the software

[oracle@localhost ~]$ unzip apex_18.1.zip -d /u01/oracle/apex/

 [oracle@localhost apex]$ ls

apex_epg_config_cdb.sql    apex_rest_config_cdb.sql    apxdvins_cdb.sql    apxpatch.sql        apxrtins_cdb_upg.sql  coreins3.sql

apex_epg_config_core.sql   apex_rest_config_core.sql   apxdvins_nocdb.sql  apxrelod.sql        apxrtins_nocdb.sql    coreins4.sql

apex_epg_config_nocdb.sql  apex_rest_config_nocdb.sql  apxdvins.sql        apxremov1.sql       apxrtins.sql          coreins5.sql

apex_epg_config.sql        apex_rest_config.sql        apxe101.sql         apxremov2.sql       apxsdoins.sql         coreins.sql

 Create the Tablespace

 SQL> CREATE TABLESPACE APEX DATAFILE '/u01/app/oracle/oradata/ranesh/apex01.dbf' SIZE 2G;

 Tablespace created.

 Check the APEX is installed or not

 SQL>  SELECT comp_name, version, status FROM dba_registry WHERE comp_id='APEX';

 [oracle@localhost ~]$ chmod -R 775 apex

[oracle@localhost ~]$ chmod -R 775 apex_18.1.zip

 [oracle@localhost apex]$ sqlplus / as sysdba

 SQL*Plus: Release 19.0.0.0.0 - Production on Sun Mar 28 12:07:19 2021

Version 19.3.0.0.0

 Copyright (c) 1982, 2019, Oracle.  All rights reserved.

 Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

 Installation of APEX 18.1:-

 SQL> @apexins APEX APEX TEMP /i/

...set_appun.sql

 PL/SQL procedure successfully completed.

 Thank you for installing Oracle Application Express 18.1.0.00.45

 Oracle Application Express is installed in the APEX_180100 schema.

 The structure of the link to the Application Express administration services is as follows:

http://host:port/pls/apex/apex_admin (Oracle HTTP Server with mod_plsql)

http://host:port/apex/apex_admin     (Oracle XML DB HTTP listener with the embedded PL/SQL gateway)

http://host:port/apex/apex_admin     (Oracle REST Data Services)

 The structure of the link to the Application Express development interface is as follows:

http://host:port/pls/apex (Oracle HTTP Server with mod_plsql)

http://host:port/apex     (Oracle XML DB HTTP listener with the embedded PL/SQL gateway)

http://host:port/apex     (Oracle REST Data Services)

 timing for: Phase 3 (Switch)

Elapsed: 00:02:13.35

timing for: Complete Installation

Elapsed: 00:12:39.66

 PL/SQL procedure successfully completed.

 

The above script create some SCHEMA on Database, you can test by querying view ALL_USERS

 SQL> select username,created from all_users where USERNAME like '%APEX%';

 USERNAME             CREATED

-------------------- ---------

APEX_PUBLIC_USER     28-MAR-21

APEX_180100          28-MAR-21

APEX_INSTANCE_ADMIN_ 28-MAR-21

USER

 Check the VERSION and STATUS is installed,

 SQL> SELECT comp_name, version, status FROM dba_registry WHERE comp_id='APEX';

 COMP_NAME                  VERSION                        STATUS

------------------------------ --------------------------------------------

Oracle Application Express   18.1.0.00.45                   VALID

 

Check APEX RELEASE VERSION:

 SQL> select * from apex_release;

 VERSION_NO     API_COMPATIBILITY   PATCH_APPLIED

18.1.0.00.45          2018.04.04                         APPLIED

 

Configuring APEX

 This script will load the Application Express images into XDB

 SQL> @apex_epg_config.sql  /u01/oracle/apex

Loading images directory: /home/oracle/apex/apex/images

Directory created.

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

Commit complete.

Directory dropped.

timing for: Load Images

Elapsed: 00:07:43.20


 Make sure that the following accounts are unlocked:

 SQL> ALTER USER anonymous ACCOUNT UNLOCK;

 User altered.

 SQL> ALTER USER xdb ACCOUNT UNLOCK;

 User altered.

 SQL> ALTER USER apex_public_user ACCOUNT UNLOCK;

 User altered.

 SQL> ALTER USER flows_files ACCOUNT UNLOCK;

 User altered.

 

Configure database parameters for APEX

 SQL> SHOW PARAMETER job_queue_processes

 NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

job_queue_processes                  integer     80

 SQL> SHOW PARAMETER shared_servers

 NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

max_shared_servers                   integer

shared_servers                       integer     1

 

Change the shared_servers parameter:

SQL> ALTER system SET shared_servers=5 scope=both;

System altered.

Step 10:-Used to perform the final configuration steps for Oracle Application Express, including setting the XDB HTTP listener port and Application Express ADMIN password.

To user, you can use ADMIN by default, and email can be skipped.

Also you can change the HTTP port.But default port is 8080.

 SQL> @apxconf.sql

 

      PORT

----------

      8080

 

Enter values below for the XDB HTTP listener port and the password for the Application Express ADMIN user.

Default values are in brackets [ ].

Press Enter to accept the default value.

 

 

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

This script can be used to change the password of an Application Express

instance administrator. If the user does not yet exist, a user record will be

created.

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

Enter the administrator's username [ADMIN]

User "ADMIN" does not yet exist and will be created.

Enter ADMIN's email [ADMIN]

Enter ADMIN's password []  Hadev$123

Created instance administrator ADMIN.

 

Enter a port for the XDB HTTP listener [      8080]

...changing HTTP Port

 

Check the HTTP port:

SQL> select dbms_xdb.gethttpport from dual;

 

GETHTTPPORT

-----------

       8080

 

Lsnrctl status

 

[oracle@localhost apex]$ lsnrctl status

 

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 28-MAR-2021 12:59:54

 

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.76)(PORT=1529)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production

Start Date                28-MAR-2021 11:02:00

Uptime                    0 days 1 hr. 57 min. 54 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /home/app/oracle/product/19.0.0/db_home/network/admin/listener.ora

Listener Log File         /home/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.76)(PORT=1529)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1529)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=8080))(Presentation=HTTP)(Session=RAW))

Services Summary...

Service "hadev" has 2 instance(s).

  Instance "hadev", status UNKNOWN, has 1 handler(s) for this service...

  Instance "hadev", status READY, has 1 handler(s) for this service...

Service "hadevXDB" has 1 instance(s).

  Instance "hadev", status READY, has 1 handler(s) for this service...

The command completed successfully


Administration Services login page:

Step 13:-In Browser,Login as a ADMIN user:-

http://localhost.com:8080/apex/apex_admin




 

Saturday, March 27, 2021

GPG key retrieval failed: [Errno 14] curl#37 ‘/etc/pki/rpm-gpg/RPM-GPG-KEY-oracle’


ERROR:---


GPG key retrieval failed: [Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle"

SOLUTION:


[root@localhost yum.repos.d]# wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

--2021-03-27 08:35:53--  http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7

Resolving public-yum.oracle.com (public-yum.oracle.com)... 2.22.73.158

Connecting to public-yum.oracle.com (public-yum.oracle.com)|2.22.73.158|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 1011 [text/plain]

Saving to: ‘/etc/pki/rpm-gpg/RPM-GPG-KEY-oracle’


100%[==============================================================================================================================>] 1,011       --.-K/s   in 0s


2021-03-27 08:35:55 (152 MB/s) - ‘/etc/pki/rpm-gpg/RPM-GPG-KEY-oracle’ saved [1011/1011]



Saturday, March 6, 2021

Generating SSH keys on Linux

 [oracle@inbacloud ~]$ ssh-keygen -t rsa

Generating public/private rsa key pair.

Enter file in which to save the key (/home/oracle/.ssh/id_rsa):

Created directory '/home/oracle/.ssh'.

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /home/oracle/.ssh/id_rsa.

Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.

The key fingerprint is:

ad:88:0b:10:db:47:b0:f6:98:4b:81:61:38:53:39:b5 oracle@inbacloud

The key's randomart image is:

+--[ RSA 2048]----+

|oooo.            |

|=ooo .           |

|oo+.E            |

| = *     .       |

|o = o   S .      |

| o o . . .       |

|  o . . .        |

|   . .           |

|    .            |

+-----------------+

[oracle@inbacloud ~]$

Oracle Linux 7 (OEL7) Installation

 Oracle Linux 7 (OEL7) Installation with 11g Database

This article guides you to perform the installation of Oracle Linux 7 (OEL7).

Typical is recommended if you need to set some advanced configuration you can choose custom option.


Browse  the iso file location and select I will install the operating system later option.


Select a guest operating system, I have chosen the Linux operating system.


Specify the virtual machine name and location of the virtual machine.


configure the maximum disk size I have configured the 120GB disk size and select the option store virtual disk as a single file.




Select Customize and Specify the memory size of the virtual machine.


Select the operating system


click finish


Oracle Linux 7.3 installation started Select Install Oracle Linux 7.3


Select the Language


Give the Location and Set the Time


Select Installation source and give based on ur requirement



Select Software Selection


Select GUI and select all the check boxes for all the base environments


Select Installation Destination


Select Vmware virtual and select I want to Configure


I had select Partion as below image



Click Accept changes


Disable KDump


Change the Hostname and connect to Internet


uncheck Secuirty Policy


Select Begin Installation



Table import and export.

Create Data Pump Directory. The first step in Oracle Data Pump is to create an OS level directory which will be used by Oracle for perform...