Pages

Thursday, May 12, 2022

Rename files in SQL Server

USE [master];
GO
--Disconnect all existing session.
ALTER DATABASE jiradev4 SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO

--Change database in to OFFLINE mode.
ALTER DATABASE jiradev4 SET OFFLINE
GO

ALTER DATABASE jiradev4 MODIFY FILE (Name='jiradev4', FILENAME='D:\DB\jiradev4.mdf')
GO

ALTER DATABASE jiradev4 MODIFY FILE (Name='jiradev4_log', FILENAME='D:\Logs\jiradev4_log.ldf')
GO

Here - physically rename datafiles on server to the new names

ALTER DATABASE jiradev4 SET ONLINE
Go
ALTER DATABASE jiradev4 SET MULTI_USER
Go

Refresh the databases list, and check the database properties.

SQL Server Copy Database options

Need to copy database from databaseName=dba_util to dba_util_test.

In SQL Server, several options to do that.

Option 1 – Using Backup and Restore
Backup
1.      
Right click on the database you want to duplicate and choose Tasks->"Back Up..."
2.     Save the back up to a .bak file
Important - When doing export: go to tab Media Options -> select "Overwrite all existing backup sets"

Restore
1.      Right click on the "Databases" ->  "Restore Database"
2.      As the source, select "File" and point to the .bak file you created earlier.
3.      Change the name of the database to restore to.


Important:  When doing import: go to tab Options -> Uncheck "Tail-long Backup"
It will make the restore much faster, and to the point of time the backup was taken.

Option 2 – using Database Copy Wizard
Database -> my_database -> Tasks -> Copy ->
Source server MY_SERVER->
Destination Server MY_SERVER->
Select option Detach + Attach (source database must be offline, faster) or "SQL Management Option" (source database can be online, slower) ->
Select database Name to copy ->
Give new Database Name -> my_database_new
Give new Database File path  D:\DB
Give new Database Log path D:\Logs ->
A new package is created under server_name/DTS Packages/Copy Database Wizard Packages CDW_MY_SERVER_dba_util_copy ->
Run Immediately ->

 

Click Finish to perform the following actions:

 Source: MY_SERVER Other SQL Server Version, Microsoft SQL Server Standard Edition (64-bit) , Build 3223, Microsoft Windows NT 6.3 (14393) NT x64

Destination: MY_SERVER Other SQL Server Version, Microsoft SQL Server Standard Edition (64-bit) , Build 3223, Microsoft Windows NT 6.3 (14393) NT x64

Using SMO online transfer

The following databases will be moved or copied:

 

Copy:dba_util

Destination file will be created: D:\DB\dba_util_test.mdf

Destination file will be created: D:\Logs\dba_util_test_log.ldf

Stop transfer if duplicate database name exists at destination

 

Package scheduled to run immediately

 





 

Sunday, May 8, 2022

check connection bash script

==================
General
==================
Bash script that takes 3 parameters, and returns 1 if connection was bad or zero if connection was good.

input:
- user
- password
- connection string

output
number 1/0
0 - OK
1 - Bad

#!/bin/bash

VIPUSER=$1
VIPPASS=$2
DB_INST=$3

#---------------------------------
#functions
#---------------------------------
report_error(){
  db_user=$1
  echo ==========================================
  echo Error!!!
  echo User $db_user Connection Check........Failed
  echo Connection Error for User $db_user
  echo ERROR: ORA-01017: invalid username/password. logon denied
  echo Exiting script!
  echo ==========================================
  exit 1
}

report_success(){
  db_user=$1
  echo "User $db_user Connection Check........Passed"
}

#---------------------------------
#main
#---------------------------------

echo ==========================================
echo Check Connections Start
echo ==========================================

export OUTPUT_FILE=./chk_connections.log

rm -f $OUTPUT_FILE 2>/dev/null
touch $OUTPUT_FILE

