Trial capture of Oracle data from a UNIX Acquire - syncsort_capacity_management - 12 - 12.40

Syncsort Capacity Management Installation Guide

Product type
Software
Portfolio
Integrate
Product family
Syncsort
Product
Syncsort Capacity Management
Version
12.40
Language
English
Product name
Syncsort Capacity Management
Title
Syncsort Capacity Management Installation Guide
Topic type
How Do I
Copyright
2023
First publish date
1985

Confirming the correctness of the installation

Now that you have completed the administration tasks, you should test the data capture by performing a trial data capture run, as follows.
  1. The operation of Acquire is controlled by a crontab entry. Normally, this is set up by Syncsort Capacity Management Control Center, but for the purposes of this test, you need to create the crontab entry manually.
  2. Log on to UNIX as the metron user, and create a file (for example, crontab.oratest), containing a single line in the following format:
    0,5,10,15,20,25,30,35,40,45,50,55 0-23 * * * oracap/callsql met8 WORLD met8 
    /dbhome/ORACLE10g/home /dbhome/ORACLE10g/home/bin 300 21700 Y Y Y N 00000001 and

    The items in the line are as follows:

    • 0,5,10,15,20,25,30,35,40,45,50,55 0-23 * * *

    This is the cron time syntax for when the following command should be executed. The first field (0,5 etc to 55) specifies the minute, the second field (0-23) specifies the hours, the third field specifies the day of the month (* is ‘every’), the fourth field (*) specifies the month of the year and the fifth field (*) specifies the day of the week. This line will activate every five minutes for all hours ( 0-23 ) of every day.

    • oracap/callsql

    This is the Oracle Acquire executable. What follows are a number of positional variables that are used by the Acquire.

    • met8

    This variable is the ORACLE_SID. It will be exported into the run-time shell environment every time Acquire is used, but will not exist in the shell of the UNIX user. This is specific to each database and will be known to the DBA.

    • WORLD

    This is the ORACLE_DOMAIN, and is exported into the environment as such. Unless the DBA has specifically set up Oracle domains, this will usually be WORLD.

    • met8

    The second occurrence of this value supplies Acquire with an ORACLE_DBNAME variable. This is not actually used during the capture process. On almost all occasions this will be a repeat of the Oracle_SID.

    • /dbhome/ORACLE10g/home

    This is the home directory of the Oracle database, which is exported as ORACLE_HOME. Again, the DBA will know this path.

    • /dbhome/ORACLE10g/home/bin

    This is the absolute path to the sqlplus executable belonging to the database being captured from. By default this is held in the bin directory under ORACLE_HOME. However, if tailored installations or executables are being used then the DBA will know the directory to use. This directory, Oracle_HOME and Oracle_SID are used to access the data­base via sqlplus.

    • 300

    This is the interval length in seconds. This MUST correspond to the interval between the minutes values in the first field of the crontab line, so 5 minutes would be an interval length of 300 seconds in this example.

    • 21700

    This is the day and time to create each new measurement period, in the format “day of the week” = first digit, “time of day” = digits 2 to 5 as hhmm. Conventionally, the days of the week are numbered as follows:

    0 = Sunday

    1 = Monday

    2 = Tuesday

    3 = Wednesday

    4 = Thursday

    5 = Friday

    6 = Saturday

    So in this example, 21700 means “start a new measurement period at 17:00 every Tuesday".

    • Y Y Y

    These are Yes/No flags for the following Data Capture options:

    Capture Overview Data

    Capture Datafile Data

    Capture Session Data

    • 00000001

    A target number for the output files (pick any 8-digit number you like)

    • and

    To make cron run the script in background mode.

  3. Now install this crontab by entering the command:

    crontab < crontab.oratest   [on a UNIX system]

    Or:

    crontab crontab.oratest   [on a Linux system]

Once this crontab is in place, a number of files will appear and disappear in the Oracle directory.

If the capture works with no problems, the following will occur. (For these examples the Oracle_DOMAIN is WORLD and the Oracle_SID is MET1).

  • A file called ERRFILE_WORLD_MET1.txt will appear and remain in the Oracle directory for the duration of capture. This file will be size 0. A file called MSGORA_WORLD_MET1.txt will appear and contain the parameters provided to the Oracle capture function and show what overrides (if any) are in effect.

  • A number of associated files will then appear until, when capture is complete, the ERRFILE is removed and the only file left is yyyymmddhhmmss_azor_WORLD_MET1_I.1001 (or asor if compression is not flagged in APMconfg). A file of similar name but with increasing timestamp and suffix will appear at the end of each capture interval (every 5 minutes in this example).

If the capture starts and there is a problem that stops capture, the following will occur:

  • The file ERRFILE_WORLD_MET1.txt will appear and contain the output of the attempt to run sqlplus. Note that this file will be overwritten at the next interval.

  • Other files may be present. These should be noted as they represent various stages in the capture process. These files will also be overwritten at the next interval. These files will have the same naming structure as the final capture file but the azor string may be replaced by head, data, awkd, hold, test, or pawk. Knowing which file exists when the capture fails will be very useful.

  • Be aware that Acquire will create a SQL file every interval for each Oracle_SID. This will appear in oracap/sql overwriting the previous SQL file for that database. When the first capture takes place the files orintno and prevorint will appear in oracap.