Thursday, February 22, 2024

RDBMS 19C -- Tablespace and File I/O Stats missing in AWR reports / real fix -> dbms_workload_repository.modify_table_settings , flush_level

You may be hitting this bug even if your Oracle database version is 19C (even if it is 19.14..)

You have a workaround (setting statistics_level to ALL), but it is not recommended.. (due to the fact that, you may end up collecting too much data for the  AWR snapshots) Note that, your AWR snapshot related data collection tasks may also take too much time to complete, if you set statistics_level to ALL.. especially if you have a large buffer cache...

At the first glance, this problem seems addressed with the patch 22048821 TABLESPACE IO STATISTICS MISSING FROM AWR REPORT (Patch).. But it is actually not so :)

Also, this seems already fixed (the fix is already delivered) in versions like "19.8.0.0.200714 (Jul 2020) Database Release Update (DB RU)", but it is practically not so :)

Note that, this problem is also seen in 19.14, but when I checked my 19.20 DB, the issue is not there.. It seems the Enhancement request which is opened for 19.14 received a good response...

Related ER -> Bug 35122334 : REQUEST TO INCLUDE TYPICAL AS A DEFAULT VALUE TO BYPASS MANUAL EXECUTION OF DBMS_WORKLOAD_REPOSITORY.MODIFY_TABLE_SETTINGS AFTER APPLYING FIX 25416731

Related MOS Doc. -> Missing Tbspace I/O Stats AWR Report need to change the default dbms_workload_repository.modify_table_settings for WRH$_FILESTATXS WRH$_DATAFILE Tempfile WRH$_TEMPFILE and WRH$_TEMPSTATXS (Doc ID 2954137.1)

Probably, after 19.14, the issue is fixed. That is, after the Release 19.14, Oracle included the fix for bypassing the need of manual execution of the DBMS_WORKLOAD_REPOSITORY.MODIFY_TABLE_SETTINGS.

Anyways, for Oracle 19.x (<=19.14), the fix of that bug and fix of related the Enhancement Request 27871293 doesn't really fix this problem.  

To fix this and get the TBS and File I/O Stats data back in AWR reports in 19.X versions, we should enable flushing for the WRH$_FILESTATXS, WRH$_DATAFILE, WRH$_TEMPFILE and WRH$_TEMPSTATXS tables by taking the statistics level of the Tempfile Group into consideration.

Well.. We have to run the following in order to do that;

     $ sqlplus / as sysdba

        exec dbms_workload_repository.modify_table_settings(table_name  => 'WRH$_FILESTATXS', flush_level => 'TYPICAL');

        exec dbms_workload_repository.modify_table_settings(table_name  => 'WRH$_DATAFILE', flush_level => 'TYPICAL');

        exec dbms_workload_repository.modify_table_settings(table_name  => 'Tempfile Group', flush_level => 'TYPICAL');

        exec dbms_workload_repository.modify_table_settings(table_name  => 'WRH$_TEMPFILE', flush_level => 'TYPICAL');

        exec dbms_workload_repository.modify_table_settings(table_name  => 'WRH$_TEMPSTATXS', flush_level => 'TYPICAL');

After these actions, we will have those missing stats back.. but! as you may imagine -> we will have those stats in the new snapshots and in the new AWR reports...

This is a very important thing and should be taken care off.. You may not be aware of this... But without having these stats in place, believe me, one day your AWR reports will leave you alone in dealing with a real performance problem 

It is important for being able to check historical IO performance of Oracle Database and that's why I shared it with you.

Tuesday, February 20, 2024

Let's quantize it! :) -- Basics of Quantum Information

I received my first certificate in IBM quantum and I am sharing it here. More to come :)

This was for being able to describe quantum information at a foundational level. While preparing, you learn how to describe fundamental concepts, such as quantum teleportation, superdense coding, and the Clauser, Horne, Shimony, and Holt (CHSH) game — all of which are connected to the phenomenon of entanglement. 

By studying these, you gain the core skills required to explore deeper fundamental quantum algorithms and start using Qiskit Runtime.

