Linux port creating / testing


Wanted to test Oracle Apex on port 8080 (default) but was not 100% sure Apex was running correctly or the firewall from the cloud was not blocking the port.

The "nc" command can run the port and you can test without having the app running -

[root@test ~]# nc -l 8080 -v

Ncat: Version 7.50 ( https://nmap.org/ncat )

Ncat: Listening on :::8080

Ncat: Listening on 0.0.0.0:8080




This is particularly handy as the  Oracle cloud servers have no web browser graphical output (OCI Linux ones anway - as far as I know) so not like you can fire up a web browser and connect that way.


Autonomous Database - comments

Changing time zone

Default Autonomous Database Time Zone

The default Autonomous Database time zone is Coordinated Universal Time ‎(UTC)‎ and by default calls to SYSDATE and SYSTIMESTAMP return the date and time in UTC.

In order to change database time zone, you can run the following statement. 

This example sets the database time zone to UTC-5.

ALTER DATABASE SET TIME_ZONE='-05:00';

Note:

You must restart the Autonomous Database instance for the change to take effect.
After you set the database time zone, by default SYSDATE and SYSTIMESTAMP continue to return date and time in UTC (SYSDATE_AT_DBTIMEZONE is FALSE by default). If you set SYSDATE_AT_DBTIMEZONE to TRUE in a session, SYSDATE and SYSTIMESTAMP return the database time zone.


Stopping Global cache blocks lost metric



From Metalink


https://support.oracle.com/epmos/faces/DocumentDisplay?id=2543134.1&displayIndex=1


SOLUTION

cd <OMS_HOME>/bin

$emcli login -username=sysman

$emcli sync

$emcli modify_collection_schedule -targetType="oracle_database" -targetNames="<DBInstanceName>" -collectionName="rac_global_cache_10i" -collectionStatus=Disabled -preview="N"

Real world example

[oracle@oms1 bin]$ $OMS_HOME/bin/emcli login -username=sysman -password=.......

Login successful

[oracle@oms1 bin]$ $OMS_HOME/bin/emcli sync

Synchronized successfully

[oracle@oms1 bin]$ emcli modify_collection_schedule -targetType="oracle_database" -collectionName="rac_global_cache_10i" -collectionStatus=Disabled -preview="N" -targetNames="DemoDB"

Collection Name : rac_global_cache_10i

DemoDB : Collection Schedule updated successfully.

The collection schedule of the following metrics might be affected :

rac_global_cache



DBCLI quick notes

Quick notes re dbcli commands - 

[root@ ~]# dbcli describe-system

DbSystem Information
----------------------------------------------------------------
ID: c13eb0d0-...........
Platform: Vmdb
Data Disk Count: 8
CPU Core Count: 2
Created: August 3, 2022 4:49:59 PM BST

System Information
----------------------------------------------------------------
Name: gi2iuoaa
Domain Name: s003.ldntier4prd.oraclevcn.com
Time Zone: Europe/London
DB Edition: EeHp
DNS Servers:
NTP Servers: 169........

Disk Group Information
----------------------------------------------------------------
DG Name Redundancy Percentage
------------------------- ------------------------- ------------
Data External 100
Reco External 100

[root@~]# dbcli describe-database --dbName TIER......

#
Database details
----------------------------------------------------------------
ID: 24d80124-c9da-4037-b077-a9...
Description: TIER4P
DB Name: TIER4P
DB Version: 19.16.0.0.0
DB Type: Si
DB Edition: EE_HP
DBID: 2309127357
Instance Only Database: false
CDB: true
PDB Name: LLINKP
PDB Admin User Name: pdbuser
Class: Oltp
Shape:
Storage: ASM
DB Redundancy:
CharacterSet: AL32UTF8
National CharacterSet: UTF8
Language: AMERICAN
Territory: AMERICA
Home ID: bad88939-ce80-4691-9783-0f6ac6bedef8
Console Enabled: false
Level 0 Backup Day: Sunday
AutoBackup Enabled: false
Created: August 3, 2022 4:50:00 PM BST
DB Domain Name: s003.ldntier4prd.oraclevcn.com


[root@ ~]# dbcli list-dbstorages

ID Type DBUnique Name Status
---------------------------------------- ------ -------------------- ----------
2c5c6fe0-4497-ecc Asm TIm Configured

[root@ ~]# dbcli describe-dbstorage -i 2c5c6fe0-4497-ecc

Database Storage details
----------------------------------------------------------------
ID: 2c5c6fe0-4497-
DB Name: TIER4P
DBUnique Name: TIER4P_lhr2rm
DB Resource ID: 24d80124-c9da-40
Storage Type: ASM
DATA:
Location: +DATA/TIER4P_lhr2rm
Used Space: 993.42GB
Free Space: 3.02TB
REDO:
Location: +RECO/TIER4P_lhr2rm
Used Space: 36.98GB
Free Space: 782.88GB
RECO:
Location: +RECO/TIER4P_lhr2rm
Used Space: 36.98GB
Free Space: 782.88GB
State: ResourceState(status=Configured)
Created: August 3, 2022 4:50:01 PM BST
UpdatedTime: August 3, 2022 5:06:46 PM BST

[root@ ~]# dbcli describe-database --dbid 24d80124..................

Database details
----------------------------------------------------------------
ID: 24d80124-c...
Description: TIER4P
DB Name: TIER4P
DB Version: 19.16.0.0.0
DB Type: Si
DB Edition: EE_HP
DBID: 2309127357
Instance Only Database: false
CDB: true
PDB Name: LLINKP
PDB Admin User Name: pdbuser
Class: Oltp
Shape:
Storage: ASM
DB Redundancy:
CharacterSet: AL32UTF8
National CharacterSet: UTF8
Language: AMERICAN
Territory: AMERICA
Home ID: bad88939-c
Console Enabled: false
Level 0 Backup Day: Sunday
AutoBackup Enabled: false
Created: August 3, 2022 4:50:00 PM BST
DB Domain Name: s003.ldntier4prd.oraclevcn.com

[root@prd01tier4-dbs ~]# dbcli list-dbhomes

ID Name DB Version Home Location Status

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

........9000_home1 19.16.0.0.0 /u01/app/oracle/product/19.0.0.0/dbhome_1 Configured


[root@ ~]# dbcli describe-dbhome -i ......

DB Home details
----------------------------------------------------------------
ID: bad88939-
Name: OraDB19000_home1
Version: 19.16.0.0.0
Home Location: /u01/app/oracle/product/19.0.0.0/dbhome_1
Status: Configured
Created: August 3, 2022 4:50:00 PM BST
Database Edition: EE_HP
Unified Auditing: false