echo "Check Connection for:  ${VIPUSER}"
sqlplus -s ${VIPUSER}/${VIPPASS}@${DB_INST} >> $OUTPUT_FILE << EOD
set serveroutput on
set heading off linesize 130 pagesize 1000  feedback off
SELECT 'Connection is OK for '||USER FROM DUAL;
EOD


#----------------------------
# Analyze Connection Results
#----------------------------
#echo "OUTPUT_FILE=$OUTPUT_FILE"
#cat $OUTPUT_FILE
connection_ok=`grep "Connection is OK for" $OUTPUT_FILE | grep -iw ${VIPUSER} | wc -l`

if [[ $connection_ok != 1 ]];then
  report_error ${VIPUSER}
  ret_status=1
else
  report_success ${VIPUSER}
  ret_status=0
fi

rm -f $OUTPUT_FILE

echo ==========================================
echo Check Connections Finish
echo ==========================================

exit $ret_status

Tuesday, May 3, 2022

Sqloader by simple example

load_data.sh
DB_USER=MY_USER
DB_PASS=MY_PASS
DB_INST=orainst
CTL_FILE=/starhome/iu/workarea/loader_ora/raf_msisdn_set_details_sfi_b.ctl
SQL_LOADER_LOG_FILE=/starhome/iu/workarea/loader_ora/raf_msisdn_set_details_sfi_b.log
sqlldr ${DB_USER}/${DB_PASS}@${DB_INST} CONTROL=${CTL_FILE} LOG=${SQL_LOADER_LOG_FILE}


raf_msisdn_set_details_sfi_b.ctl
OPTIONS(DIRECT=TRUE)
LOAD DATA
INFILE '/starhome/iu/workarea/loader_ora/input_file.txt'
BADFILE '/starhome/iu/workarea/loader_ora/input_file.bad'
DISCARDMAX 0
APPEND
INTO TABLE raf_msisdn_set_details_sfi_b
FIELDS TERMINATED BY ','
(
MSISDN_SET_ID    "TRIM (:MSISDN_SET_ID)",
MSISDN_FROM      "TRIM (:MSISDN_FROM)",
MSISDN_TO        "TRIM (:MSISDN_TO)",
MSISDN_DESC      "TRIM (:MSISDN_DESC)",
IS_PREFIX        "TRIM (:IS_PREFIX)",
TS_LAST_MODIFIED SYSDATE
)

replace tabs with comma in input file
less input_file.txt_comma | sed 's/\t/,/g' > input_file.txt

=====================
OPTIONS(DIRECT=TRUE)
=====================
By default, direct load is not activated in sqlldr, and the load is via regular flow.
To avoid archiving during load, one can activate direct load by:

A. set table to be NOLOGGING
B. add OPTIONS(DIRECT=TRUE) to sqlldr control file

This will cause a direct path load, and when sqlldr is running, this message with appear:

Path used:      Direct

For example:
OPTIONS(DIRECT=true)
LOAD DATA
INFILE '/starhome/sfi_usage/input/imput.dat'
BADFILE '/starhome/sfi_usage/ctl/input.bad'
DISCARDMAX 0
TRUNCATE
INTO TABLE table_hourly_a
FIELDS TERMINATED BY ','
(
KEY1                          "TRIM (:KEY1)",
IMSI                          "TRIM (:IMSI)"
)

Thursday, April 28, 2022

Oracle RU and RUR. Database Release Update vs GI Release Update


Starting with Oracle Database 18c, Oracle provides quarterly updates in the form of Release Updates (RU) and Release Update Revisions (RUR). Oracle no longer releases patch sets. 

In 12.2 in prior:
There used to be PSU and BP

Patch Set Update (PSU) 
contains usually security fixes and regression fixes, i.e. bug fixes.

Bundle Patch (BP) 
A superset of a PSU containing the PSU but optimizer fixes and functional fixes which may be sometimes feature extensions as well.

PSUs and BPs, each are cumulative. 
You’ll get the fixes from all previous PSUs or BPs for the same release included as well. 