Saturday, February 10, 2024

Erman Arslan's Oracle Forum / NOV 24 2023 - FEB 10, 2024 - "Q & A Series"

Remember, you can ask questions and get remote support using my forum. Just click on the link named "Erman Arslan's Oracle Forum is available now". Click here to ask a question", which is available on the main page of Erman Arslan's Oracle Blog. More than 2000 questions were asked, almost 10000 comments have been made and here is the links to the latest questions from the last period;

-- or just use the direct link:


Supporting the Oracle users around the world. Let's check what we have in the last few weeks..

Bursting Emails R12.2 by satish

Need advice on Configuration - R12.2 by satish

Concurrent user connections with RAC by satish

perl adcfgclone.pl appsTier fails by big

How to temporarily stop sending emails - PROD by satish

EBS Support by satish

Query Regarding Patching of Inactive Products by VinodN

Hide APPS password in OS script by VinodN

EBS 12.2 New Installation with RAC DB by veysel

Autoconfig on patch file system failed. by raiq1

SSO login Error 404--Not Found by big

Strat managers by big

change Weblogic admin passeword fails by big

APPS DBA Course by VinodNN

Cutover failed after jdk upgrade by karthikmca.bhc

IREC setup withing DMZ by akhan

Adop phase=prepare failed on External nodes. by akhan

 While trying to lookup didn't find subcontext 'jdbc' Resolved ''; remaining name 'jdbc/SSSTCCRP' by satish

Friday, November 24, 2023

Erman Arslan's Oracle Forum / OCT 12 - NOV 24, 2023 - "Q & A Series"

Remember, you can ask questions and get remote support using my forum. Just click on the link named "Erman Arslan's Oracle Forum is available now". Click here to ask a question", which is available on the main page of Erman Arslan's Oracle Blog. More than 2000 questions were asked, almost 10000 comments have been made and here is the links to the latest questions from the last period;



-- or just use the direct link:


Supporting the Oracle users around the world. Let's check what we have in the last few weeks..

Monday, November 20, 2023

-Revisiting- --> Problem installing Oracle Linux 7 and 8 on Virtual Box 7.0.19 -- Unsupported command : unsupported_hardware

Found a quicker way to workaround the issue, that's why revisiting this  ->(https://ermanarslan.blogspot.com/2023/11/problem-installing-oracle-linux-7-and-8.html).

Some background info:

This problem is fixed in the Virtual Box Release version 7.0.12.

In the problem-free Virtual box release 7.0.12, they commented that unsupported_hardware line in the default ks.cfg, that is delivered with the Virtual Box. That ks.cfg is automatically used in unattended installation, as you may guess. Therefore, the unattended installation works properly in 7.0.12.

The Quicker Way -> So,  If you are still using  in 7.0.10, and if you just comment the unsupported_hardware line in the ks.cfg in the relevant directory, which is created on your PC with the Virtual Box installation, then the unattended installation will also work properly. No need for other extra efforts..

Also, it seems inconsistent to both provide ks.cfg in Linux boot and select unattended installation in Virtual Box. One of these should be done.

To boot with the kickstart in the problematic Virtual Box environments, the ks.cfg that comes with the virtual box should be modified (as suggested above) and unattended installation should be selected for the Linux boot. This is the simplest method to kick-start in Virtual Box. Actually, there is "no need" to go into the Linux ISO, repackage it and do any work there. If we select the unattended installation, then the Virtual Box uses its own ks.cfg to kickstart.. Probably Virtual Box has its own boot loader and that's why it is able to do it. I mean, without touching anything Virtual Box starts a kick start installation with its own ks.cfg and we don't need to  touch anything in the Linux ISO for this..  (This is just my opinion, I didn't dive too deep about it.. Just saying...)

Friday, November 3, 2023

Another fun departure from the norm : Another TV show! This time It was a LIVE Brodcast!

As an Oracle ACE PRO + System and Database Senior Director, I was the guest of University TV's Professional Agenda Program. We had a nice conversation about my areas of expertise with the host of the program. We had some chats on AI and Quantum Computing, too. We discussed proper career planning for university students. We talked about curiosity and passion in this context. This was a live broadcast on Wednesday, October 18, 2023.

Nowadays, offers are coming one after another for me to participate in the TV programs and I am starting to enjoy it :)

