Tuesday, March 1, 2022

Insert a new line at the beginning of a file

 Here's a way to add a line to the beginning of a file:


sed -i '1s!^!set timing on\n set time on\n set echo on\n!' batch1.sql_bkp

find . -type f -name '*.sql' -exec sed -i '1s!^!set timing on\n set time on\n set echo on\n!' {} \;


sed -i '1s/^/line_to_be_added\n/' file

Then, you could use the code above with find to achieve your ultimate goal:

find . -type f -name '*.js' -exec sed -i '1s/^/line_to_be_added\n/' {} \;

Wednesday, February 23, 2022

Commvault restore issue troubleshooting

 


Development is suggesting you to apply fix of Bug 33304775 - IPCDAT Errors - IBV Resources are Used for Processes Which Have No Need of Them ( Doc ID 33304775.8 )

There is no workaround, you will need to apply the fix. I'm checking for an available fix for you

Per Dev findings:
=============
The suspicion here is that RMAN is forking DB processes which are using a libcell context/IPCDAT context/QPs that are created by RMAN.

Due to a potential kernel issue, the child does not inherit the security context of the parent correctly (it does a deep copy as expected, but the ibverbs specific code is only doing a shallow comparison of the security context pointer).

If that happens, any ibv_modify_qp() call by the child will hit an EACCES for QPs created by RMAN.


The fix is to make sure that RMAN does not create QPs at all (it should not need to, since it does not do IOs with the cell directly). Bug 33304775 prevents processes from creating QPs unnecessarily, and could help with this issue.
=============
We had a couple of questions for you..
1. Is this issue reproducible 100% of the time when you try restoring this DB? if yes, how much time does it take from the time the restore is started..
2. Do you see the same issue across other DBs that you're migrating to 19c?
3. Are there any other DB or OS processes that are impacted during the same time ?

We can try and arrange a Zoom with rman development and Commvault support during US hours if this issue is easily reproducible. Also here is other information that Engg is requesting..

First, if the CommVault software changes uid or gid or any other process credential during runtime.

Second,
1. Copy the attached dtrace script trace.d to the node where they launch RMAM. The dtrace script will log a message for every attempt to change uid or gid.
2. Run “dtrace -s trace.d > /tmp/dtrace.out”.
3. Reproduce the issue.
a. While commVault/RMAN are running, capture the output of “cat /proc/<pid>/status” periodically, where <pid> is the pid of commVault and RMAN.
4. Once the issue is reproduced, collect the following:
a. The output of “dmesg -T”.
b. The ExaWatcher PS data from the period -- /opt/oracle.ExaWatcher/archive/Ps.ExaWatcher/
/c. var/log/audit/audit.log
d. /var/log/messages
e. /tmp/dtrace.out
f. The periodic dump of “cat /proc/<pid>/status” from Step 3a

Tuesday, September 21, 2021

OCI Listener timeout

 The default timeout values are:

  • 300 seconds for TCP listeners.

  • 60 seconds for HTTP listeners.

maximum timeout value is 7200 seconds.

XML Publisher Report Bursting Program taking time to start

 Customer Applied solution from:

XML Publisher Report Bursting Program (XDOBURSTREP) Performance Poor While Initializing ( Doc ID 2300674.1 )
SOLUTION: Replace random with urandom by modifying the Concurrent Program Define Execution Option
--All 5 reports completed in acceptable period of time.

This solution may work to resolve the issue.
However customer should still work on cleaning the out and log files as this situation will result in further issues.
Customer will discuss internally to decide if the purging / moving of the out and log (FSS directory) will occur tonight or
be put on hold until the weekend


-------------------- ACTION PLAN DETAILS BELOW---------------------

Customer Applied solution from:
XML Publisher Report Bursting Program (XDOBURSTREP) Performance Poor While Initializing ( Doc ID 2300674.1 )
SOLUTION: Replace random with urandom by modifying the Concurrent Program Define Execution Option
--All 5 reports completed in acceptable period of time.

(1) Responsibility: System Administrator
(2) Navigate to: Concurrent > Program > Define
(3) Query report
(4) Under "Executable" it shows Name = XDODTEXE
and (Options = NULL) or (Options = -Xms512M -Xmx512M)
(5) Update Options to = -Xms512M -Xmx512M -Djava.security.egd=file:/dev/./urandom
* note the space after -Xmx512M and before -Djava.security
(6) Save.
(7) Test using report that was updated



Action Plan From Here:
====================
Customer Actions:
1. Customer working on cleaning the out and log
Per Doc ID 2603009.1 - Concurrent Processing R12.2 : Too Many Concurrent Requests In Pending Status After Migrating To OCI
-- Log and Out files from concurrent processing in FSS directory needs to be restricted to 50000 records only

* Customer discussing internally to decide if the purging / moving of the out and log (FSS directory) will occur tonight or
be put on hold until the weekend 


2. If performance is still unacceptable, please provide the AWR and analyzer, per earlier action plan as follows
2.1> Generate AWR reports for intervals 20-Sep 13:15:to 13:30 , 13:30 to 13:45 . Generate instance level reports from all RAC instances using awrrpt.sql and addmrpt.sql scripts
2.2> Also run analyzer to check settings :
EBS Database Performance and Statistics Analyzer( Doc ID 2126712.1 )
NOTE: It is important that you review saved output file before uploading.
If you ran the Analyzer as a Concurrent Program, make sure to choose 'Web Page, HTML only' for the 'Save as type'.
Do not save as 'Webpage, complete (*.htm,*.html)' as it will be rejected when uploaded to Support. This applies to all Web browsers.

Thursday, July 22, 2021

Oracle-Provided Diagnostic Tools

Oracle-Provided Diagnostic Tools • Individual tools • HANGFG: semi-automates hang and dumpfile generation • HANGFG User Guide (Doc ID 362094.1) • Procwatcher • Procwatcher: Script to Monitor and Examine Oracle DB and Clusterware Processes (Doc ID 459694.1) • How To Troubleshoot Database Contention With Procwatcher (Doc ID 1352623.1) • ORATOP • oratop - Utility for Near Real-time Monitoring of Databases, RAC and Single Instance (Doc ID 1500864.1)

Thursday, July 8, 2021

AWS Database Migration Service Step-by-Step Walkthroughs

 You can use AWS Database Migration Service (AWS DMS) to migrate your data to and from most widely used commercial and open-source databases such as Oracle, PostgreSQL, Microsoft SQL Server, Amazon Redshift, Amazon Aurora, MariaDB, and MySQL. The service supports homogeneous migrations such as Oracle to Oracle, and also heterogeneous migrations between different database platforms, such as Oracle to MySQL or MySQL to Amazon Aurora MySQL-Compatible Edition. The source or target database must be on an AWS service.

In this guide, you can find step-by-step walkthroughs that go through the process of migrating sample data to AWS:

In the DMS User Guide, you can find additional resources:


Using an Oracle database as a source for AWS DMS

https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.Oracle.html

Security in AWS Database Migration Service

https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#CHAP_Security.SSL

Using an Oracle database as a source for AWS DMS


https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.Oracle.html#CHAP_Source.Oracle.Encryption

ewallet p12 vs cwallet sso

The  ewallet.p12  stores credentials and certificates protected by a user password, while  cwallet.sso  provides an obfuscated, random passw...