Oracle 18.1 and higher:
Release Updates (RU) 
Release Update Revisions (RUR).

Release Updates (RU) 
These are parallel to BP
Oracle's quarterly Updates contain fixes for the bugs that customers are most likely to encounter
RUs are cumulative.

RUR - Release Update Revisions
RUR are being issued on the same quarterly basis to augment the RUs with fixes for known regressions and to include the latest security vulnerability fixes as well.

DBRU
DBRU (Database Release Update) patches only the Oracle Database home
DBRU is intended for standalone or specific DB-only patching.

GIRU
GIRU (Grid Infrastructure Release Update) patches both the Grid Infrastructure and Database homes. GIRU is essential for clustered environments (RAC) as it includes GI-specific components like ACFS and Clusterware.

Oracle Updates Types: 

GI Release Update
GI Release Updates are designed for maintaining the foundation (databse server and OS)

Database Release Update
Database Release Updates are designed for update the database itself. 

How to search:
In oracle Support:
For Version 19, Search for:
Database 19 Release Updates and Revisions Bugs Fixed Lists (Doc ID 2523220.1)


In General
Patch Search ->
Select Release ->
Select Platform ->
Select Description; Start With: DATABASE RELEASE



Version 19 Updates
19.27.0.0.DBRU: 250415 - Patch 37642901: DATABASE RELEASE UPDATE 19.27.0.0.0
19.30.0.0.0 DBRU: 260130 - Patch 38632161: DATABASE RELEASE UPDATE 19.30.0.0.0

Monday, April 25, 2022

Oracle Autonomous Health Framework (AHF) by Example

==========================================
Autonomous Health Framework (AHF) and tfactl 
==========================================
Autonomous Health Framework (AHF) can be installed as the "root" user on the server, 
which provides the most functionality and allows it to run in a proactive manner as a daemon. 
In this example installation is done as the root user.
AHP installs these utilities:
orachk -> /opt/oracle.ahf/orachk/orachk
oerr -> /opt/oracle.ahf/orachk/lib/oerr.sh
tfactl

tfacl can be run with various flags, to gather different info about OS, oracle installations, filesystem, etc.

Step 1 - Installation

Unzip the software and run the ahf_setup command. 
Answer the questions when prompted. 
The following must be run as root

as root:
mkdir /opt/ahf_data


root@my_server:/software/oracle/oracle/scripts/AHF>% ./ahf_setup

AHF Installer for Platform Linux Architecture x86_64

AHF Installation Log : /tmp/ahf_install_211400_23652_2021_07_08-15_23_08.log

Starting Autonomous Health Framework (AHF) Installation

AHF Version: 21.1.4 Build Date: 202106281226

Default AHF Location : /opt/oracle.ahf

Do you want to install AHF at [/opt/oracle.ahf] ? [Y]|N : y

AHF Location : /opt/oracle.ahf

AHF Data Directory stores diagnostic collections and metadata.
AHF Data Directory requires at least 5GB (Recommended 10GB) of free space.

Please Enter AHF Data Directory : /opt/ahf_data
Do you want to add AHF Notification Email IDs ? [Y]|N : n

Extracting AHF to /opt/oracle.ahf

Configuring TFA Services

Discovering Nodes and Oracle Resources

Successfully generated certificates.

Starting TFA Services
Created symlink from /etc/systemd/system/multi-user.target.wants/oracle-tfa.service to /etc/systemd/system/oracle-tfa.service.
Created symlink from /etc/systemd/system/graphical.target.wants/oracle-tfa.service to /etc/systemd/system/oracle-tfa.service.

.-----------------------------------------------------------------------------------.
| Host           | Status of TFA | PID  | Port  | Version    | Build ID             |
+----------------+---------------+------+-------+------------+----------------------+
| my_server      | RUNNING       | 6388 | 11599 | 21.1.4.0.0 | 21140020210628122659 |
'----------------+---------------+------+-------+------------+----------------------'