Here I 'm leaving some photos from the last show. Sharing the poster of the TV Program as well.. Just for the memories..




Problem installing Oracle Linux 7 and 8 on Virtual Box 7.0.19 -- Unsupported command : unsupported_hardware

Let's do some Linux & virtualization gymnastics by going through a real life problem.

Getting unsupported command: unsupported_hardware error during Oracle Linux 7 (and 8) installation on Virtual Box 7.0.10 (a very up-to-date release of Virtual Box release at the moment). 

The installation couldn't start actually.. It was terminated due to the unknown command error. (note that, this is not related with hardware.) That error message may be a bit misleading in the first glance.. Having unsupported_hardware there make it a bit counter-intuitive.. The real error is the unknown command error.. The installer just doesn't know the command which is "unsupported_hardware".

Source Specs: Windows 11 (or Windows 10) -- actually there is no causal connection between this error and the client OS.  The error seems purely related with Virtual Box. But! still noted the Windows version here.

The reason behind this error is using an deprecated command in the kickstart file..

unsupported_hardware is a deprecated command and that's why it was causing the error. (note that using these type of commands in the kickstart "may" cause an error and here it did!)

Brief info about kickstart:

Kickstart helps us to automate the installation with a simple text file.. 

It is an automated process that let us install the operating system by specifying all our requirements and configurations in a file.  (time zone, drive partitions, packages etc..) 

No user intervention is needed. 

It is mostly used when deploying Linux on a large number of systems at once.

Workaround 1)

In order to workaround the problem and continue the installation, open a different TTY when the issue appeared.. (using Ctrl + Alt + F3 : (tty3) or Ctrl + Alt + F4 : (tty4)). 
When opened the TTY, you 'll find yourselves in installation filesystem.. Modify the kickstart file (delete the unsupported_hardware line), save it and then run the anaconda from there, in that shell.. As simple is that.

Workaround 2)

A better workaround is to edit the vmlinuz command (by pressing TAB when the installation menu is displayed as seen in the screenshot below)..  Just delete the word quiet and the words related with the kickstart installation. Press Enter and you will be good.. The installation will start and it will be with GUI.

Note that, vmlinuz /Virtual Memory LINUx gZip = Compressed Linux kernel is the compressed image of the linux kernel. Uncompressed, loaded into memory, and executed during the process.


Workaround 3)

An even better workaround is to check the Skip Unattended Installation checkbox which is present in Virtual Box 7.0.1..  Skip unattended installation is enabled by default as far as I see, but we disable it..
Not all the Operating Systems are tested with this option.. (according to Oracle, following OEL versions are tested: Oracle Linux 6.1,Oracle Linux 7.0,Oracle Linux 7.7,Oracle Linux 8.0,Oracle Linux 8.2.. Note that we are trying with Oracle Linux 8.6....)


Workaround 4 - can be considered as the fix..

Regenerate Oracle Linux 8 iso with a modified ks.cfg / kick-start config file which doesn't contain that deprecated command. This is a stylish move, but a little complex -- especially if you are not that familiar with Linux..


Workaround 5 - "Just use Virtualbox 7.0.12" :) - this can also be considered as the fix.

Thursday, October 12, 2023

Erman Arslan's Oracle Forum / AUG 25 - OCT 12, 2023 - "Q & A Series"

Remember, you can ask questions and get remote support using my forum. Just click on the link named "Erman Arslan's Oracle Forum is available now". Click here to ask a question", which is available on the main page of Erman Arslan's Oracle Blog. More than 2000 questions were asked, almost 10000 comments have been made and here is the links to the latest questions from the last period.


-- or just use the direct link:


Supporting the Oracle users around the world. Let's check what we have in the last few weeks..

