Temp and diff table
#!/bin/bash source /auto/home/oracledb_ci.cfg log "Starting Day 1: Daily Operations." # Step 1: Truncate CMDB_DB_CI_TEMP sqlplus -s $username/$password@$database <<EOF TRUNCATE TABLE CMDB_DB_CI_TEMP; exit EOF if [ $? -ne 0 ]; then log "Failed to truncate CMDB_DB_CI_TEMP." exit 1 fi log "CMDB_DB_CI_TEMP truncated successfully." # Step 2: Load CMDB_DB_CI_TEMP with current data control_file="/auto/home/oracledb_ci_temp.ctl" cat <<EOF > $control_file LOAD DATA INFILE '$csv_file' INTO TABLE CMDB_DB_CI_TEMP FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ( support_group, install_status, oracle_home, u_cmdb_ci_used_for, u_cmdb_owner_group, name, correlation_id, version ) EOF sqlldr $username/$password@$database control=$control_file log="$log_location/temp_loader_oracledb_ci.log" if [ $? -ne 0 ]; then log "Failed to load data into CMDB_DB_CI_TEMP." exit 1 fi log "D...