Running TFA Inventory...

Adding default users to TFA Access list...

.-------------------------------------------------------------------.
|                     Summary of AHF Configuration                    |
+---------------+---------------------------------------------------+
| Parameter       | Value                                           |
+-----------------+-------------------------------------------------+
| AHF Location    | /opt/oracle.ahf                                 |
| TFA Location    | /opt/oracle.ahf/tfa                             |
| Orachk Location | /opt/oracle.ahf/orachk                          |
| Data Directory  | /opt/ahf_data/oracle.ahf/data                   |
| Repository      | /opt/ahf_data/oracle.ahf/data/repository        |
| Diag Directory  | /opt/ahf_data/oracle.ahf/data/qanfv-1-dbs-1b/diag
'-----------------+-------------------------------------------------'


Starting orachk scheduler from AHF ...

AHF binaries are available in /opt/oracle.ahf/bin

AHF is successfully installed

Do you want AHF to store your My Oracle Support Credentials for Automatic Upload ? Y|[N] : N

Moving /tmp/ahf_install_211400_3967_2021_07_08-15_28_16.log to /opt/ahf_data/oracle.ahf/data/qanfv-1-dbs-1b/diag/ahf/


This installs /opt/oracle.ahf/

root@my_server:/software/oracle/oracle/scripts/oracle_support>% cd /opt/oracle.ahf/bin/
root@my_server:/opt/oracle.ahf/bin>% ls -ltr
total 4
lrwxrwxrwx 1 root root   29 Mar 17 23:19 orachk -> /opt/oracle.ahf/orachk/orachk
lrwxrwxrwx 1 root root   34 Mar 17 23:19 oerr -> /opt/oracle.ahf/orachk/lib/oerr.sh
-rwxr-xr-x 1 root root 3818 Mar 17 23:19 tfactl


./orachk
Collections and audit checks log file is
/opt/oracle.ahf/data/qanfv-1-dbs-1a/orachk/user_root/output/orachk_qanfv-1-dbs-1a_igt_031621_152257/log/orachk.log





Step 2 - Execution - a general run

cd /opt/oracle.ahf/bin/
./orachk

============================================================
         Node name - qanfv-1-dbs-1a
============================================================
. . . . . .

 Collecting - Database Parameters for igt database
 Collecting - Database Undocumented Parameters for igt database
 Collecting - List of active logon and logoff triggers for igt database
 Collecting - CPU Information
 Collecting - Disk I/O Scheduler on Linux
 Collecting - DiskMount Information
 Collecting - Kernel parameters
 Collecting - Maximum number of semaphore sets on system
 Collecting - Maximum number of semaphores on system
 Collecting - Maximum number of semaphores per semaphore set
 Collecting - Memory Information
 Collecting - OS Packages
 Collecting - Operating system release information and kernel version
 Collecting - Patches for RDBMS Home
 Collecting - Table of file system defaults
 Collecting - number of semaphore operations per semop system call
 Collecting - Disk Information
 Collecting - ORAchk Daemon/Scheduler configuration
 Collecting - Root user limits
 Collecting - Verify TCP Selective Acknowledgement is enabled
 Collecting - Verify no database server kernel out of memory errors
 Collecting - Verify the vm.min_free_kbytes configuration