Need Advice on job queue processes for upgrading to 12.2.10 by prabhunoule

autostart grid by Roshan

Pending OPP issue with custom program by VinodN

Unable to Login EBS R12.2.10 in Windows 7 32bit by prabhunoule

Workflow Java Mailer Analyzer by big

enterprise manager wallet by Roshan

Login Issue with users by prabhunoule

restore data pump by Roshan

mariadb locks by Roshan

undo_retention in 19c database by raiq1

Query on interoperability patches from 11.2.0.4 to 19C by prabhunoule

restart one node by Roshan

Discoverer 10g by Samia

restore data pump by Roshan

Oracle Database 12.1.0.2 to 19c non-CDB upgrade by Hassan141

refresh DB by Roshan

need ebs online instance by motoky

XLAACCPB: Create Accounting issue by Samia

Clone failed 19c database. by satish

Prepare phase failed ORA-00904: "TABTYPE": invalid identifier by satish

 

Wednesday, October 11, 2023

RDBMS -- Oracle 12.1 - Problem accessing Web Service due to SNI Extension (Web Services failing with ORA-29263, Ora-29259 errors due to SNI Extension)

Intro:

Oracle databases have the ability to integrate with many applications and systems today. Web services are frequently used during these integrations. However, these integrations do not always occur smoothly. The problem we encountered occurred when calling a web service API from the Oracle database via PL/SQL code. This web service had a critical role in the application, so we had to solve this problem.

The issue appeared when tried to access a web service using the HTTPS (TLS.1.2) protocol. The client (Oracle database in this case) encountered an unexpected error message..

Oracle Database 12.1 - Problem accessing Web Service due to SNI Extension:

Analysis, Solution Suggestions and Workaround:

Web service call using the example code of which you can see below, resulted in ORA-29253 and ORA-29259 errors.

select utl_http.request('https://testerman.example.com/WebService/ErmService.asmx', null, 'file:/oracle/PROD/db/tech_st/12.1.0/admin/PROD/wallet', 'wallet_password') from dual;

 ORA-29263: HTTP protocol error

ORA-29259: end-of-input reached

---

These error messages, at first glance, indicate that the call to the web service failed and the expected response was not received. But what was the real reason behind these errors? We had to do an in-depth analysis to find the answer to this question. I will share with you our findings regarding that in-depth analysis and the solutions we implemented using the output of the analysis.

While performing the analysis, we went through the following document to identify SSL/TLS issues between the database and the web server: MOS note "How To Investigate And Troubleshoot SSL/TLS Issues on the Database And Client SQL*Net Layer (Doc ID 2238096.1)" 

Based on the MOS document above, we performed many checks and enabled different types of traces (tcpdump, sqlnet.ora, listener). We examined the trace files in detail. We checked the wallet permissions and made sure that they are correct. Likewise, we examined the certificates of the relevant HTTPS web server and concluded that there was no problem there either. As a result of these investigations, we agreed that the problem was not related to the wallet or certificates.

Considering the SSL/TLS version we were using (TLS 1.2), we checked the PSU level of the database.. The PSU version was not the highest one, but it was high enough and anything higher would not have added anything to us.. However, in addition to all these checks, the network traces we received with tcpdump revealed some great details. 

The command used for getting the relevant trace using the tcpdump was as follows;

/usr/sbin/tcpdump -i <interface or any> -s0 -w <output filename>

Example command: /usr/sbin/tcpdump -i eth0 -s0 -w ssl_dump.cap

Note that we analyzed the tcpdump traces with Wireshark...

In parallel to that, we also continued to review other Oracle documentation and MOS notes, specifically when we were investigating the source of  "ORA-29259: end-of-input reached" and "ORA-29263: HTTP protocol error".

