Saturday, May 22, 2021
Oracle Rac -- Adding HAIP Manually : Redundant Interconnect
Friday, May 21, 2021
Oracle Statspack Installation / Re-Creation
We all must be thinking in this era of 21c why we need statspack. However for some non critical database where we dont have license of tuning pack . Hence we need to survive on statspack
2) Drop statspack
@?/rdbms/admin/spdrop.sql
3) create stastpack
@?/rdbms/admin/spcreate.sql
4) Change stastpack snap level to level 6
BEGIN
statspack.modify_statspack_parameter(i_snap_level=>6, i_modify_parameter=>'true');
END;
/
select SNAP_ID, SNAP_LEVEL from STATS$SNAPSHOT;
exec PERFSTAT.statspack.snap;
6) Schedule statspack auto jobs for statspack snap ( note job id)
@?/rdbms/admin/spauto.sql
7) Change snap interval to 30 min
alter session set nls_date_format = 'DD-MON-YYYY HH24:MI:SS';
set lines 180
col SCHEMA_USER for a20
col INTERVAL for a30
col WHAT for a30
select JOB, SCHEMA_USER, INTERVAL, BROKEN, WHAT from dba_jobs where JOB=428;
execute dbms_job.interval(428,'sysdate+(1/48)');
alter session set nls_date_format = 'DD-MON-YYYY HH24:MI:SS';
set lines 180
col SCHEMA_USER for a20
col INTERVAL for a30
col WHAT for a30
select JOB, SCHEMA_USER, INTERVAL, BROKEN, WHAT , to_char(next_date ,'DD-MON-YYYY:HH24:MI:SS') "next date" , failures from dba_jobs where JOB=428;
select name,snap_id,to_char(snap_time,'DD-MON-YYYY:HH24:MI:SS') "Date/Time" from stats$snapshot,v$database;
8) after 30 minutes verify snap interval working fine with 30 min and level 6
@?/rdbms/admin/spreport.sql
Saturday, May 15, 2021
Whats new in Oracle database Home binary Cloning in 19c
There are 2 main feature been introduced in 19c with regards to home binary cloning
1) Taking "Gold Copy " instead of TAR backup form source
2) clone.pl is depreciated
Gold Image :
Instead of taking traditional tar backup , Oracle now suggest taking gold image . Below is example . Zip file will be created in target location .
$ORACLE_HOME/runInstaller -createGoldImage -destinationLocation /refresh/home/app/oracle/product/ -silent
Clone.pl depreciated :
If we use "clone.pl" or "runInstaller -clone" now from 19c , we will get below exception .
[INFO] [INS-32183] Use of clone.pl is deprecated in this release. Clone operation is equivalent to performing a Software Only installation from the image.
You must use /refresh/home/app/oracle/product/19.3_clone/runInstaller script available to perform the Software Only install. For more details on image based installation, refer to help documentation.
Reference :
19.x:Clone.pl script is deprecated and how to clone using gold-image (Doc ID 2565006.1)
Sunday, May 2, 2021
Oracle TFA And AHF log collection / Installation
TFA
##################################################################################
__________________
Install Tfa
__________________
Download the latest version of Oracle Trace File Analyzer with Oracle Database support tools bundle from My Oracle Support note 1513912.1
Upgrading is similar to first-time install. As root, use the installTFAplatform script example for linux >
Install Tfa on both Nodes --> Sync on both Nodes --> Start
( As root )
./installTFAplatform
$ ./installTFAplatform -extractto dir -javahome jre_home
unzip TFA-LINUX_v18.2.1.zip
mkdir -p $ORACLE_HOME/tfa
./installTFA-LINUX -local -tfabase $ORACLE_HOME/tfa
After having completed this process on all nodes, let’s synchronize them. As I decided not to use SSH, I need to execute those final steps :
# sudo /grid/infrastructure/home/bin/tfactl syncnodes ( # $GIHOME/tfa/nodename/tfa_home/bin/synctfanodes.sh )
Please copy these files manually to remote node and restart TFA
2. /grid/infrastructure/home/tfa/node01/tfa_home/client.jks
3. /grid/infrastructure/home/tfa/node01/tfa_home/internal/ssl.properties
sudo /grid/infrastructure/home/bin/tfactl stop
sudo /grid/infrastructure/home/bin/tfactl start
Log Collection Tfa
__________________
./tfactl diagnosetfa -local
./tfactl diagcollect -srdc ORA-00600
./tfactl diagcollect -srdc ORA-07445
./tfactl diagcollect -from "MON/DD/YYYY 13:00:00" -to "MON/DD/YYYY 13:00:00"
./tfactl diagcollect
Trace File Analyzer Command Examples
- Viewing System and Cluster Summary
tfactl summary
- To find all errors in the last one day
tfactl analyze -last 1d
- To find all occurrences of a specific error (in this case ORA-00600 errors)
tfactl analyze -search “ora-00600” -last 8h
- To set the notification email to use
tfactl set notificationAddress=joeblogs@oracle.com
- Enable or disable Automatic collections (ON by default)
tfactl set autodiagcollect=OFF
- Adjusting the Diagnostic Data Collection Period
tfactl diagcollect -last 1 h
tfactl diagcollect -from “2018-03-21″
tfactl diagcollect from “2018-03-21” -to “2018-03-22”
- Analyze, trim and zip all files updated in the last 12 hours, including Cluster Health Monitor and OSWatcher data, from across all nodes the cluster
tfactl diagcollect -all -last 12h
- Run collection from specific nodes in a RAC cluster
tfactl diagcollect -last 1d -node rac01
- Run collection for a specific database
tfactl -diagcollect -database hrdb -last 1d
- Uploading collections to Oracle Support
Execute tfactl setupmos to configure Oracle Trace File Analyzer with MOS user name and password followed by
tfactl diagcollect -last 1d -sr 1234567
- Search database alert logs for the string “ORA-” from the past one day
tfactl analyze -search “ORA” -comp db -last 1d
- Display a summary of events collected from all alert logs and system logs from the past six hours
tfactl analyze -last 6h
- View the summary of a TFA deployment. This will display cluster node information as well as information related to database and grid infrastructure software homes like version, patches installed, databases running etc.
tfactl summary
- Grant access to a user
tfactl access add -user oracle
- List users with TFA access
tfactl access lsusers
- Run orachk
tfactl run orachk
- Display current configuration settings
tfactl print config
TFA Status :
__________________
[root@ermantest tmp]# /u01/app/oracle/product/12.1.0.2/db_1/bin/tfactl status
root@ermantest tmp]# /u01/app/oracle/product/12.1.0.2/db_1/bin/tfactl toolstatus
root@ermantest tmp]# /u01/app/oracle/product/12.1.0.2/db_1/bin/tfactl version
# sudo /grid/infrastructure/home/bin/tfactl print config
# sudo /grid/infrastructure/home/bin/tfactl syncnodes
____________________________________
TFA installed as part of 21523375 (Oct2015 CPU)
____________________________________
Ater The Grid Psu TFA was installed.
If you need to shutdown processes running from grid, TFA will need to be stopped as well (# /etc/sinit.d/init.tfa stop) since crsctl stop crs does not stop TFA
__________________
Controlling TFA cpu usage
__________________
tfactl setresourcelimit
[-tool tool_name]
[-resource resource_type]
[-value value]
To limit TFA to a maximum of 50% of a single CPU, run the following:
# tfactl setresourcelimit -value 0.5
__________________
TFA Reference :
__________________
https://xy2401-local-doc-java.github.io/en/engineered-systems/health-diagnostics/trace-file-analyzer/tfaug/troubleshoot-tfa.html#GUID-169D2468-008B-4CE1-AB8E-1BA2A6233360
__________________
Troubleshooting TFA
__________________
https://xy2401-local-doc-java.github.io/en/engineered-systems/health-diagnostics/trace-file-analyzer/tfaug/troubleshoot-tfa.html#GUID-AEEC5C9E-00F1-44B7-B39F-76E836AFC10F
##################################################################################
Oracle Autonomous Health Framework (Former TFA)
##################################################################################
Oracle Autonomous Health Framework is a collection of components that analyzes the diagnostic data collected, and proactively identifies issues before they affect the health of your clusters or your Oracle Real Application Clusters (Oracle RAC) databases. Oracle Autonomous Health Framework contains Oracle ORAchk, Oracle EXAchk, and Oracle Trace File Analyzer.
1) Download latest TFA software DocID 2550798.1
2) copy /u01/src/AHF-LINUX_v20.2.0.zip
3) unzip AHF-LINUX_v20.2.0.zip
4) Install TFA
as root
cd /u01/src/
./ahf_setup
[root@dbhost]# ./ahf_setup -extract -notfasetup
as non root
./ahf_setup -ahf_loc $ORACLE_HOME/ahf
__________________
__________________
Controlling TFA cpu usage
__________________
uninstall AHF
__________________
[root@dbhost]# cd /opt/oracle.ahf/tfa/bin
[root@dbhost]# ./tfactl uninstall
__________________
Upload Files directly to Oracle Sr
__________________
__________________
AHF Reference
__________________
https://docs.oracle.com/en/database/oracle/oracle-database/19/atnms/troubleshoot-tfa.html#GUID-11964D53-74C9-4754-9E80-9DB22557FF4E