Data collections completed. Checking best practices on qanfv-1-dbs-1a.
------------------------------------------------------------


 WARNING =>  Linux swap configuration does not meet recommendation
 WARNING =>  Non-AWR Space consumption is greater than or equal to 50% of total SYSAUX space. for igt
 WARNING =>  There are some application objects with STALE statistics for igt
 INFO =>     Most recent ADR incidents for /software/oracle/122
 INFO =>     Oracle GoldenGate failure prevention best practices
 CRITICAL => The vm.min_free_kbytes configuration is not set as recommended
 INFO =>     Oracle GoldenGate Health-Checks and Diagnostics Reports for igt
 INFO =>     user_dump_dest has trace files older than 30 days for igt
 WARNING =>  ORA-00600 errors found in alert log for igt
 INFO =>     Alert log file is too big and should be rolled over periodically for igt
 INFO =>     At some times checkpoints are not being completed for igt
 WARNING =>  One or more redo log groups are not multiplexed for igt
 WARNING =>  Primary database is not protected with Data Guard (standby database) for real-time data protection and availability for igt
 FAIL =>     numa_balancing kernel parameter is not configured to 0
 INFO =>     Important Storage Minimum Requirements for Grid & Database Homes
 WARNING =>  OSWatcher is not running as is recommended.
 FAIL =>     Database parameter DB_LOST_WRITE_PROTECT is not set to recommended value on igt instance
 WARNING =>  Database parameter DB_BLOCK_CHECKING on primary is not set to the recommended value. for igt
 WARNING =>  Consider setting the value of the parameter _cursor_obsolete_threshold  to 1024 for Non-Multitenant environment which is the appropriate recommended value for igt
 INFO =>     Operational Best Practices
 INFO =>     Database Consolidation Best Practices
 INFO =>     Computer failure prevention best practices
 INFO =>     Data corruption prevention best practices
 INFO =>     Logical corruption prevention best practices
 INFO =>     Database/Cluster/Site failure prevention best practices
 INFO =>     Client failover operational best practices
 WARNING =>  Oracle patch 30712670 is not applied on RDBMS_HOME /software/oracle/122
 WARNING =>  Oracle patch 29867728 is not applied on RDBMS_HOME /software/oracle/122
 WARNING =>  Oracle patch 31142749 is not applied on RDBMS_HOME /software/oracle/122
 WARNING =>  Oracle patch 26749785 is not applied on RDBMS_HOME /software/oracle/122
 WARNING =>  Oracle patch 29302565 is not applied on RDBMS_HOME /software/oracle/122
 WARNING =>  Oracle patch 29259068 is not applied on RDBMS_HOME /software/oracle/122
 FAIL =>     RECYCLEBIN on PRIMARY should be set to the recommended value on igt instance
 WARNING =>  Oracle clusterware is not being used
 WARNING =>  RAC Application Cluster is not being used for database high availability on igt instance
 FAIL =>     Table AUD$[FGA_LOG$] should use Automatic Segment Space Management for igt
 WARNING =>  Flashback on PRIMARY is not configured for igt
 INFO =>     Database failure prevention best practices
 WARNING =>  fast_start_mttr_target has NOT been changed from default on igt instance
 FAIL =>     Active Data Guard is not configured for igt
 INFO =>     Parallel Execution Health-Checks and Diagnostics Reports for igt
 CRITICAL => The data files should be recoverable for igt
 WARNING =>  The UTL_SPADV package should be installed in the database. for igt
 WARNING =>  The Streams pool is not currently set or not sized appropriately for this database instance. for igt
 INFO =>     Oracle recovery manager(rman) best practices
 INFO =>     Database feature usage statistics for igt
 WARNING =>  Consider investigating changes to the schema objects such as DDLs or new object creation for igt
 WARNING =>  Consider adding more redo log groups or increase the size of redo logs for igt
Best Practice checking completed. Checking recommended patches on qanfv-1-dbs-1a
--------------------------------------------------------------------------------
Collecting patch inventory on ORACLE_HOME /software/oracle/122
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
1 Recommended RDBMS patches for 122010 from /software/oracle/122 on qanfv-1-dbs-1a
--------------------------------------------------------------------------------
Patch#   RDBMS    ASM     type                Patch-Description
--------------------------------------------------------------------------------
31741641 no               merge                Database Oct 2020 Release Update 12.2.0.1.201020
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
              RDBMS homes patches summary report