These errors could also be related to wallet access permissions. However, the changes we made in this direction did not solve the problem (ACE or ACL permissions didn't help, the cause was not related with those things.) -- a reference : MOS note : "ORA-29259: end-of-input reached" or "ORA-29263: HTTP protocol error" when using HTTPS with a Wallet File (Doc ID 2303905.1)")

We also checked the ciphers as there might be a missing cipher in the database.. However, we saw that the patches correcting the potential missing ciphers were already applied to the client side (the Oracle database 12.1 in this case) -- a reference: MOS Note: "UTL_HTTP access to secured website fails with ORA-29259 in 12c database (Doc ID 2402276.1)" (Note that, we also used openssl to check the ciphers requested by the server)

The document above given as the reference contained the following statement: The issue is due to missing cipher suits in 12c. 

TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256  and ECDHE_RSA_WITH_AES_128_GCM_SHA256 were in question, but we had them in the database TLS layer, so it wasn't the cause.

We even explicitly defined the ciphers that we wanted to use in sqlnet.ora and listener.ora, but this action (as expected) didn't solve the problem either.

SSL_CIPHER_SUITES = (SSL_DH_anon_WITH_DES_CBC_SHA, SSL_DH_anon_WITH_3DES_EDE_CBC_SHA,SL_DH_anon_WITH_RC4_128_MD5,SSL_RSA_WITH_AES_256_CBC_SHA)"

We checked lots of things at many different areas and the known issues along with the possible bugs  related with TLS 1.2 and Oracle Database 12.1 carefully. 

After all these diagnostics and solution attempts, we turned back our focus to the findings we had with tcpdump.

The most important finding there, was the proof of SNI (Server Name Indication) extension usage during this problematic TLS 1.2 Web Service call.

Handshake Protocol: Client Hello

       Handshake Type: Client Hello (1)

       Length: 290

       Version: TLS 1.2 (0x0303)

       Random

       Session ID Length: 0

       Cipher Suites Length: 128

       Cipher Suites (64 suites)

       Compression Methods Length: 1

       Compression Methods (1 method)

       Extensions Length: 121

       Extension: server_name

             Type: server_name (0x0000)

             Length: 33

             Server Name Indication extension!!!!!! --  HERE IT IS!

                  Server Name list length: 31

                  Server Name Type: host_name (0)

                  Server Name length: 28

                  Server Name: test.server.com

        Extension: ec_point_formats

The SNI feature was not supported in Oracle Database version 12.1 and it was the cause of the problems.. In order to use SNI , the database version should be at least 12.2. Additionally, this SNI feature could not be backported to version 12.1.

Server Name Indicator (SNI) is an extension of the TLS protocol. At the beginning of the handshake process when establishing a secure SSL connection, it verifies the digital certificate of the server name (hostname) mentioned in the request. SNI technology allows multiple secure websites to be accessed via the same IP address and TCP port. "Since it performs the verification process for SSL, it eliminates the fixed IP requirement that was previously required to use SSL." source: https://tr.wikipedia.org/wiki/Server_Name_Indication

Even the latest database PSU release for 12.1 wouldn't solve the problem, since there was no backport..

We shared our findings about this SNI feature with the website administrator and asked whether this feature could be disabled on the web server side. They said they could disable the SNI only in their TEST environment, and we made them do so. We tired the web service call after the web server administrator disabled the SNI in the TEST environment , and the problem disappeared. 

On the other hand, the web server administrator (and the company that owns the web service) stated that they cannot disable SNI for the PROD environment.

This situation led us to find different solutions or workarounds.

Upgrading the version of the database (12.1 -> 12.2 or 19C upgrade) would solve this problem, but this kind of an upgrade would require an intensive testing process and it did not seem possible at that moment, considering the customer have no resources and motivation for such a task.

Well.. DB upgrade was not an option.. There was no solution for 12.1 Oracle Database ( No backports for SNI capability due to the inadequacy of the DB TLS code of 12.1)

Therefore, we started looking for alternative solutions. 

 Ability to look from differences perspectives, and produce flexible solutions to overcome the challenges that our customer face; let us implement a method of accessing the web service by calling a function through a "Database" that acts as an intermediate proxy.

This was actually a workaround.. It required less efforts for the implementation and did not directly affect the existing system. 

The solution we planned was to access the web service through a database link (DB Link) residing in a 12.2 Oracle database.

In this solution, the database in the middle (Oracle Database 12.2) provides access to a specific websi service with a function. However, what is interesting here is that it transmits this data directly to the 12.1 database via db link. However, the fact that DB Link does not support the CLOB data type appeared as an obstacle at the beginning. To get around this problem, we wrote a custom CLOB parser function and deployed it to the 12.1 database. Thanks to this function, we could receive the HTML response from the website without any problems.

-- 12.1 Database (The source)

CREATE OR REPLACE FUNCTION APPS.fetch_https_content_via_link(p_url IN VARCHAR2) RETURN CLOB IS

    l_clob clob;

    l_tmp long;

    l_offset number := 1;  

begin

    loop

      select dbms_lob.substr@https_link(dblink.fetch_https_content@https_link(p_url), 4000, l_offset)

      into l_tmp

      from dual@https_link;

   exit when l_tmp is null;

   l_clob := l_clob || l_tmp;

   l_offset := l_offset + length(l_tmp);

  end loop;

      return l_clob;

END fetch_https_content_via_link;

/

-- 12.2 Database -- the intermediate / proxy environment

CREATE OR REPLACE FUNCTION dblink.fetch_https_content(p_url IN VARCHAR2) RETURN CLOB IS

    l_http_request  UTL_HTTP.req;

    l_http_response UTL_HTTP.resp;

    l_content       CLOB;

BEGIN

    UTL_HTTP.SET_WALLET ('file:/orahome/LINK/db_122/product/12.2.0.1/db_1/wallet','wallet_password');

    -- Make the HTTP request

    l_http_request := UTL_HTTP.begin_request(p_url);

    l_http_response := UTL_HTTP.get_response(l_http_request);   

    -- Read the response content

    UTL_HTTP.read_text(l_http_response, l_content);

    -- Close the HTTP request and response

    UTL_HTTP.end_response(l_http_response);

    RETURN l_content;

EXCEPTION

    WHEN UTL_HTTP.end_of_body THEN

        UTL_HTTP.end_response(l_http_response);

        RETURN l_content;

    WHEN OTHERS THEN

        RETURN 'Error fetching content';

END fetch_https_content;

/

Thursday, September 21, 2023

EBS 12.2 -- Problem with AD_ZD package resulting unexpected 'component must be declared' errors

After applying CLE patches ( 34546768:R12.CLE.C , 28828799:R12.CLE.C) to our TEST instance, we noticed lots of invalid database objects owned by APPS user. Our EBS instance has become unusable due to these invalid objects. 

Tried to compile some of those invalid objects for diagnostics purposes, and noticed that almost all of them were complaining about missing GET_RUN_EDITION function, which was supposed to be there in the AD_ZD package.. It was a foundational deficiency.. Then, we checked the version of the AD_ZD package and we saw that its version was way older than the other EBS instances in the environment.. These were clone environments, cloned from one golden copy (let's say) and that's why it was impossible to have a difference in version (impossible to have an older version of a Standard Package.. Let's put it that way:) of a standard package in any of these instances.

It was obvious that one of these CLE patches recreated the AD_ZD package in this environment, but the AD_ZD code delivered with that patch was probably an old version.. So, there was a mismatch, a patch-environment compatibility problem.. I saw problematic CLE patches earlier, but I have never seen such an obvious failure due to patching.

Following the action below; we could fix the problem;

  • Stop Apps Services.
  • Run adgrants sql.
  • Copy the package (ADZDXS.pls) and package body (ADZDXB.pls) from a problem-free environment to the $AD_TOP/patch/115/sql directory of the problematic environment. (backup the old versioned files, just in case..)
  • Compile the package spec and bod codes residing in the ADZDXS.pls and ADZDXB.pls files, by connecting to the database using sqlplus
  • Compile APPS using adadmin.
  • Check invalid objects and ensure that they are validated.
  • Start Apps Services.
Tip: Be careful with CLE patches :)