Oracle ACE Pro
Oracle Solution Architect
Oracle E-Business Suite
Oracle Cloud Infrastructure
Oracle Fusion Middleware
Oracle Database Administration
Oracle Weblogic Administration
Oracle ACE Pro
Oracle Solution Architect
Oracle E-Business Suite
Oracle Cloud Infrastructure
Oracle Fusion Middleware
Oracle Database Administration
Oracle Weblogic Administration
Our client, who is currently utilizing Oracle 19c Database, has expressed their desire to leverage Oracle Enterprise Manager (OEM) to monitor and analyze their database usage.
Now Let us check some values from the database
SQL> select dbms_xdb_config.gethttpsport from dual; GETHTTPSPORT ------------ 0
SQL> select dbms_xdb_config.gethttpport from dual; GETHTTPPORT ------------ 0
As we see ‘0’ in both the above statements we will execute the procedures given below.
SQL> exec dbms_xdb_config.sethttpsport(5500);
SQL> exec dbms_xdb_config.sethttpport(5550);
Let’s assume that you still cannot able to connect, check the wallet files. Check the directory of wallet files, run this command fist;
[oracle@devdb]# lsnrctl stat | grep HTTP
output is;
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=localhost)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/devdb/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Now you have to copy the wallet directory and run ls -l command to check the permission of the wallet files.
[oracle@devdb]# cd /u01/app/oracle/admin/devdb/xdb_wallet
[oracle@devdb xdb_wallet]# ls -l
-rw——-. 1 oracle oracle 3880 Jan 16 10:24 cwallet.sso
-rw——-. 1 oracle oracle 3835 Jan 16 10:23 ewallet.p12
Now as you see it is having the permission on user level only and not the Group level. You have to set it with -rw-r. Changing mode to 640 to allow for the group to read the wallet files makes the EM Express page available via browser.
[root@devdb xdb_wallet]#chmod 640 ewallet.p12
oracle@devdb xdb_wallet]#chmod 640
[oracle@devdb xdb_wallet# ls -l
-rw-r—–. 1 oracle oracle 3880 Jan 16 10:35 cwallet.sso
-rw-r—–. 1 oracle oracle 3835 Jan 16 10:35 ewallet.p12
Now you can connect with browser.
Upgrading the time zone file and timestamp with time zone (TSTZ) data in an Oracle database is indeed necessary for certain scenarios, such as when you upgrade to a new version of the database or when there are changes to the rules for Daylight Saving Time (DST).
Here’s a general process to perform this upgrade:
1. Check the latest version of the time zone file available in the Oracle home:
[orauat@devdb oracore]$ cd $ORACLE_HOME/oracore/
[orauat@devdb oracore]$ ls -ltrh
total 6
drwxr-xr-x 4 orauat dba 34 May 7 2021 zoneinfo
drwxr-xr-x 2 orauat dba 24 May 7 2021 mesg
2. Backup current zone info directory
[orauat@devdb oracore]$ cp -pr zoneinfo zoneinfo_old
3. Check the status of the database:
[orauat@devdb oracore]$ more $ORACLE_HOME/oracore/zoneinfo/timezdif.csv
# File version 1.0
# Fields: VERSION#, TIMEZONE_NAME, FROM_YEAR, TO_YEAR
# Note: A NULL/blank for TO_YEAR means max year representable/allowed by db.
14, Africa/Casablanca, 2010,
14, Africa/Tunis, 2010,
14, America/Argentina/San_Luis, 2010,
14, America/Tijuana, 2010,
14, America/Santiago, 2010, 2010
14, America/Asuncion, 2010,
14, Antarctica/Casey, 2010,
14, Antarctica/Davis, 2010,
4. Check also from sqlplus:
SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE ‘DST_%’
ORDER BY PROPERTY_NAME; 2 3
PROPERTY_NAME VALUE
—————————— ——————————
DST_PRIMARY_TT_VERSION 14
DST_SECONDARY_TT_VERSION 0
DST_UPGRADE_STATE NONE
SQL> select * from v$timezone_file;
FILENAME VERSION
——————– ———-
timezlrg_14.dat 14
SQL> select TZ_VERSION from registry$database;
TZ_VERSION
———-
14
5. Set related parameter
Check The recycle bin, it should be purged, and some session parameters set as per the given MOS notes:
Time Zone upgrade performed through DBUA takes more time in databases that have large amount of data impacted by new TZ files (Doc ID 2259734.1)
Updating the RDBMS DST version in 12c Release 1 (12.1.0.1 and up) using DBMS_DST (Doc ID 1509653.1)
alter session set “_with_subquery”=materialize;
alter session set “_simple_view_merging”=TRUE;
purge dba_recyclebin;
6. Start the upgrade process
SQL> set serveroutput on
SQL> exec DBMS_DST.BEGIN_PREPARE(31);
A prepare window has been successfully started.
PL/SQL procedure successfully completed.
SQL> shutdown immediate;
SQL> startup upgrade;
ORACLE instance started.
SQL> exec DBMS_DST.BEGIN_UPGRADE(31);
PL/SQL procedure successfully completed.
SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE 'DST_%'
ORDER BY PROPERTY_NAME; 2 3 PROPERTY_NAME VALUE ------------------------------ ------------------------------ DST_PRIMARY_TT_VERSION 31 DST_SECONDARY_TT_VERSION 14 DST_UPGRADE_STATE UPGRADE SQL> shu immediate; Database closed. Database dismounted. ORACLE instance shut down.
SQL> startup
ORACLE instance started.
SQL> truncate table sys.dst$error_table;
Table truncated.
SQL> truncate table sys.dst$trigger_table;
Table truncated.
07. Check the Possible errors with the following query given below:
SQL> SELECT * FROM sys.dst$error_table;
no rows selected
SQL> alter session set “_with_subquery”=materialize;
Session altered.
SQL> alter session set “_simple_view_merging”=TRUE;
Session altered.
SQL> set serveroutput on
SQL> VAR numfail number
SQL> BEGIN DBMS_DST.UPGRADE_DATABASE(:numfail, parallel => TRUE, log_errors => TRUE, log_errors_table => 'SYS.DST$ERROR_TABLE', log_triggers_table => 'SYS.DST$TRIGGER_TABLE', error_on_overlap_time => TRUE, error_on_nonexisting_time => TRUE); DBMS_OUTPUT.PUT_LINE('Failures:'|| :numfail); END; / PL/SQL procedure successfully completed.
08. Now, Check error again
SQL> SELECT * FROM sys.dst$error_table;
no rows selected
09. Now Check Updated Timezone
SQL> select * from v$timezone_file; FILENAME VERSION -------------------- ---------- timezlrg_31.dat 31
SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value FROM DATABASE_PROPERTIES WHERE PROPERTY_NAME LIKE 'DST_%' ORDER BY PROPERTY_NAME; PROPERTY_NAME VALUE ------------------------------ ------------------------------ DST_PRIMARY_TT_VERSION 31 DST_SECONDARY_TT_VERSION 0 DST_UPGRADE_STATE NONE
All Rights Reserved