There is a process that loads and verifies files in Oracle on Unix (AIX).
For example, a file called ORANGES.txt gets validated and gets assigned a file_key = 459 in the DATA_STG table.
Now its time to load this file, ORANGES.txt using SQL Loader.
Here's the control file:
APPEND INTO TABLE DATA_PROD
FIELDS TERMINATED by '|' TRAILING NULLCOLS
FILE_FILE_KEY CONSTANT $FILE_KEY,
USER_ID CONSTANT "AA",
FILE_FILE_KEY needs to come from the table DATA_STG, which means it needs to be 459.
I know that I need a shell script to get the FILE_KEY from the table DATA_STG. I need help writing that piece. I've done some research and know that I can dynamically create the control file with this value, I'm not sure how. Any help would be appreciated.
Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here.
General principle of Oracle compression
Oracle compression is a way of reducing the d…
How to Create User-Defined Aggregates in Oracle
Before we begin creating these things, what are user-defined aggregates? They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…