--------------------------------------------------------------------------------
Total patches  Applied on RDBMS Applied on ASM ORACLE_HOME
--------------------------------------------------------------------------------
1              1              0                /software/oracle/122
--------------------------------------------------------------------------------
------------------------------------------------------------
Detailed report (html) -  /opt/oracle.ahf/data/qanfv-1-dbs-1a/orachk/user_root/output/orachk_qanfv-1-dbs-1a_igt_031621_152257/orachk_qanfv-1-dbs-1a_igt_031621_152257.html




UPLOAD [if required] - /opt/oracle.ahf/data/qanfv-1-dbs-1a/orachk/user_root/output/orachk_qanfv-1-dbs-1a_igt_031621_152257.zip

Step 2 - Execution - gather info about corruption on disk
This MUST be run as oracle user
Need first to get database name

SELECT NAME FROM V$DATABASE;
NAME
---------
IGT

cd /opt/oracle.ahf/bin/
./tfactl diagcollect -srdc dbcorrupt 

oracle@my_server:~>% cd /opt/oracle.ahf/bin
oracle@my_server:/opt/oracle.ahf/bin>% ./tfactl diagcollect -srdc dbcorrupt
Enter the Database Name [Required for this SRDC] : IGT
Scripts to be run by this srdc: ipspack get_db_opatch_info srdc_corruption_1578_info.sql hcheck.sql hcheck_pdb.sql
Components included in this srdc: OS DATABASE ASM CHMOS
Collecting data for local node(s)

Collection Id : 20210316154324qanfv-1-dbs-1a

Detailed Logging at : /opt/oracle.ahf/data/repository/srdc_dbcorrupt_collection_Tue_Mar_16_15_43_25_GMT_2021_node_local/diagcollect_20210316154324_qanfv-1-dbs-1a.log
2021/03/16 15:43:30 GMT : NOTE : Any file or directory name containing the string .com will be renamed to replace .com with dotcom
2021/03/16 15:43:30 GMT : Collection Name : tfa_srdc_dbcorrupt_Tue_Mar_16_15_43_25_GMT_2021.zip
2021/03/16 15:43:30 GMT : Collecting additional diagnostic information...
2021/03/16 15:43:30 GMT : Scanning of files for Collection in progress...
2021/03/16 15:43:40 GMT : Getting list of files satisfying time range [03/16/2021 14:43:30 GMT, 03/16/2021 15:43:40 GMT]
2021/03/16 15:43:54 GMT : Collecting ADR incident files...
2021/03/16 15:43:57 GMT : Completed collection of additional diagnostic information...
2021/03/16 15:44:00 GMT : Completed Local Collection
.------------------------------------------.
|            Collection Summary            |
+----------------+-----------+------+------+
| Host           | Status    | Size | Time |
+----------------+-----------+------+------+
| qanfv-1-dbs-1a | Completed | 8MB  |  30s |
'----------------+-----------+------+------'

Logs are being collected to: /opt/oracle.ahf/data/repository/srdc_dbcorrupt_collection_Tue_Mar_16_15_43_25_GMT_2021_node_local
/opt/oracle.ahf/data/repository/srdc_dbcorrupt_collection_Tue_Mar_16_15_43_25_GMT_2021_node_local/qanfv-1-dbs-1a.tfa_srdc_dbcorrupt_Tue_Mar_16_15_43_25_GMT_2021.zip


The Output Files:
are under 
qanfv-1-dbs-1a.tfa_srdc_dbcorrupt_Tue_Mar_16_15_43_25_GMT_2021.zip.txt
qanfv-1-dbs-1a.tfa_srdc_dbcorrupt_Tue_Mar_16_15_43_25_GMT_2021.zip
diagcollect_console_20210316154324_qanfv-1-dbs-1a.log
diagcollect_20210316154324_qanfv-1-dbs-1a.log

qanfv-1-dbs-1a.tfa_srdc_dbcorrupt_Tue_Mar_16_15_43_25_GMT_2021.zip - if the actual output file


Example B - gather info about corrupt UNDO tablespace
As oracle user run:

