I am using DB2 and wish to capture the ETL status on daily basis so that i can run the query and share the details in xls format to respective mail ids .
Currently i am using below query but this displays table name and counts for latest run.
I need to have below details
1. If i have staging table as "STG_Customer" and Target table as "Customer", i would need to get the counts of each side by side , or immediate below the row .
Ex: STG_Customer -20 Customer -20 OR
STG_Customer -20
Customer -20
2.Additional columns along with table name and Counts. "Start Time", "End Time", "Load status --Success or Failure "
3.We keep on adding staging and target tables and hence cant hardcode in queries. Any feasible way to explore this requirement . Please do let me know.
I want to call this query in perl/python to send automated mails on daily basis.
Hi,
I'm writing a script and have become stuck trying to define a variable (COMP) by adding an elapsed time (ELAPSE e.g 00:55) to a start time (START e.g 23:50).
Can anybody give me a solution as to how I can get a completion time in hh:mm from the variables above?
thanks
Richard (4 Replies)
Is there anyway to get the start time and end time / status of a crontab job which was just completed? Of course, we know the start time of the crontab job since we are scheduling. But I would like to know process start and time recorded somewhere or can be fetched from a command like 'ps'. ... (3 Replies)
Hello All,
Below mentioned is my log file.
I want to make a script which ask for start time and then end time and then search particular word between those lines.
Like
start time:2
end time: 4
and then search all values starting from cell 84 between this time.
Please Help
... (2 Replies)
Hi,
Can anyone help me how can I get the line that between the start time and end time.
file1.txt
15/03/2009 20:45:03 Request: - Data of this line
15/03/2009 20:45:12 Response: - Data of this line
15/03/2009 22:10:40 Request: - Data of this line
15/03/2009 22:10:42 Response: - Data of... (1 Reply)
Hi All,
Can we get to know the start time and end time of execution of a script? (This script doesn't write any logs.) I mean, is there any built in process logs to track these records? (2 Replies)
Hello All,
I have a problem calculating the time difference between start and end timings...!
the timings are given by 24hr format..
Start Date : 08/05/10 12:55
End Date : 08/09/10 06:50
above values are in mm/dd/yy hh:mm format.
Now the thing is, 7th(08/07/10) and... (16 Replies)
I know little SQL and could really use a hand here. I need to get the fields last_name, first_name and email from the table users and only if the entery with the same pkey in the table addresses, in the city column is Seattle.
So if the city in the addresses table is Seattle, go to the table... (2 Replies)
Hi guys,
How can I specify the start and end time of a cron job. And my start time and end time are specified by minutes. For example, I want to set up a cron runs every 3 minutes from 18:40 to midnight. How can i do this please? Many thanks
Best regards,
Clu (4 Replies)
Oracle Enterprise Linux
We want to track how long a process takes to complete its execution. This is what we want in the schell script
Before the process is started , get the time with date, hours and minutes
execute the process
After the process has ended , get the time with date,... (5 Replies)
Discussion started by: omega3
5 Replies
LEARN ABOUT PHP
db2_foreign_keys
DB2_FOREIGN_KEYS(3) 1 DB2_FOREIGN_KEYS(3)db2_foreign_keys - Returns a result set listing the foreign keys for a tableSYNOPSIS
resource db2_foreign_keys (resource $connection, string $qualifier, string $schema, string $table-name)
DESCRIPTION
Returns a result set listing the foreign keys for a table.
PARAMETERS
o $connection
- A valid connection to an IBM DB2, Cloudscape, or Apache Derby database.
o $qualifier
- A qualifier for DB2 databases running on OS/390 or z/OS servers. For other databases, pass NULL or an empty string.
o $schema
- The schema which contains the tables. If $schema is NULL, db2_foreign_keys(3) matches the schema for the current connection.
o $table-name
- The name of the table.
RETURN VALUES
Returns a statement resource with a result set containing rows describing the foreign keys for the specified table. The result set is com-
posed of the following columns:
+--------------+---------------------------------------------------+
| Column name | |
| | |
| | Description |
| | |
+--------------+---------------------------------------------------+
| PKTABLE_CAT | |
| | |
| | Name of the catalog for the table containing the |
| | primary key. The value is NULL if this table does |
| | not have catalogs. |
| | |
|PKTABLE_SCHEM | |
| | |
| | Name of the schema for the table containing the |
| | primary key. |
| | |
|PKTABLE_NAME | |
| | |
| | Name of the table containing the primary key. |
| | |
|PKCOLUMN_NAME | |
| | |
| | Name of the column containing the primary key. |
| | |
| FKTABLE_CAT | |
| | |
| | Name of the catalog for the table containing the |
| | foreign key. The value is NULL if this table does |
| | not have catalogs. |
| | |
|FKTABLE_SCHEM | |
| | |
| | Name of the schema for the table containing the |
| | foreign key. |
| | |
|FKTABLE_NAME | |
| | |
| | Name of the table containing the foreign key. |
| | |
|FKCOLUMN_NAME | |
| | |
| | Name of the column containing the foreign key. |
| | |
| KEY_SEQ | |
| | |
| | 1-indexed position of the column in the key. |
| | |
| UPDATE_RULE | |
| | |
| | Integer value representing the action applied to |
| | the foreign key when the SQL operation is UPDATE. |
| | |
| DELETE_RULE | |
| | |
| | Integer value representing the action applied to |
| | the foreign key when the SQL operation is DELETE. |
| | |
| FK_NAME | |
| | |
| | The name of the foreign key. |
| | |
| PK_NAME | |
| | |
| | The name of the primary key. |
| | |
|DEFERRABILITY | |
| | |
| | An integer value representing whether the for- |
| | eign key deferrability is SQL_INITIALLY_DEFERRED, |
| | SQL_INITIALLY_IMMEDIATE, or SQL_NOT_DEFERRABLE. |
| | |
+--------------+---------------------------------------------------+
SEE ALSO db2_column_privileges(3), db2_columns(3), db2_primary_keys(3), db2_procedure_columns(3), db2_procedures(3), db2_special_columns(3),
db2_statistics(3), db2_table_privileges(3), db2_tables(3).
PHP Documentation Group DB2_FOREIGN_KEYS(3)