oracle@my_server:/opt/oracle.ahf/bin>% ./tfactl diagcollect -srdc DBAUM

SRDC diagnostic collections must be run as an oracle privileged user - not root
root@my_server:/opt/oracle.ahf/bin>% su - oracle
Last login: Thu Jul  8 15:36:43 GMT 2021
oracle@my_server:~>% oraigt
oracle@my_server:~>% cd /opt/oracle.ahf/bin/
oracle@my_server:/opt/oracle.ahf/bin>% ./tfactl diagcollect -srdc DBAUM
Enter the Database Name [Required for this SRDC] : IGT
Selected ORACLE_HOME /software/oracle/122
Enter the time of the issue [YYYY-MM-DD HH24:MI:SS,<RETURN>=ALL] :
Is there any ORA error happened on undo?[Y|N] [Required for this SRDC]: Y
Please input the ORA error number[number only] [Required for this SRDC]: 30013
Can you reproduce the issue? [Required for this SRDC]: y
Enter the full path of the SQL file which would reproduce the issue now:  [Required for this SRDC]: /software/oracle/oracle/scripts/AHF/for_oracle_support/drop_undotbs1.sql
Scripts to be run by this srdc: srdc_undo_recommendation.sql srdc_undo.sql srdc_get_errorstack_trace cp_reproduce_sql_file
Components included in this srdc: DATABASE NOCHMOS OS

EXIT; -- Exit from the custom script
Collecting data for local node(s).

Collection Id : 20210708154541qanfv-1-dbs-1b

Detailed Logging at : /opt/ahf_data/oracle.ahf/data/repository/srdc_dbaum_collection_Thu_Jul_08_15_45_42_GMT_2021_node_local/diagcollect_20210708154541_qanfv-1-dbs-1b.log
2021/07/08 15:45:47 GMT : NOTE : Any file or directory name containing the string .com will be renamed to replace .com with dotcom
2021/07/08 15:45:47 GMT : Collection Name : tfa_srdc_dbaum_Thu_Jul_08_15_45_42_GMT_2021.zip
2021/07/08 15:45:47 GMT : Getting list of files satisfying time range [07/08/2021 08:45:47 GMT, 07/08/2021 15:45:47 GMT]
2021/07/08 15:45:47 GMT : Collecting additional diagnostic information...
2021/07/08 15:45:58 GMT : Collecting ADR incident files...
2021/07/08 15:46:04 GMT : Completed collection of additional diagnostic information...
2021/07/08 15:46:08 GMT : Completed Local Collection
.-------------------------------------------.
|             Collection Summary            |
+----------------+-----------+-------+------+
| Host           | Status    | Size  | Time |
+----------------+-----------+-------+------+
| qanfv-1-dbs-1b | Completed | 413kB |  21s |
'----------------+-----------+-------+------'

Logs are being collected to: /opt/ahf_data/oracle.ahf/data/repository/srdc_dbaum_collection_Thu_Jul_08_15_45_42_GMT_2021_node_local
/opt/ahf_data/oracle.ahf/data/repository/srdc_dbaum_collection_Thu_Jul_08_15_45_42_GMT_2021_node_local/qanfv-1-dbs-1b.tfa_srdc_dbaum_Thu_Jul_08_15_45_42_GMT_2021.zip


Example C - gather info about Golden Gate
As oracle user run:
cd /opt/oracle.ahf/bin
./tfactl diagcollect -srdc gg_abend

oracle@my_host:~>% cd /opt/oracle.ahf/bin
oracle@my_host:/opt/oracle.ahf/bin>% ./tfactl diagcollect -srdc gg_abend
Enter the Database Name [Required for this SRDC] : IGT
Use of uninitialized value in split at /opt/oracle.ahf/tfa/bin/common/dbutil.pm line 1140.
Database Name IGT was specificed however this database has a Database Unique Name of igt.
 Database Unique Name igt set for IGT.

Enter the GoldenGate Home [Required for this SRDC]: /software/oracle/1910
Enter the failed GoldenGate component name [Required for this SRDC]: EXT_P_01
Is this a Microservices Install type? [Y|N]  [Required for this SRDC]: N

Components included in this collection: OS DATABASE

Preparing to execute support diagnostic scripts.
Use of uninitialized value in split at /opt/oracle.ahf/tfa/bin/common/dbutil.pm line 1140.
Use of uninitialized value in split at /opt/oracle.ahf/tfa/bin/common/dbutil.pm line 1140.
Use of uninitialized value in split at /opt/oracle.ahf/tfa/bin/common/dbutil.pm line 1140.
Use of uninitialized value in split at /opt/oracle.ahf/tfa/bin/common/dbutil.pm line 1140.
 Executing DB Script ogg_12102.sql on igt with timeout of 300 seconds...
 Executing OS Script cp_files_classic with timeout of 120 seconds...
  Script Execution Failed.  Review the collection SRDC log for details...
 Executing OS Script get_gghome_opatch_info with timeout of 500 seconds...

Collecting data for the last 1 hours for this component ...

Collecting data for local node(s).

TFA is using system timezone for collection, All times shown in GMT.

Collection Id : 20220425121900phliptst-1-aps01

Detailed Logging at : /opt/ahf_data/oracle.ahf/data/repository/srdc_gg_abend_collection_Mon_Apr_25_12_19_04_GMT_2022_node_local/diagcollect_20220425121900_phliptst-1-aps01.log
2022/04/25 12:19:09 GMT : NOTE : Any file or directory name containing the string .com will be renamed to replace .com with dotcom
2022/04/25 12:19:09 GMT : Collection Name : tfa_srdc_gg_abend_Mon_Apr_25_12_19_02_GMT_2022.zip
2022/04/25 12:19:09 GMT : Getting list of files satisfying time range [04/25/2022 11:19:09 GMT, 04/25/2022 12:19:09 GMT]
2022/04/25 12:19:09 GMT : Collecting additional diagnostic information...
2022/04/25 12:19:21 GMT : Collecting ADR incident files...
2022/04/25 12:19:41 GMT : Completed collection of additional diagnostic information...
2022/04/25 12:19:41 GMT : Completed Local Collection

.--------------------------------------------.
|             Collection Summary             |
+------------------+-----------+------+------+
| Host             | Status    | Size | Time |
+------------------+-----------+------+------+
| my_server        | Completed | 1MB  |  32s |
'------------------+-----------+------+------'

Logs are being collected to: /opt/ahf_data/oracle.ahf/data/repository/srdc_gg_abend_collection_Mon_Apr_25_12_19_04_GMT_2022_node_local
/opt/ahf_data/oracle.ahf/data/repository/srdc_gg_abend_collection_Mon_Apr_25_12_19_04_GMT_2022_node_local/phliptst-1-aps01.tfa_srdc_gg_abend_Mon_Apr_25_12_19_02_GMT_2022.zip
oracle@my_server:/opt/oracle.ahf/bin>%

Wednesday, April 20, 2022

enable_goldengate_replication

enable_goldengate_replication and Golden Gate
The database services required to support Oracle GoldenGate capture and apply must be enabled explicitly for an Oracle 11.2.0.4 database. 
This is required for all modes of Extract and Replicat.

Set 
enable_goldengate_replication to true to enable RDBMS services used by Oracle GoldenGate.

This parameter primarily controls supplemental logging required to support logical replication of new data types and operations. 

The RDBMS services controlled by this parameter also include
- Transparent Data Encryption (including Tablespace Encryption) utilities used by GoldenGate Extract
- Service to read redo logs used by GoldenGate Extract
- Service to suppress triggers used by GoldenGate Replicat
- Service to handle transient duplicate handling used by GoldenGate Replicat
- Service to bypass referential integrity checking used by GoldenGate Replicat
- Services required to run Oracle GoldenGate in Integrated Extract and Integrated Replicat